Get the App
SLTechnology News&Howtos  ›  Servers  › 

Deploy YUM Warehouse Service in cenntOS

Shulou Source: shulou.com Published: 2022-06-02 11:21:49 10月01日 Update

-Overview-

YUM, formerly known as YUP, was originally developed by TSS in Python, and later modified by the Linux development team of Duke University, named YUM

With the help of YUM software warehouse, we can complete the tasks of installing, uninstalling and automatically upgrading rpm software packages, and can automatically find and solve the dependencies between rpm packages, without the need for administrators to install each rpm package one by one, manually, which makes it easier for administrators to maintain Linux. Especially in the local network with a large number of Linux hosts, building a resource server can greatly alleviate the dependence on Internet for software installation, upgrade, etc.

System environment

Two CentOS7Linux, one as the server (providing the software source) and the other as the client (using the software source)

Actual operation

Server configuration

1. First mount the image file to / mnt/ in the client, and check whether the mount is successful.

[root@localhost~] # mount / dev/sr0 / mnt/ [root@localhost~] # df-h

2. Go to the / var/ directory and install the "vsftpd" service using yum networking status

[root@localhost ~] # yum install vsftpd-y

3. Go to the / var/ftp/ directory, create the "centos7" directory, copy the files in the mounted image file / mnt/ to the "centos7", and create the "other" extension directory.

4. After the copy is completed, go to "centos7" and "other" to check whether the file has been added successfully.

[] root@locaihost] # cd centos7/ [root@locaihost centos7] # ls [rootlocaihost centos7] # cd.. / other/ [root@localhost other] # ls [root@localhost other] # cd repodata/ [root@localhost repodata] # ls

5. Turn on the "vsftpd" service while turning off the firewall and security enhancements.

[root@localhost ~] # systemctl start vsftpd [root@localhost ~] # systemctl stop firewalld.service [root@localhost ~] # setenforce 0

6. Install the "ftp" service in the client using yum repository

[root@02 ~] # yum install ftp-y

7. Use ftp service to access the server to check whether you can connect

Ftp 192.168.100.128 ls

8. Exit ftp, go to / etc/yum.repos.d/, to create / bak/ directory, and move all configuration files in yum to / bak/ directory

[root@02 ~] # cd / etc/yum.repos.d/ [root@02 yum.repos.d] # mkdir bak [root@02 yum.repos.d] # mv * .repo bak/

9. When we use the yum repository cache clearly, and then load the installation package, we will find that it is all red (unusable)

[root@02 yum.repos.d] # yum clean all [root@02 yum.repos.d] # yum list

10. Create "centos7.repo" to configure

[base] name=centos7.Packagesbaseurl= ftp://192.168.100.128/centos7enabled=1gpgcheck=1gpgkey=ftp://192.168.100.128/centos7/RPM-GPG-KEY-CentOS-7[other]name=other.Packagesbaseurl=ftp://192.168.100.128/otherenabled=1gpgcheck=0

11. At this time, clear the cache first, and then use yum list to load the package. Install the http service to verify it.

[root@02 yum.repos.d] # yum clean all [root@02 yum.repos.d] # yum list [root@02 yum.repos.d] # yum install httpd-y

Tags: Services directories software files repositories customers clients configurations clarity success company at the same time administrators caches software packages images upgrades development management freedom Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft MySQL macOS Shulou Tech Info Apple