Centos6.4安装saltstack

测试在一台机器完成,如需客户端主机,请独立安装salt-minion
安装EPEL源
rpm -ivh http://dl.fedoraproject.org/pub/epel/6Server/x86_64/epel-release-6-8.noarch.rpm

安装api及ui界面
yum install salt salt-master salt-minion salt-api python-halite

编辑配置文件
vi /etc/salt/master
interface: 0.0.0.0

vi /etc/salt/minion
#sed -i ‘s/#master: salt/master: 127.0.0.1/’ /etc/salt/minion
启动服务
/etc/init.d/salt-master start
/etc/init.d/salt-minion start

添加界面到配置文件末尾,重新启动master
vi /etc/salt/master
halite:
level: ‘debug’
server: ‘cherrypy’
host: ‘0.0.0.0’
port: ’80’
cors: False
tls: False
certpath: ‘/etc/pki/tls/certs/localhost.crt’
keypath: ‘/etc/pki/tls/certs/localhost.key’
pempath: ‘/etc/pki/tls/certs/localhost.pem’

external_auth:
pam:
salt:
_ ‘*’

添加salt系统账户,用于登录web ui。
/etc/init.d/salt-master restart

列出要注册的主机
salt-key -L
全部允许
salt-key -A

测试
salt ‘*’ test.ping

登录web ui测试
http://IP
salt账户密码登陆。