MCollective 安裝配置

MCollective 的對服務對重啓速度要比puppet 管理效率高對多,個人20臺系統重啓syslog 只花了不到10s的速度,真的是很爽。 centos

 其實安裝比較簡單 ide

 server 端安裝: rest

 首先要確保puppet yum 源在,沒有的話請安裝,以下(redhat六、centos6): server

 rpm -ivh http://yum.puppetlabs.com/el/6/products/x86_64/puppetlabs-release-6-6.noarch.rpm xml

 yum install mcollective-* -y
 yum install activemq activemq-info-provider -y rem

 配置 activemq: rpc

 vi /etc/activemq/activemq.xml it

找到 authenticationUser 修改用戶名和密碼:默認是:admin,secret io

找 到 transportConnector 修改其中的 name="stomp+nio" uri="stomp+nio://0.0.0.0:6163"/& gt; 爲 name="stomp" uri="stomp://0.0.0.0:6163"/>便可。 test

vi /etc/mcollective/server.cfg

plugin.stomp.host = localhost  ##如做爲客戶端的話。須要修改這裏,指向mcoolective的IP。
plugin.stomp.user = mcollective ##這個是activemq.xml裏的用戶名
plugin.stomp.password = secret  ##這個是activemq.xml裏定義的密碼


vi /etc/mcollective/client.cfg

plugin.stomp.host = localhost  ##如做爲客戶端的話。須要修改這裏,指向mcoolective的IP。
plugin.stomp.user = mcollective ##這個是activemq.xml裏的用戶名
plugin.stomp.password = secret  ##這個是activemq.xml裏定義的密碼


/etc/init.d/activemq  start 
/etc/init.d/mcollective start 

chkconfig mcollective on

chkconfig activemq on

client 安裝配置:

 yum install mcollective-* -y

vi /etc/mcollective/server.cfg

plugin.stomp.host = 192.88.53.104 ##指向mcoolective的IP。
plugin.stomp.user = mcollective ##這個是activemq.xml裏的用戶名
plugin.stomp.password = secret  ##這個是activemq.xml裏定義的密碼


vi /etc/mcollective/client.cfg

plugin.stomp.host =192.88.53.104  ##指向mcoolective的IP。
plugin.stomp.user = mcollective ##這個是activemq.xml裏的用戶名
plugin.stomp.password = secret  ##這個是activemq.xml裏定義的密碼


/etc/init.d/mcollective  start 
chkconfig mcollective on


在 server 端執行:

mco find 或者是mco ping 便可找到client


其餘使用命令:

重啓 syslog 服務: mco service syslog restart 

安裝軟件:mco package -v install screen ##-v  顯示詳細信息

建立文件:mco rpc filemgr touch file=/tmp/test.txt
刪除文件:mco rpc filemgr -v remove file=/tmp/test.txt

查看文件狀態:mco rpc filemgr status file=/etc/puppet/puppet.conf

幫助: mco help 

相關文章
相關標籤/搜索