1、安裝salt-master、salt-minion和salt-api
$ sudo yum install epel-release -y $ sudo yum install salt-master salt-minion salt-api -y # 配置教程請看 文章 。
# 啟動並設置開機啟動服務 $ sudo systemctl start salt-master $ sudo systemctl enable salt-master $ sudo systemctl start salt-minion $ sudo systemctl enable salt-minion $ sudo systemctl start salt-api $ sudo systemctl enable salt-api
3、安裝halite及其依賴文件
$ sudo yum install python-pip -y && sudo pip install --upgrade pip $ sudo pip install -U halite $ sudo pip install cherrypy $ sudo pip install paste $ sudo yum install python-devel gcc -y $ sudo pip install gevent $ sudo pip install pyopenssl
4、在配置文件master
$ sudo vim /etc/salt/master
external_auth:
pam:
testuser: //此用戶設置為系統在用的用戶
- .*
- '@runner'
halite:
level: 'debug'
server: 'cherrypy'
host: '0.0.0.0'
port: '8080'
cors: False
tls: True
certpath: '/etc/pki/tls/certs/localhost.crt'
keypath: '/etc/pki/tls/certs/localhost.key'
pempath: '/etc/pki/tls/certs/localhost.pem'
5、運行命令
$ sudo salt-call tls.create_self_signed_cert tls
6、啟動並設置自啟動服務
$ sudo systemctl restart salt-master $ sudo systemctl restart salt-minion $ sudo systemctl restart salt-api
7、網頁打開訪問地址
https://IP:8080 //登錄用戶為剛剛設置的系統用戶

官方安裝教程:https://docs.saltstack.com/en/latest/topics/tutorials/halite.html
