linux - 本地yum源镜像中怎么添加缺少源?
天蓬老师
天蓬老师 2017-04-17 16:10:57
0
1
843
天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(1)
迷茫

First of all, you must create a YUM warehouse for machine A. When machine A updates YUM through the external network, it is actually placed on a similar server, but it uses the public network. As for your other servers accessing A to update source C, it is actually the same as A. Accessing the external network is the same, but it is changed to the internal network. The specific process is as follows:
1. Server A
uses root privileges

yum install createrepo

Create the warehouse directory after installation

createrepo -v /var/pub/yum/CentOS/

The above means that the directory of the warehouse is /var/pub/yum/CentOS/. You need to copy the package you want to update to this directory for use by other machines.
Generate repodata data

createrepo -g /var/pub/yum/CentOS/repodata/ /var/pub/yum/CentOS/ 

Enter the /var/pub/yum/CentOS/repodata/ directory

cd /var/pub/yum/CentOS/repodata/

Create a YUM source configuration file

vi localyum.repo    创建一个获取YUM源的配置文件
[localyum] 
name=localyum 
baseurl=ftp://ServerAIP/pub/yum/CentoOS 
enable=1 
gpgcheck=0    这里值为0,意思是不需要认证签名。

2. Server B
Download localyum.repo and put it in the directory /etc/yum.repo.d/
Update and install

yum -clean all
yum update
yum install C

If you don’t understand something, keep asking me, or Google how to make a local yum source server

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template