Just started to learn, as a note to record what you learn
I. Mounting documents
Put the ISO file in the virtual machine, you can choose to share the file or upload it through a Linux-connected tool.
My uploads are in/root/centos-6.6-x86_64-bin-dvd1.iso.
Create Mount Location: Mkdir/root/iso
Mount image file: Mount-o loop/root/centos-6.6-x86_64-bin-dvd1.iso/root/iso/
Second, modify the Yum configuration file to install Createrepo
To back up the Yum file:
cd/etc/yum.repos.d/
Rename repo end of file: Rename. Repo. Repo.bak *
Copy a file to configure the Yum Source: CP Centos-base.repo.bak Centos-local.repo
Modify configuration Centos-local.repo file: Vim Centos-local.repo content as follows
[CENTO6.6-DVD1]
Name=centos-local
Baseurl=file:///root/iso
Enabled=1
Gpgcheck=1
Gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-centos-6
Empty yum Source: Yum Clean all
View Yum Source: Yum Repolist All
Install httpd and Createrepo separately using the Yum installation software:
Yum Install-y httpd
Yum Install-y Createrepo
Third, copy the Packas package to Apache Path
Toggle Path: cd/var/www/html
Create file: mkdir centos6.6
Copy packages:cp-r/root/iso/packages//var/www/html/centos6.6/
Iv. starting the Apache Server service
Viewing httpd Status: Services httpd status
Modify the Centos-local.repo configuration file: Baseurl=file:///root/iso change to Http://192.168.146.233/centos6.6/Packages/
Shut down firewall: Service iptables stop
Start httpd Services: Service httpd start
Web Access httpd startup is normal: http://192.168.146.233/centos6.6/Packages/
Switch to Packages directory: cd/var/www/html/centos6.6/packages/
#开始制作repodata数据: Createrepo. (Note: There is a "." In the back of the Createrepo)
Empty yum Source: Yum Clean all
View Yum Source: Yum Repolist All
Yum source has available packages then make it complete
Other machines to use this yum installation package, just modify the BaseURL path of the Centos-local.repo file in/etc/yum.repos.d/to point here, so you don't have to access the network on every machine.
Linux learning a----------Linux making local Yum source