Build local CD source
1. Mount the local CD under /mnt, mount /dev/cdrom /mnt
2 , Create your own source file in the /etc/yum.repos.d/ directory. The file name is customized and must end with repo,
3. At this time, put / Back up the original files under etc/yum.repos.d/ to another directory, and then use the local CD source
Build HTTP LAN source
1. Mount the CD source, mount /dev/cdrom /mnt
2. Copy all rpm packages under the CD to the http release directory, for example: cp -R /mnt/Packages/* /var/www/html/centos/
3. Use createrepo to create HTTP source information, createrepo centos/ If there is no command, install yum install -y create*
4. Create HTTP source information completed After that, just test it on another client machine.
5. On another client, back up the files under /etc/yum.repos.d/ to another place, edit the file above, and then close Open /etc/resolv.conf (DNS), test in time
and attach widgets; Install third-party sources yum install -y epel-release
## Change to el7
The above is the detailed content of Detailed explanation of Linux software management and building local source examples. For more information, please follow other related articles on the PHP Chinese website!