配置本地yum源--linux5.5

1.拷贝镜像中的Server文件夹至本地/u01下

[root@fyl ~]# mount /dev/cdrom /media
mount: block device /dev/cdrom is write-protected, mounting read-only
[root@fyl media]# cp -r ./Server/ /u01

2、安装createrepo软件包

[root@fyl Server]# rpm -ivh createrepo-0.4.11-3.el5.noarch.rpm 
warning: createrepo-0.4.11-3.el5.noarch.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...                ########################################### [100%]
   1:createrepo             ########################################### [100%]
3、创建yum repository的xml-rpm-metadata

[root@fyl Server]# createrepo -p /u01/Server/
7/7 - gtk-vnc-0.3.8-3.el5.i386.rpm                                              
Saving Primary metadata
Saving file lists metadata
Saving other metadata
4、配置yum.repo文件

[root@fyl yum.repos.d]# pwd
/etc/yum.repos.d
[root@fyl yum.repos.d]# cat yum.repo
[base]
name=Red Hat Enterprise Linux
baseurl=file:///u01/Server
enabled=1
gpgcheck=0
5、测试yum安装包

[root@fyl repodata]# yum install *vnc*
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Package vnc-4.1.2-14.el5_3.1.i386 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package gtk-vnc.i386 0:0.3.8-3.el5 set to be updated
---> Package gtk-vnc-devel.i386 0:0.3.8-3.el5 set to be updated
---> Package gtk-vnc-python.i386 0:0.3.8-3.el5 set to be updated
---> Package vnc-server.i386 0:4.1.2-14.el5_3.1 set to be updated
---> Package xorg-x11-server-Xvnc-source.i386 0:1.1.1-48.76.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

==========================================================================================================================================================
 Package                                               Arch                           Version                         Repository                      Size
==========================================================================================================================================================
Installing:
 gtk-vnc                                               i386                           0.3.8-3.el5                     base                            80 k
 gtk-vnc-devel                                         i386                           0.3.8-3.el5                     base                           8.8 k
 gtk-vnc-python                                        i386                           0.3.8-3.el5                     base                            12 k
 vnc-server                                            i386                           4.1.2-14.el5_3.1                base                           2.0 M
 xorg-x11-server-Xvnc-source                           i386                           1.1.1-48.76.el5                 base                           5.5 M

Transaction Summary
==========================================================================================================================================================
Install       5 Package(s)
Upgrade       0 Package(s)

Total download size: 7.6 M
Is this ok [y/N]: y
Downloading Packages:
----------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                  3.4 GB/s | 7.6 MB     00:00     
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : xorg-x11-server-Xvnc-source                                                                                                                     1/5 
  Installing     : gtk-vnc                                                                                                                                         2/5 
  Installing     : gtk-vnc-devel                                                                                                                                   3/5 
  Installing     : vnc-server                                                                                                                                      4/5 
  Installing     : gtk-vnc-python                                                                                                                                  5/5 

Installed:
  gtk-vnc.i386 0:0.3.8-3.el5                            gtk-vnc-devel.i386 0:0.3.8-3.el5    gtk-vnc-python.i386 0:0.3.8-3.el5    vnc-server.i386 0:4.1.2-14.el5_3.1   
  xorg-x11-server-Xvnc-source.i386 0:1.1.1-48.76.el5   

Complete!




你可能感兴趣的:(配置本地yum源--linux5.5)