1.操作系统版本
[root@saltmaster src]# cat /etc/redhat-release
CentOS release 6.5 (Final)
2.查看hosts文件
[root@saltmaster src]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.1.111 saltmaster
192.168.1.112 saltminion
3.安装epel源
[root@saltmaster ~]# cd /usr/local/src/
[root@saltmaster src]# wget
[root@saltmaster src]# rpm -ivh epel-release-6-8.noarch.rpm
4.安装rpmforce
[root@saltmaster src]# wget
[root@saltmaster src]# rpm -Uvh rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
5.安装依赖包
[root@saltmaster src]# yum install python-jinja2
6.安装salt-master
[root@saltmaster src]# yum -y install salt-master enablerepr=epel-testing
7.安装salt-minion
[root@saltminion src]# yum -y install salt-minion enablerepr=epel-testing
8.配置saltstack minion端
[root@saltminion salt]# cat /etc/salt/minion | grep "^ master"
master: 192.168.1.111
9.配置saltstack master端
[root@saltmaster salt]# cat /etc/salt/master | grep '^ interface'
interface: 192.168.1.111
10.启动salt-master
[root@saltmaster salt]# service salt-master restart
Stopping salt-master daemon: [失败]
Starting salt-master daemon: [确定]
11.启动salt-minion
[root@saltminion salt]# service salt-minion restart
Stopping salt-minion daemon: [失败]
Starting salt-minion daemon: [确定]
[root@saltmaster salt]# salt-key -L
Accepted Keys:
Unaccepted Keys:
saltminion
Rejected Keys:
[root@saltmaster salt]# salt-key -A
The following keys are going to be accepted:
Unaccepted Keys:
saltminion
Proceed? [n/Y] y
Key for minion saltminion accepted.
[root@saltmaster salt]# salt '*' test.ping
阅读(1319) | 评论(0) | 转发(0) |