Yum is easy to install, but only if it is connected to the Internet. If in the LAN environment, how to build a local Yum source?
Yum Service side
In this case, the Rhel operating system as an example, specific to the actual
Log in to the operating system using the root user
1. Mount the operating system disk
Mount-o Loop rhel-server-6.6-x86_64-dvd.iso/mnt/
2. Copy the RPM package from the disc to the local
Cd/mnt/cp-r packages/~/ftp/
3. Install FTP server
CD ~/FTP/PACKAGESRPM-IVH vsftpd-2.2.2-12.el6_5.1.x86_64.rpm
4. Modify the configuration file
Vi/etc/vsftpd/vsftpd.conf
Add the following, the path to the Anon_root is the path where the packages package directory resides.
Anon_root=/root/ftp
Anon_upload_enable=no
5. Start the FTP
Service VSFTPD Start
6. Turn off the firewall and turn off SELinux
Service iptables Stopsetenforce 0
7. Installing the Creatrepo tool
CD ~/FTP/PACKAGESRPM-IVH DELTARPM-3.5-0.5.20090913GIT.EL6.X86_64.RPMRPM-IVH python-deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm RPM-IVH createrepo-0.9.9-22.el6.noarch.rpm
8. Create repo source, wait a while
Cd/root/ftpcreaterepo.
9. Restart the FTP
Service VSFTPD Restart
Entering Ftp://XX.XX.XX.XX in the browser to see the corresponding packages and Repodata directories proves that the FTP configuration is
Yum Client
1. Back up the original source
Cd/etc/yum.repos.dmkdir bkupmv *.repo Bkup
2. Modify the configuration,
[Local-source]
Name=localsource
baseurl=ftp://xx.xx.xx.xx
Enabled=1 #开启使用
Gpgcheck=0 #关闭gpg检查
And then Yum list to see if there's a normal output.
This article from the "Ha-ha" blog, please be sure to keep this source http://10452483.blog.51cto.com/10442483/1769737
Build local Yum Source