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

How to create offline YUM Warehouse in Local area Network

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

Share

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

Xiaobian to share with you how to create a local area network within the offline YUM repository, I believe most people do not know how to share this article for your reference, I hope you read this article after a great harvest, let us go to understand it!

use the Web server

First install the Web server (Apache) on the Yum server, assuming the server IP is 192.168.1.100. We have configured the Yum repository on this system. Now let's install the Apache Web server using the yum command.

$ yum install httpd

Next, copy all rpm packages to the default Apache root directory,/var/www/html. Since we have copied packages to/YUM, we can also create a soft link from/var/www/html to/YUM.

$ ln -s /var/www/html/Centos /YUM

Restart the Web server and apply changes:

$ systemctl restart httpd configure client machine

The configuration of the server is complete. Now we need to configure the client to obtain the upgrade package from the offline Yum we created. Here, we assume that the client IP is 192.168.1.101.

Create an offline-yum.repo file in/etc/yum.repos.d and enter the following information

$ vi /etc/yum.repos.d/offline-yum.reponame=Local YUMbaseurl=http://192.168.1.100/CentOS/7gpgcheck=0enabled=1

The client is also finished. Try installing/upgrading packages with yum to make sure the repository is working properly.

Using FTP Server

To share Yum over FTP, you first need to install the required package, vsftpd.

$ yum install vsftpd

The default root directory for vsftp is/var/ftp/pub, so you can copy the rpm package to this directory or create a soft connection to it:

$ ln -s /var/ftp/pub /YUM

Restart Service Application Changes:

$ systemctl restart vsftpd configure client machine

As above, create the offline-yum.repo file in/etc/yum.repos.d and enter the following information,

$ vi /etc/yum.repos.d/offline-yum.repo[Offline YUM]name=Local YUMbaseurl=ftp://192.168.1.100/pub/CentOS/7gpgcheck=0enabled=1 The above is "How to create an offline YUM repository within a local area network" All the contents of this article, thank you for reading! I believe that everyone has a certain understanding, hope to share the content to help everyone, if you still want to learn more knowledge, welcome to pay attention to the industry information channel!

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