To build a YUM source, first mount the disc to the/mnt directory # mount/dev/cdrom/mnt to completely copy the content from the disc to/var/ftp/pub # cp-rf/ mnt/*/var/ftp/pub enter the default ftp directory # cd/var/ftp/pub # rm-rf *. html [delete all html files] After deleting all html files, such as # yumu
Build YUM source end
First, attach the disc to the/mnt directory.
# Mount/dev/cdrom/mnt
Copy the content on the CD to/var/ftp/pub.
# Cp-rf/mnt/*/var/ftp/pub
Go to the default ftp directory # cd/var/ftp/pub
# Rm-rf *. html [delete all html files]
After deleting all html files, as shown in figure
# Yum update [upgrade the local repo source]
Configure YUM client
Because the *. repo file of the client is no longer provided in RHEL6, We need to manually create the repo File
# Vim/etc/yum. repo/server1.repo [the tentative file name here is server1.repo]
The required editing content is as follows:
[Test]-yum source name, custom name
Name = test-specifies the name of the yum source, which must be consistent with the content in [test ].
Baseurl = ftp: // 172.16.8.2/pub/-- path of the yum Source
For the local source, baseurl = file: // mnt/
Enabled = 1-1 indicates that if the yum source is started, 0 indicates that the yum source is not enabled.
Gpgcheck = 0-0 indicates that the rpm package verification is not performed.
# Yum clean all [clear the cache of the local yum source]
# Yum list [create a local list of yum sources]