<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[静怡家园]]></title> 
<link>http://www.zhanghaijun.com/index.php</link> 
<description><![CDATA[书山有路勤为径，学海无涯苦作舟！]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[静怡家园]]></copyright>
<item>
<link>http://www.zhanghaijun.com/post//</link>
<title><![CDATA[CentOS 下快速安装saltstack]]></title> 
<author>碟舞飞扬 &lt;webmaster@zhanghaijun.com&gt;</author>
<category><![CDATA[Linux技术]]></category>
<pubDate>Mon, 16 Jun 2014 09:10:41 +0000</pubDate> 
<guid>http://www.zhanghaijun.com/post//</guid> 
<description>
<![CDATA[ 
	一、下载安装epel源<br/>CentOS 6.x<br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content"><br/>1、32位系统<br/>rpm -Uvh http://mirrors.sohu.com/fedora-epel/6/i386/epel-release-6-8.noarch.rpm<br/>2、64位系统<br/>rpm -Uvh http://mirrors.sohu.com/fedora-epel/6/x86_64/epel-release-6-8.noarch.rpm<br/></div></div><br/>CentOS 5.x<br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content"><br/>1、32位系统<br/>rpm -Uvh http://mirrors.sohu.com/fedora-epel/5/i386/epel-release-5-4.noarch.rpm<br/>2、64位系统<br/>rpm -Uvh http://mirrors.sohu.com/fedora-epel/5/x86_64/epel-release-5-4.noarch.rpm<br/></div></div><br/><br/>二、安装master<br/>yum -y install salt-master<br/><br/>2.1、修改配置文件中的监听IP：<br/>vi /etc/salt/master<br/>把14行的#interface: 0.0.0.0修改为你的内网IP或者其他，本例修改为：interface: 192.168.1.4<br/><br/>2.2、启动master<br/>/etc/init.d/salt-master start<br/><br/>2.3、设置master开机自启动<br/>chkconfig salt-master on<br/><br/>三、salt-minion安装<br/>yum -y install salt-minion<br/><br/>3.1、修改配置文件<br/>vi /etc/salt/minion<br/>把11行的master的地址修改为：master: 192.168.1.4<br/>把42行的id修改为：id: vhost16&nbsp;&nbsp;（注：你可以按照你服务器的分类来命名，方便管理）<br/><br/>3.2、启动minion<br/>/etc/init.d/salt-minion start<br/><br/>3.3、设置minion开机自启动<br/>chkconfig salt-minion on<br/><br/>回到master执行salt-key -L ，会列出当前已经认证和还没有认证的主机，vhost16就是我们刚才才添加的主机。<br/><a href="http://www.zhanghaijun.com/attachment.php?fid=123" target="_blank"><img src="http://www.zhanghaijun.com/attachment.php?fid=123" class="insertimage" alt="点击在新窗口中浏览此图片" title="点击在新窗口中浏览此图片" border="0"/></a><br/>接下来我们执行：<br/>salt-key -a vhost16<br/>来通过认证。<br/><a href="http://www.zhanghaijun.com/attachment.php?fid=124" target="_blank"><img src="http://www.zhanghaijun.com/attachment.php?fid=124" class="insertimage" alt="点击在新窗口中浏览此图片" title="点击在新窗口中浏览此图片" border="0"/></a><br/>或者你可以执行：salt-key -A&nbsp;&nbsp;全部认证。<br/><br/>四：测试<br/>salt 'vhost' test.ping<br/><a href="http://www.zhanghaijun.com/attachment.php?fid=125" target="_blank"><img src="http://www.zhanghaijun.com/attachment.php?fid=125" class="insertimage" alt="点击在新窗口中浏览此图片" title="点击在新窗口中浏览此图片" border="0"/></a><br/>salt 'vhost*' cmd.run 'date'<br/><a href="http://www.zhanghaijun.com/attachment.php?fid=126" target="_blank"><img src="http://www.zhanghaijun.com/attachment.php?fid=126" class="insertimage" alt="点击在新窗口中浏览此图片" title="点击在新窗口中浏览此图片" border="0"/></a><br/><br/>更多使用方法请参考官方文档：<br/>http://docs.saltstack.com/en/latest/<br/>http://docs.saltstack.cn/<br/>Tags - <a href="http://www.zhanghaijun.com/tags/saltstack/" rel="tag">saltstack</a> , <a href="http://www.zhanghaijun.com/tags/linux/" rel="tag">linux</a> , <a href="http://www.zhanghaijun.com/tags/%25E9%259B%2586%25E7%25BE%25A4%25E7%25AE%25A1%25E7%2590%2586/" rel="tag">集群管理</a>
]]>
</description>
</item><item>
<link>http://www.zhanghaijun.com/post//#blogcomment</link>
<title><![CDATA[[评论] CentOS 下快速安装saltstack]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://www.zhanghaijun.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>