MCollective 安装配置

MCollective 的对服务对重启速度要比puppet 管理效率高对多,我的20台系统重启syslog 只花了不到10s的速度,真的是很爽。

 其实安装比较简单

 server 端安装:

 首先要确保puppet yum 源在,没有的话请安装,如下(redhat6、centos6):

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

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

 配置 activemq:

 vi /etc/activemq/activemq.xml

找到 authenticationUser 修改用户名和密码:默认是:admin,secret

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

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 


转载于:https://my.oschina.net/u/142602/blog/115369

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值