1
2
3
4
5
6
|
# sudo apt-get install python-software-properties
# sudo apt-get install software-properties-common
# echo deb http://ppa.launchpad.net/saltstack/salt/ubuntu `lsb_release -sc` main | sudotee /etc/apt/sources.list.d/saltstack.list #添加salt网络源
# wget -q -O-"http://keyserver.ubuntu.com:11371/pks/lookup?op=get&search=0x4759FA960E27C0A6"| sudo apt-key add - #添加秘钥
# sudo apt-get update
# apt-get install salt-master
|
1
2
3
4
5
6
|
# sudo apt-get install python-software-properties
# sudo apt-get install software-properties-common
# echo debhttp://ppa.launchpad.net/saltstack/salt/ubuntu `lsb_release -sc` main | sudotee /etc/apt/sources.list.d/saltstack.list
# wget -q -O- "http://keyserver.ubuntu.com:11371/pks/lookup?op=get&search=0x4759FA960E27C0A6"| sudo apt-key add –
# sudo apt-get update
# apt-get install salt-minion
|
1
2
3
4
|
# vi /etc/salt/minion
master:192.168.1.10
#指定master地址
id
:host1
#唯一标识ID,用于在master显示
# /etc/init.d/salt-minion restart #重启minion生效
|
1
2
3
4
5
|
# salt-key -L
Accepted Keys:
host1
#此时颜色是红色的,说明通信没问题
Unaccepted Keys:
Rejected Keys:
|
1
2
3
4
5
6
|
# salt-key –A
# salt-key -L
Accepted Keys:
host1
#此时颜色变绿,认证成功
Unaccepted Keys:
Rejected Keys:
|