Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1038970
  • 博文数量: 239
  • 博客积分: 10
  • 博客等级: 民兵
  • 技术积分: 3618
  • 用 户 组: 普通用户
  • 注册时间: 2012-11-12 13:17
文章分类

全部博文(239)

文章存档

2021年(1)

2016年(1)

2015年(30)

2014年(91)

2013年(116)

分类: LINUX

2015-01-04 22:44:33

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
阅读(1255) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~