Use a CentOS DVD to create an internal Yum installation source.

Source: Internet
Author: User

Use a CentOS DVD to create an internal Yum installation source.

Linux: CentOS

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/mnt
Sudo mkdir-p/var/www/html/yum_repos/CentOS6.6
Sudo 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/bak
Sudo 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-repo
Baseurl = http: // <yum_host>/yum_repos/CentOS6.6/Packages
Enabled = 1
Gpgcheck = 0
Priority = 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.

How to Set DVD as the default yum source in CentOS

RedHat 6.2 modify yum source in Linux use CentOS source for free

Configure the epel yum Source

Redhat local yum source configuration

Description of yum configuration file

Install yum in RedHat 6.1)

YUM installation and cleaning

Build yum local source on CentOS 6.4

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.