第一篇:saltstack安裝與配置

第一篇:saltstack安裝與配置html

saltstack 安裝

saltstack yum 源配置

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

saltstack maser & minion 安裝

#本文的安裝版本 2018.3.2-1.el6
yum install salt-api.noarch salt-master.noarch
yum install  salt-minion.noarch

salt master & minion 簡單配置

salt詳細配置請參考官方指南api

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/sit

salt-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

salt master & minion 啓動

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)
相關文章
相關標籤/搜索