本篇文档主要解决2个问题:

1. centos5通过yum安装的master版本肯定低于centos6安装的minion,所以必须升级salt-master

2. zeromq版本太低会报这个错

2014-10-29 14:36:04,597 [salt.master      ][WARNING ] You have a version of ZMQ less than ZMQ 3.2! There are known connection keep-alive issues with ZMQ < 3.2 which may result in loss of contact with minions. Please upgrade your ZMQ!

通过pip安装salt-master之前需要先安装zeromq,因为yum安装的版本太低,启动salt-master会出现上面那个警告,然后master就退出了

源码编译安装zeromq

wget http://download.zeromq.org/zeromq-3.2.5.tar.gz

解压后,通用的编译安装步骤就可以了

cd zeromq-3.2.5
.configure && make && make install

然后pip安装pyzmq

/usr/local/python/bin/pip install pyzmq --install-option="--zmq=/usr/lib"

安装salt

/usr/local/python/bin/pip install salt

这样salt是安装在python的bin目录中

/usr/local/python/bin/
|-- 2to3
|-- django-admin
|-- django-admin.py
|-- django-admin.pyc
|-- easy_install
|-- easy_install-2.7
|-- idle
|-- pip
|-- pip2
|-- pip2.7
|-- pydoc
|-- python -> python2
|-- python-config -> python2-config
|-- python2 -> python2.7
|-- python2-config -> python2.7-config
|-- python2.7
|-- python2.7-config
|-- salt
|-- salt-call
|-- salt-cloud
|-- salt-cp
|-- salt-key
|-- salt-master
|-- salt-minion
|-- salt-run
|-- salt-ssh
|-- salt-syndic
`-- smtpd.py

这样通过python的pip安装的salt是没有启动脚本的,这里附上启动脚本(yum安装的salt-master启动脚本在/etc/init.d/salt-master)

#!/bin/bash
#
# salt master startup system-v script DEBIAN_VERSION=/etc/debian_version
SUSE_RELEASE=/etc/SuSE-release
# Source function library.
if [ -f $DEBIAN_VERSION ]; then
break
elif [ -f $SUSE_RELEASE -a -r /etc/rc.status ]; then
. /etc/rc.status
else
. /etc/rc.d/init.d/functions
fi SALTMASTER=/usr/local/python/bin/salt-master
python=/usr/local/python/bin/python
SERVICE=salt-master
PROCESS=salt-master start() {
echo -n 'starting salt-master daemon:'
daemon --check $SERVICE $SALTMASTER -d
RETVAL=$?
echo
return $RETVAL
} stop() {
echo -n 'stoping salt-master daemon:'
killproc $PROCESS
RETVAL=$?
echo
} restart() {
stop
start
} case "$1" in
start|stop|restart)
$1
;;
status)
if [ -f $SUSE_RELEASE ]; then
echo -n "Checking for service salt-master "
checkproc $SALTMASTER
rc_status -v
elif [ -f $DEBIAN_VERSION ]; then
if [ -f $LOCKFILE ]; then
RETVAL=0
echo "salt-master is running."
else
RETVAL=1
echo "salt-master is stopped."
fi
else
status $PROCESS
RETVAL=$?
fi
;;
condrestart)
[ -f $LOCKFILE ] && restart || :
;;
reload)
echo "can't reload configuration, you have to restart it"
RETVAL=$?
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart|reload}"
exit 1
;;
esac
exit $RETVAL

centos5安装salt-master的更多相关文章

  1. yum简单安装salt master与minion

    首先得先安装epel的yum源: rpm -ivh http://mirrors.skyshe.cn/epel/6/x86_64/epel-release-6-8.noarch.rpm 1.SaltS ...

  2. 03_已解决 [salt.master :2195][ERROR ][6219] Failed to allocate a jid. The requested returner 'mysql' could not be loaded.

    总结: 对于python2.7环境下的salt来说,要安装pip install mysql-python 对于python3环境下的salt来说,pip install mysqlclient的时候 ...

  3. Salt: Master server cannot see any Minion

    Issue: When you set up a Salt Master server and several Minions, you may find that none of minions c ...

  4. expect 安装 salt 客户端

    #!/bin/bash for i in $(cat ./host.txt) do echo $i > ./tmp.txt HOSTNAME=$(cut -d ':' -f1 ./tmp.txt ...

  5. The Salt Master has rejected this minion's public key!

    salt查看日志: salt --log-level=all "10.199.165.244" state.highstate 进入调试模式: salt-minion -l deb ...

  6. Salt Master报错:Minion did not return. [No response]

    在salt master端执行salt ‘*’ test.ping时,某一节点出现如下报错:Minion did not return. [No response] 登陆到这一节点查看minion的日 ...

  7. [ERROR ] The Salt Master has cached the public key for this node, this salt minion will wait for 10 seconds before attempting to re-authenticate

    2.salt master已缓存此节点的公钥,此salt minion将等待10秒,然后再尝试重新验证. [ERROR ] The Salt Master has cached the public ...

  8. 安装hma master出错 Error: Package: perl-Mail-Sender-0.8.13-2.el5.1.noarch

    You are using the EPEL 5 version of the repo instead of 6, go into your /etc/yum.repos.d/epel.repo f ...

  9. The Salt Master has cached the public key报错解决办法

    参考:http://www.52devops.com/chuck/814.html 查看salt-minion的运行状态,显示salt-master已经缓存了这个minion,但是minion在重新认 ...

随机推荐

  1. HDU 1166 敌兵布阵(分块)

    敌兵布阵 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submi ...

  2. bootstrap 3 中表单元素的写法 ---- 重点是 input file 元素的

    我们知道file元素,因为有许多的插件可以使用,往往我们不需要写样式,但是如果要求我们自己写样式(利用bootstrap 3)实现一个file极简样式如何写呢? 下面我们先来看看整个表单的样子! 重点 ...

  3. POJ2965

    #include <stdio.h> char map[4][4]; int map1[4][4]; int map2[4][4]; int num[16]; int min=1000,n ...

  4. js 图片加载完后的处理事件

    //图片加载完成后再显示页面 document.getElementById('icon').onload=function(){ document.getElementById('wrap').st ...

  5. 发布Live Writer代码着色插件CNBlogs.CodeHighlighter

    在解决了使用Windows Live Writer发博所遇到的"建分类.加标签.写摘要"与"设置EntryName"的四个问题之后,我们趁热打铁,解决了第五个问 ...

  6. QQ五笔词库转拼音词库小工具

    参考文章<用QQ拼音打五笔>中提供的信息而制作的小工具,功能是将QQ五笔导出词库文件转换为QQ拼音自定义短语使用的.ini格式文件,这样就可以使用QQ拼音进行五笔拼音混输了. 混输效果不错 ...

  7. SVN File Name Case Sensitivity--SVN大小写问题

    from:http://www.visualsvn.com/support/topic/00019/ Windows has a case-insensitive file system. Unix ...

  8. 在CentOS下自动备份mysql

    在CentOS下自动备份mysql数据库,并差异同步到其它网络主机上 1.在/root/mysql_backup/下添加backup.sh:vim /root/mysql_backup/backup. ...

  9. Quartz 入门详解

    Quartz是OpenSymphony开源组织在Job scheduling领域又一个开源项目,它可以与J2EE与J2SE应用程序相结合也可以单独使用.Quartz可以用来创建简单或为运行十个,百个, ...

  10. RDIFramework.NET-.NET快速信息化系统开发整合框架 【开发实例 EasyUI】之产品管理(MVC版)

    RDIFramework.NET—.NET快速开发整合框架 [开发实例]之产品管理(MVC版) 接上篇:RDIFramework.NET (.NET快速信息化系统开发整合框架) [开发实例]之产品管理 ...