Master安装
rpm-Uvhhttp://ftp.linux.ncsu.edu/pub/epel/6/i386/epel-release-6-8.noarch.rpm
yuminstallsalt-master
[root@COS-S1~]#chkconfigsalt-masteron
[root@COS-S1~]#servicesalt-masterstart
Startingsalt-masterdaemon:[OK]
Minion
rpm-Uvhhttp://ftp.linux.ncsu.e..
分类:
其他好文 时间:
2015-04-11 21:03:18
阅读次数:
139
执行脚本和命令来更新防火墙配置需求:zabbix-agent服务需调整防火墙,增加端口10050
[root@mastersalt]#catfirewall/init.sls
/home/ops/bin/firewall_add_dport.sh:
file.managed:
-source:salt://firewall/bin/firewall_add_dport.sh
-mode:755
iptables-add-dport:
cmd.r..
分类:
其他好文 时间:
2015-04-10 20:23:01
阅读次数:
250
1,使用crypt()函数进行加密
crypt()函数可以进行单项加密,具体语法如下:
string crypt(string str[,tring salt])
其中 str是要加密的字符串,salt为加密时使用的干扰串,如果省掉第二个参数,就会随机生成一个干扰串。crypt()函数支持四种算法和长度。具体如下表:
示例代码如下:
<?php $str ="I'm jack!!!";
ec...
分类:
Web程序 时间:
2015-04-08 18:02:18
阅读次数:
160
Redis模块路径/usr/lib/python2.6/site-packages/salt/modules/redismod.pyRedis模块会首先检查是否安装有Redis的Python驱动#-*-coding:utf-8-*-
‘‘‘
ModuletoprovideredisfunctionalitytoSalt
..versionadded::2014.7.0
:configuration:Thismodulerequirestheredispythonmod..
分类:
其他好文 时间:
2015-04-05 06:49:09
阅读次数:
285
20.SaltSSH在版本0.17.0当中,引入了新的传输系统,它支持通过SSH通道来实现Salt的通信。通过这种方式,我们可以将Salt
routines直接通过SSH通道在远程主机上执行,而不需要在远程主机上运行SaltMinion,同样的道理,Salt
Master也就不需要运行了。这样,也就实现了免客户端的..
分类:
其他好文 时间:
2015-04-04 01:22:52
阅读次数:
245
遇到的问题如下:root@Saltstack:/etc/salt#salt-key-LAcceptedKeys:UnacceptedKeys:RejectedKeys:root@Saltstack:/etc/salt#salt-master-ldebug[DEBUG]Readingconfigurationfrom/etc/salt/master[DEBUG]UsingcachedminionIDfrom/etc/salt/minion_id:Saltstack.cs2cloud.intern..
分类:
其他好文 时间:
2015-04-03 19:43:02
阅读次数:
607
环境说明操作系统:centos7.0saltmaster/minion/版本2014.7.1Salt-api安装salt-api使用pip安装[root@centos7~]#pipinstallCherryPy
[root@centos7~]#pipinstallsalt-apiSalt-api配置[root@centos7~]#cd/etc/pki/tls/certs/#生成自签名证书,用于ssl
[root@centos7certs]#makete..
discuz 修改超级管理员密码 终极办法就是自己去修改数据库:
1.找到pre_ucenter_members表,获取salt字段的值
2.$pw = ''123456abc; //设置新密码
3.md5(md5($pw).$salt) //计算新密码加密后的字符串
4.把第三步的结果黏贴到数据库password字段
5.完成,新密码登入即可...
分类:
Web程序 时间:
2015-04-03 11:24:16
阅读次数:
116
继续介绍zabbix监控企业应用的实例,本次介绍zabbix监控dns,我监控的dns为bind 9.8.2,本dns为公网dns,是为了解决公司内网服务器自动化所需求的dns解析,比如目前的puppet或者salt软件,如果结合dns,管理起来更方便,对于管理服务器来说,如果搬迁机房或者硬件出现故...
分类:
其他好文 时间:
2015-04-01 12:59:45
阅读次数:
257
logrotate模块用于处理日志文件轮转的相关任务#-*-coding:utf-8-*-
‘‘‘
Moduleformanaginglogrotate.
‘‘‘
#Importpythonlibs
importos
importlogging
#Importsaltlibs
importsalt.utils
log=logging.getLogger(__name__)
default_conf=‘/etc/logrotate.conf‘
#Defineafunc..
分类:
其他好文 时间:
2015-04-01 07:12:40
阅读次数:
252