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在重新认 ...
随机推荐
- 为Office365增加密码过期自动提醒功能
最近有人和我反应,无法查看所有员工的Office365的密码过期时间.最好可以批量查看,如果能在过期前几天发个提醒邮件就更好了. $pw = ConvertTo-SecureString 'your_ ...
- 为什么匿名内部类的参数必须为finalhttp://feiyeguohai.iteye.com/blog/1500108
1) 从程序设计语言的理论上:局部内部类(即:定义在方法中的内部类),由于本身就是在方法内部(可出现在形式参数定义处或者方法体处),因而访问方法中的局部变量(形式参数或局部变量)是天经地义的.是很自 ...
- PHP 创建缩略图
一.成比例缩小图像 <?php /* 创建缩略图 */ $file = __DIR__.'/button.png'; $scale = 0.5; // 比例 $image = ImageCrea ...
- 带你玩转JavaWeb开发之六-mysql基本语法详解及实例(1)
1.1.1 对数据库的表进行操作 1.1.1.1 对数据库中表进行创建 [语法:] create table 表名( 列名 列类型 [列约束], 列名 列类型 [列约束], 列名 列类型 [ ...
- 关于 Pragma 的使用总结
注意:此文乃是本人阅读多个博客文章后,记下的个人认为重点的地方. 参考文章: 参考1 参考2 #Pragma mark - 用于分离类中的不同功能的方法.(例如,一个 viewController ...
- PowerDesigner中表名过长,自动生成的主键名截取的问题
在PowerDesinger中,若表名过长,自动生成的主键名会被自动截取. 解决如下:DataBase/Edit Current DBMS/Scripts/Objects/PKey/ConstName ...
- 去掉无用的多余的空格(string1.前后空格,2.中间空格)
1.使用NSString中的stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]方法只是去掉左右两边的空格: ...
- Renci.SshNet在Linux运维的应用
SSH.NET是一个.net的SSH应用库,支持并发.该库最新的代码可以从github上下载下来,比Sharp.SSH更新的频繁.它可以模拟ssh登陆,类似xshell.putty等工具.不过有更多的 ...
- visual studio 2015 + Cordova 开发环境搭建
简单的写一些,备忘,太折腾了,特别是通过代理上网的我们国内的开发者 1.当然是安装Visual Studio 2015,别忘了选择Tools For Apache Cordova. 对于通过Proxy ...
- 显示textarea内容的时候没有自动换行
显示textarea内容的时候没有自动换行,网上找了好久,在一个论坛里找到解决方法: 1.把从数据库读出来的内容存放在一个Div内,例如: <div class="new-commen ...