class=”markdown_views prism-atom-one-dark”>
1. Introduction to yum
(1) Introduction to yum
Yum can automatically download and install RPM packages from a designated server. It can automatically resolve dependencies and install all dependent software packages at once, eliminating the need to download and install them again and again. yum provides commands to find, install, and delete a certain, a group, or even all software packages, and the commands are concise and easy to remember.
(2) yum software warehouse configuration file (/etc/yum.reops.d/rhel-source.repo)
All information about yum is stored in a configuration file called yum.reops.d directory, usually located in the /etc/yum.reops.d directory. The rhel-source.repo file in this directory is The configuration file of the yum software repository; the following experiments are based on the modification of this configuration file;
Among them:
- name=Red Hat Enterprise Linux —–>Specific yum source name
- baseurl —–>Mirror server address, only the specific address can be written;
- enabled=1 —–>Enable the warehouse, 1 means enabled, 0 means disabled;
- gpgcheck=1—->Use the public key to check the correctness of the rpm, 0 means disabled;
- gpgcheck—->If it is 1, the downloaded rpm will be verified by gpg. The verification key is gpgkey. Generally, your own yum source does not need to be checked.
2. Build a YUM software warehouse based on file (local), ftp service and http service
(1) Local-based Yum software repository
1.1> Configure IP and restart network service;
1.2> View the configured IP address;
1.3> Mount: Mount /dev/sr0 Go to the /mnt directory;
1.4> Modify the yum configuration file;
- baseurl=file:///mnt ——–> Change the mirror server address to the local yum source address;
1.5> Test whether the local yum software repository is established successfully;
1.6> For testing, use yum local warehouse to install the service;
(2) yum software warehouse based on ftp service
2.1> Experimental environment:
Server IP: 192.168.10.10
.
Client IP: 192.168.10.20
2.2> Configure the server IP and restart the network service
2.3> View the configured server IP address;
2.4> Configure the client IP and restart the network service;
2.5> View the configured IP address;
2.6> Install the ftp service on the server and start it;
2.7> Check whether the FTP service is running normally
2.8> Mount /dev/sr0 to the /mnt directory;
2.9> Create the folder rhel6.5 in the /var/ftp directory, and copy the mounting file to the folder
2.10> In the client, open the rhel-source.repo file and copy The rhel-source.repo file is modified as follows;
2.11> Test whether the yum software warehouse is successfully established;
2.12> For testing, use the yum warehouse to install the service;
(3) yum software warehouse based on http service
3.1> Experimental environment
Server: IP address 192.168.10.10
Client: IP address 192.168.10.20
3.2> Configure the server IP and restart the network service;
3.3> View the server IP after configuration
3.4> Configure the client IP and restart the network service;
3.5> View the configured client network card information;
3.6> Install the http service on the server side and start it;
3.7> Check whether the http service is running normally;
3.8> Mount /dev/sr0 to the /mnt directory;
3.9> Create the folder rhel6.5 in the /var/www/html/ directory, and copy the mounting file to the folder
3.10> In the client, open the rhel-source.repo file. And make the following modifications to the rhel-source.repo file;
3.11> Test whether the yum software warehouse is established successfully;
3.12> For testing, use the yum warehouse to install the service;