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在重新认 ...
随机推荐
- 一段可以清理NSArray中的空对象的代码(递归)
- (NSArray *)clearAllNullObject{ NSMutableArray *array = [self mutableCopy]; ;i < array.count;i++ ...
- Theos 工程
一.tweak 工程 1.创建步骤 a) terminal cd 到想要存放项目的目录下 b) 按图步骤完成即可 二.工程文件描述 1.control 记录 deb 包管理系统所需的基本信息. 2.a ...
- IT人可以关注的站
问答平台 知乎 很杂但很专业的社区,就像标题说的:与世界分享你的知识.经验和见解 segmentfault 专业面向开发者的中文技术问答社区 德问 编程社交问答 V2EX 可以看到很多有意思对我这种I ...
- 保证唯一的一种js提交数据方式,还不错
<div class="project_right"> <div class="project_title_right" id="m ...
- dynamoDb aws config aws_access_key_id aws_secret_access_key golang
how to set aws_access_key_id awscfg := aws.NewConfig().WithRegion(config.Region).WithCredentials(cr ...
- CSS之viewport 1
在这个迷你系列的文章里边我将会解释viewport,以及许多重要元素的宽度是如何工作的,比如<html>元素,也包括窗口和屏幕. 这篇文章是关于桌面浏览器的,其唯一的目的就是为移动浏览器中 ...
- java类初始化的过程
在复习Thinking in java的过程中看到了相关内容,顺便整理一下,像下面一样的代码具体的执行顺序(ABCD都是类) public class A { public A(String text ...
- async 和 await小结
三大返回值: 返回类型 - Task<TResult> 返回类型 - Task 返回类型 - void 当你添加 async 关键字后,需要返回一个将用于后续操作的对象,请使用 Task& ...
- 用Merge来改写相关更新的例子
下面的两个SQL是等价的,但是一个执行N小时都执行不完,一个花了一分钟. 执行计划显示第一个语句是由外面的即将被更新的表驱动内层,相对于是一个NEST LOOP,cost非常大.第二个语句是内层单独执 ...
- Tyrion中文文档(含示例源码)
Tyrion是一个基于Python实现的支持多个WEB框架的Form表单验证组件,其完美的支持Tornado.Django.Flask.Bottle Web框架.Tyrion主要有两大重要动能: 表单 ...