Use CentOS DVD production company YUM installation source, centosyum

Source: Internet
Author: User

Use CentOS DVD production company YUM installation source, centosyum

Link: http://blog.csdn.net/kongxx/article/details/43821421


Assume that two machines are used for simulation. One machine is used as the YUM installation source, and the other machine is used as the testing machine.

1. First, we use the http source as the YUM installation source. Therefore, we need to first ensure that apache has been installed on the machine. If not, we can use "sudo yum install httpd" for installation. After installation, you can use "sudo service httpd start" to start the service.

2. Create a YUM installation Source
sudo mount -t auto -o loop CentOS-6.6-x86_64-bin-DVD1.iso /mntsudo mkdir -p /var/www/html/yum_repos/CentOS6.6sudo ln -s /mnt Packages

3. Access the following address in a browser. If you can see the file list, it indicates that the YUM server has been set up.
Http: // <yum_host>/yum_repos/CentOS6.6/Packages

4. To ensure that the YUM source created by ourselves is used, we first back up "/etc/yum. repos. d/*. repo" on the test machine.
sudo mkdir -p /etc/yum.repos.d/baksudo mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/bak/

Create your own repo file, for example, "my. repo". The file content is as follows:
[my-repo]name=my-repobaseurl=http://<yum_host>/yum_repos/CentOS6.6/Packagesenabled=1gpgcheck=0priority=1

<Yum_host> points to the name or IP address of the YUM source machine we set up earlier.

5. Test
Run "sudo yum list" on the test machine to view the rpm package list on the YUM source we set up. You can also use "sudo yum install <PACKAGE>" to install the software PACKAGE.


Related Article

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.