码迷,mamicode.com
首页 > 其他好文 > 详细

SaltStack之安装

时间:2016-05-31 22:19:26      阅读:136      评论:0      收藏:0      [点我收藏+]

标签:

环境:

安装环境:centos6.5 x64
master:192.168.0.23
minion:192.168.0.24

安装epel源

/etc/init.d/iptables stop
sed -i ‘/SELINUX/s/enforcing/disabled/g‘ /etc/selinux/config 

wget http://ftp.riken.jp/Linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm 
rpm -ivh epel-release-6-8.noarch.rpm

master安装:
yum -y install salt-master salt-minion
chkconfig salt-master on
minion安装
yum -y install salt-minion
chkconfig salt-minion on

配置salt-master

user: root
worker_threads: 5
publish_port: 4505
worker_threads: 5
pidfile: /var/run/salt-master.pid
users:
- root
file_roots:
base:
- /srv/salt/
dev:
- /srv/salt/dev/
log_file: /var/log/salt/master

配置salt-master

user: root
master : 192.168.0.23
id: node24.com
master_port: 4506
log_file: /var/logs/salt_minion.log

启动salt

master
service salt-master restart

minion
service salt-minion restart

注意: saltstack 是使用python2的语言编写,对python3的兼容性不好,请使用python2的环境

salt认证

master上查看认证

# salt-key 
Accepted Keys:
Denied Keys:
Unaccepted Keys:
node24.com
Rejected Keys:

salt-key -y -a node24.com #添加单个key

# salt-key 
Accepted Keys:
node24.com
Denied Keys:
Unaccepted Keys:
Rejected Keys:

测试salt

salt ‘*‘ test.ping 
node24.com:
True
node23.com:
True

由此安装完成

?

SaltStack之安装

标签:

原文地址:http://www.cnblogs.com/iteemo/p/5547692.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!