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