centos7 python3 Saltstack配置


Python安裝完畢后,提示找不到ssl模塊

pip is configured with locations that require TLS/SSL, however the ssl module in python is not available.

缺少OpenSSL,

1 yum 安裝*

yum install openssl-devel -y

2 重新編譯Python3

進入Python的源碼路徑

make&&make install

subprocess

pip3 安裝subprocess 出現下面的問題,實際上Python3 內置了,不需要重新安裝

Could not find a version that satisfies the requirement subprocess (from versions: ) No matching d

安裝saltstack

查看Centos版本 cat /etc/redhat-release

安裝

參考: http://repo.saltstack.com/#rhel

Master

1. 安裝salt-master
    yum install salt-master
2. 修改配置文件:/etc/salt/master
    interface: 0.0.0.0    # 表示Master的IP 
3. 啟動
    service salt-master start

Minion

1. 安裝salt-minion
    yum install salt-minion

2. 修改配置文件 /etc/salt/minion
    master: 10.211.55.4           # master的地址
    或
    master:
        - 10.211.55.4
        - 10.211.55.5
    random_master: True

    id: c2.salt.com                    # 客戶端在salt-master中顯示的唯一ID
3. 啟動
    service salt-minion start

注意:

在修改配置文件的時候,interface master 冒號后面要有空格

查看啟動狀態

systemctl status salt-master systemctl status salt-minion

配置

配置主要是/etc/salt/master 和 /etc/salt/minion

minion要指定指定的IP是主的IP

授權

salt-key -L                    # 查看已授權和未授權的slave
salt-key -A     全部授權   
salt-key -a  salve_id      # 接受指定id的salve
salt-key -r  salve_id      # 拒絕指定id的salve
salt-key -d  salve_id      # 刪除指定id的salve

參考:

http://blog.csdn.net/qq_25560423/article/details/62055497

http://www.cnblogs.com/wupeiqi/articles/6415436.html

http://www.cnblogs.com/Python666/articles/7239096.html


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM