第一篇:saltstack安裝與配置html
saltstack官方源國內訪問比較慢,建議使用阿里雲源centos
#centos 6 yum install https://mirrors.aliyun.com/saltstack/yum/redhat/salt-repo-latest-2.el6.noarch.rpm #centos 7 yum install https://mirrors.aliyun.com/saltstack/yum/redhat/salt-repo-latest-2.el.noarch.rpm
#本文的安裝版本 2018.3.2-1.el6 yum install salt-api.noarch salt-master.noarch yum install salt-minion.noarch
salt-masteride
vi /etc/salt/master #日誌模式 log_level: info default_include: master.d/*.conf #是否自動接收salt客戶端祕鑰 auto_accept: True file_roots: base: - /srv/salt/base sit: - /srv/salt/sitsalt-minion阿里雲
vi /etc/salt/minion #'garbage', 'trace', 'debug', info', 'warning', 'error', 'critical' log_level: info master: salt-master-ip multiprocessing: True id: salt-minion-ip建議minion的id採用主機ip形式debug
centos 6日誌
checkconfig salt-master on checkconfig salt-minion on
service salt-master start
service salt-minion startcode
> centos 7
systemctl enable salt-master.service
systemctl enable salt-minion.servicehtm
systemctl start salt-master
systemctl start salt-minionip
### 驗證
#salt master host
salt minion-id test.ping
> 使用salt開始,看的最多的就是官方文檔 > [saltstack官方文檔](https://docs.saltstack.com/en/latest/contents.html)