Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Deploy YUM Warehouse Service in cenntOS

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

-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

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report