yum http源
统一集群内,有一个yum本地源即可,集群内其他机器的yum可配成http源
方法:
yum1:本地yum源节点
yum2:集群内其他节点
yum1:
①service httpd start
②mkidr -p /var/www/html/iso
③mount -o /root/*.iso /var/www/html/iso
④
[root@cdh1 conf]# cat /etc/yum.repos.d/rhel-source.repo
[rhel-source]
name=Red Hat Enterprise Linux $releasever - $basearch - Source
baseurl=file:///var/www/html/iso/Server/
enabled=1
gpgcheck=0
⑤检验
yum update
http://localhost:80/iso
yum2:
①
[root@cdh2 ~]# cat /etc/yum.repos.d/rhel-source.repo
[rhel-source]
name=Red Hat Enterprise Linux $releasever - $basearch - Source
baseurl=http://yum1:80/iso/Server/
enabled=1
gpgcheck=0
②检验
yum update