Linux下安裝SaltStack__Linux

來源:互聯網
上載者:User

一、配置yum源和epel源


epel源下載地址:http://pan.baidu.com/s/1o7NJ26u


1.配置yum源

(1)上傳作業系統鏡像檔案來配置yum源,掛載點目錄為/yum

mkdir  /yum

mount -o loop   CentOS-6.8-x86_64-bin-DVD1.iso   /yum

(2)安裝所需的軟體包

yum -y  install createrepo

yum -y  install vsftpd


2.配置SaltStack所需的epel源(非連網狀態下)

(1)上傳epel源的壓縮包並解壓

tar  -xvf   saltstack-rhel6.tar..gz


(2) 建立目錄,並複製解壓檔案到相應目錄

mkdir -p  /var/ftp/pub

cp -r  /root/rhel6/*  /var/ftp/pub

service vsftpd start


(3)建立repo所需的設定檔,注意這裡的/yum是鏡像掛載點目錄

createrepo -g /yum/repodata/*-comps.xml   /var/ftp/pub/


(4)配置repo檔案

將之前的repo檔案移出/etc/yum.repos.d/目錄,然後建立一個名稱為saltstack.repo的檔案,並填入如下內容:

[saltstack-repo]
name=saltstack-local
baseurl=ftp://192.168.236.100/pub
enable=1
gpgcheck=0


註:192.168.236.100為本機IP


(5)清理yum

yum clean all


二、安裝Master和Minion


1.安裝Master

yum install salt-master salt-cloud salt-ssh salt-syndic -y


2.安裝Minion(需要在用戶端都配置saltstack.repo檔案)

yum install salt-minion salt-cloud salt-ssh salt-syndic -y


3.安裝後SaltStack的位置為/etc/salt


4.在Minion主機的/etc/hosts檔案中添加IP和主機名稱的映射,注意針對Master的IP映射名稱最好為salt,以便和設定檔中保持一致

192.168.236.100 salt

192.168.236.101  SaltStack-Minion


三、啟動Master和Minion


啟動Master: /etc/init.d/salt-master start

啟動Minion: /etc/init.d/salt-minion start


相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.