Build local Yum Source

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.