centos5安装salt-master
本篇文档主要解决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的更多相关文章
- yum简单安装salt master与minion
首先得先安装epel的yum源: rpm -ivh http://mirrors.skyshe.cn/epel/6/x86_64/epel-release-6-8.noarch.rpm 1.SaltS ...
- 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的时候 ...
- 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 ...
- expect 安装 salt 客户端
#!/bin/bash for i in $(cat ./host.txt) do echo $i > ./tmp.txt HOSTNAME=$(cut -d ':' -f1 ./tmp.txt ...
- 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 ...
- Salt Master报错:Minion did not return. [No response]
在salt master端执行salt ‘*’ test.ping时,某一节点出现如下报错:Minion did not return. [No response] 登陆到这一节点查看minion的日 ...
- [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 ...
- 安装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 ...
- The Salt Master has cached the public key报错解决办法
参考:http://www.52devops.com/chuck/814.html 查看salt-minion的运行状态,显示salt-master已经缓存了这个minion,但是minion在重新认 ...
随机推荐
- harris角点检测的学习
Harris通过运用微分运算和自相关矩阵改进了Moravec角点检测算法.用微分算子重新定义灰度强度变化的公式,其灰度强度变化表示为: 式中的wu,v为高斯窗口在(u,v)处的系数.X,Y它们是像素点 ...
- android删除无用资源文件的python脚本
随着android项目的进行,如果没有及时删除无用的资源时安装包会越来越大,是时候整理一下废弃资源缩小压缩包了,少年! 其实判断一个资源(drawable,layout)是否没有被使用很简单,文件名( ...
- wifi万能钥匙自媒体平台开放注册(付注册流程)
12月13日,有网友爆料,wifi万能钥匙自媒体开放注册,看来自媒体还没有达到饱和阶段,也印证了自媒体时代才刚刚到来.现在这个自媒体的时代,几乎大多互联网企业都开通了自己的自媒体,比较知名的像今日头条 ...
- source insight 编程风格(持续更新)
1.字体Source Code Pro 出身于豪门Adobe,从名字上来看就知道是转为编码而生的.基本上也是拥有前面所提的编程字体的所有要素的.这个字体基本上具有编程字体所需的所有要素:等宽.支持Cl ...
- IDEA +maven+ ContextLoaderListener not find
tomcat 启动失败:SEVERE: Context [] startup failed due to previous errors 查看pox.xml 有spring-web依赖 查看tomca ...
- Asp.Net Mvc Areas 的用法与好处
前言 在项目中为什么要使用Areas 进行分离 大家都知道,一般的Web应用都有前台(面向用户)和后台(面向管理员)两部分,我们希望以/localhost/Admin 开始的Url 是用户的后台管理地 ...
- java 基础三 下雪
通过repaint()方法进行重画. import javax.swing.JFrame; import javax.swing.JPanel; import java.awt.Graphics; p ...
- 关于python,一些整理
参数传递 1 a = 1 2 def fun(a): 3 a = 2 4 fun(a) 5 print a 6 7 # 输出: 1 a = [] def fun(a): a.append(1) fun ...
- as3正则表达式
1.新建正则表达式,有两种方式var exp1:RegExp = new RegExp("ABCD","g");var exp2 = /ABCD/g;//g g ...
- LeetCode Find the Celebrity
原题链接在这里:https://leetcode.com/problems/find-the-celebrity/ 题目: Suppose you are at a party with n peop ...