The local Yum server can be used as the internal installation source, which greatly facilitates the installation of system software packages.
This article describes the following:
A. how to configure the local Yum Server
B. use ftp to provide Yum source Service
C. Use http to provide Yum source Service
D. Client Configuration
Local Yum source configuration
A. server Installation. In this case, the environment is centos 6.5 and the installation mode is basic server. The only thing to note is the disk space. As the source file, you need to store various installation source files, system space is a requirement.
In this environment, the disk is 100 Gb. In addition to the swap space, all the others are provided to the/directory. Of course, if you want to separate them, you can consider giving the/var directory more space. After all, FTP and WWW are all under this directory.
B. After the system is installed, use the CD to create the local source:
Mount/dev/sr0/media # mount the optical drive to the/media directory;
Go to the/etc/yum. repo/directory, which stores the default Yum source configuration file of the system.
[[Email protected] ~] # Cd/etc/yum. repo/
[[Email protected] yum. Repo] # mkdir Bak # create a Bak directory for backing up the built-in configuration file of the system;
[[Email protected] yum. Repo] # mv *. Repo./bak # Move to the Bak directory;
[[Email protected] yum. Repo] # vi centos. Repo # create the centos. Repo directory
C6-media
Name = centos-$ releasever-Media
Baseurl = file: // media # specify the source file path, which is in the/media directory;
Gpgcheck = 0 # disable the GPG check;
Enabled = 1# Enable
After saving,
Use Yum clean all to clear the system Yum cache;
Update using Yum update;
At this point, the local source has been established.
This article is from "tomorrow's tomorrow" blog, please be sure to keep this source http://66585.blog.51cto.com/56585/1549704
Build a local Yum server in centos