首页 > 其他 > 详细

saltstack之(一)系统环境及本地yum源

时间:2016-05-11 16:41:35      阅读:239      评论:0      收藏:0      [点我收藏+]

1.服务器环境
node1:192.168.3.1
node2:192.168.3.2

2.主机名和hosts文件
node1: node1.xkops.com --主机名
[root@node1 ~]# tail -n 2 /etc/hosts
192.168.3.1 node1.xkops.com
192.168.3.2 node2.xkops.com

node2: node2.xkops.com --主机名
[root@node2 ~]# tail -n 2 /etc/hosts
192.168.3.1 node1.xkops.com
192.168.3.2 node2.xkops.com

3.关闭防火墙和selinux
node1:
service iptables stop
chkconfig iptables off
sed -i ‘/^SELINUX/s;enforcing;disabled;g‘ /etc/selinux/config
setenforce 0

node2:
service iptables stop
chkconfig iptables off
sed -i ‘/^SELINUX/s;enforcing;disabled;g‘ /etc/selinux/config
setenforce 0

4.配置本地yum源
node1:
mount /dev/sr0 /mnt
cd /etc/yum.repos.d/
mkdir backup && mv CentOS-* backup
[root@node1 yum.repos.d]# cat > CentOS-mnt.repo <<EOF
[CentOS6.5]
name=CT 6.5
baseurl=file:///mnt
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
EOF
[root@node1 yum.repos.d]# yum repolist
Loaded plugins: fastestmirror, refresh-packagekit, security
Determining fastest mirrors
repo id repo name status
CentOS6.5 CT 6.5 6,367
repolist: 6,367

node2:
mount /dev/sr0 /mnt
cd /etc/yum.repos.d/
mkdir backup && mv CentOS-* backup
[root@node2 yum.repos.d]# cat > CentOS-mnt.repo <<EOF
[CentOS6.5]
name=CT 6.5
baseurl=file:///mnt
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
EOF
[root@node2 yum.repos.d]# yum repolist
Loaded plugins: fastestmirror, refresh-packagekit, security
Determining fastest mirrors
repo id repo name status
CentOS6.5 CT 6.5 6,367
repolist: 6,367

saltstack之(一)系统环境及本地yum源

原文:http://www.cnblogs.com/xkops/p/5482256.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!