The steps of building a network Yum source
The main content of this article is to explain the steps of building a network Yum. interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn the steps of building a network YumSource.
Procedure: # first set up a local yum
1. Check if there is a mount point
Umount / dev/cdrom
two。 Mount cdrom locally
Mount / dev/cdrom / mnt/
3. Create a directory and copy the mounted software package to this directory
Mkdir / opt/abc
Cp-rf / mnt/* / opt/abc/
4. Build a software repository on the client side and point the path to / opt/abc/
Rm-rf / etc/yum.repos.d/* / / delete all .repo files in order to better read the newly built software repository
5. Create a software repository
Vim / etc/yum.repos.d/yum.repo
[yum] / / Software repository identification
Name=yum / / Software Warehouse description Information
Baseurl= file:///opt/abc / / package path
Enabled=1
Gpgcheck=0 / / package does not check
6. Install the software on the client
Yum repolist / / check the number of packages, warehouse name, and path
Yum clean all / / clear yum cache
Yum-y install httpd / / install httpd software
Yum-y install vstpd / / install vstpd software
# now that the service software has been installed, you can build a network yum
# I'll just briefly talk about how to build a network yum with http services
# first of all, the default path for httpd service is / var/www/html/
# create a path for var/www/html/ to store software packages
Mkdir / var/www/html/abc
Cp-rf / opt/abc/* / var/www/html/abc
Systemctl restart httpd
# create a software repository on the client side
Rm-rf / etc/yum.repos.d * / / Delete all .repo files
# create a software repository on the client side and point to the server / var/wwww/html/abc /
Vim / etc/yum.repos.d/yum2.repo
[yum2]
Name=yum2
Baseurl= http://192.168.177.149/abc/
Enabled=1
Gpgcheck=0
# yum software repository has been built
Yum clean all
Yum repolist
# then you can install the software
Yum-y install package name
At this point, I believe you have a deeper understanding of the "steps to build a network Yum source". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!