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