一、Master端安装配置
1.系统版本
[[email protected] ~]# cat /etc/redhat-releaseCentOS release 6.6 (Final)[[email protected] ~]# uname -aLinux salt-master 2.6.32-504.el6.x86_64 #1 SMP Wed Oct 15 04:27:16 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
2.安装epel源
[[email protected] ~]# rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpmRetrieving http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpmwarning: /var/tmp/rpm-tmp.VrDxXw: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEYPreparing... ########################################### [100%] package epel-release-6-8.noarch is already installed
3.安装salt-master
[[email protected] ~]# yum install salt-masterLoaded plugins: fastestmirror, securitySetting up Install ProcessLoading mirror speeds from cached hostfile* base: mirrors.aliyun.com* epel: mirrors.neusoft.edu.cn* extras: mirrors.aliyun.com* updates: mirrors.aliyun.comResolving Dependencies--> Running transaction check---> Package salt-master.noarch 0:2015.5.0-1.el6 will be installed--> Processing Dependency: salt = 2015.5.0-1.el6 for package: salt-master-2015.5.0-1.el6.noarch--> Running transaction check---> Package salt.noarch 0:2015.5.0-1.el6 will be installed--> Processing Dependency: python-zmq for package: salt-2015.5.0-1.el6.noarch--> Processing Dependency: python-requests for package: salt-2015.5.0-1.el6.noarch--> Processing Dependency: python-msgpack for package: salt-2015.5.0-1.el6.noarch--> Processing Dependency: python-jinja2 for package: salt-2015.5.0-1.el6.noarch--> Processing Dependency: m2crypto for package: salt-2015.5.0-1.el6.noarch--> Processing Dependency: PyYAML for package: salt-2015.5.0-1.el6.noarch--> Running transaction check---> Package PyYAML.x86_64 0:3.10-3.1.el6 will be installed--> Processing Dependency: libyaml-0.so.2()(64bit) for package: PyYAML-3.10-3.1.el6.x86_64---> Package m2crypto.x86_64 0:0.20.2-9.el6 will be installed---> Package python-jinja2.x86_64 0:2.2.1-2.el6_5 will be installed--> Processing Dependency: python-babel >= 0.8 for package: python-jinja2-2.2.1-2.el6_5.x86_64---> Package python-msgpack.x86_64 0:0.4.6-1.el6 will be installed---> Package python-requests.noarch 0:1.1.0-4.el6.centos will be installed--> Processing Dependency: python-urllib3 for package: python-requests-1.1.0-4.el6.centos.noarch--> Processing Dependency: python-ordereddict for package: python-requests-1.1.0-4.el6.centos.noarch--> Processing Dependency: python-chardet for package: python-requests-1.1.0-4.el6.centos.noarch---> Package python-zmq.x86_64 0:14.3.1-1.el6 will be installed--> Processing Dependency: libzmq.so.3()(64bit) for package: python-zmq-14.3.1-1.el6.x86_64--> Running transaction check---> Package libyaml.x86_64 0:0.1.3-4.el6_6 will be installed---> Package python-babel.noarch 0:0.9.4-5.1.el6 will be installed---> Package python-chardet.noarch 0:2.0.1-1.el6.centos will be installed---> Package python-ordereddict.noarch 0:1.1-2.el6.centos will be installed---> Package python-urllib3.noarch 0:1.5-7.el6.centos will be installed--> Processing Dependency: python-six for package: python-urllib3-1.5-7.el6.centos.noarch--> Processing Dependency: python-backports-ssl_match_hostname for package: python-urllib3-1.5-7.el6.centos.noarch---> Package zeromq3.x86_64 0:3.2.5-1.el6 will be installed--> Processing Dependency: libpgm-5.1.so.0()(64bit) for package: zeromq3-3.2.5-1.el6.x86_64--> Running transaction check---> Package openpgm.x86_64 0:5.1.118-3.el6 will be installed---> Package python-backports-ssl_match_hostname.noarch 0:3.4.0.2-4.el6.centos will be installed--> Processing Dependency: python-backports for package: python-backports-ssl_match_hostname-3.4.0.2-4.el6.centos.noarch---> Package python-six.noarch 0:1.7.3-1.el6.centos will be installed--> Running transaction check---> Package python-backports.x86_64 0:1.0-3.el6.centos will be installed--> Finished Dependency ResolutionDependencies Resolved===============================================================================================Package Arch Version Repository Size===============================================================================================Installing:salt-master noarch 2015.5.0-1.el6 epel 862 kInstalling for dependencies:PyYAML x86_64 3.10-3.1.el6 updates 157 klibyaml x86_64 0.1.3-4.el6_6 updates 52 km2crypto x86_64 0.20.2-9.el6 base 471 kopenpgm x86_64 5.1.118-3.el6 epel 165 kpython-babel noarch 0.9.4-5.1.el6 base 1.4 Mpython-backports x86_64 1.0-3.el6.centos extras 5.3 kpython-backports-ssl_match_hostname noarch 3.4.0.2-4.el6.centos extras 13 kpython-chardet noarch 2.0.1-1.el6.centos extras 225 kpython-jinja2 x86_64 2.2.1-2.el6_5 base 466 kpython-msgpack x86_64 0.4.6-1.el6 epel 69 kpython-ordereddict noarch 1.1-2.el6.centos extras 7.7 kpython-requests noarch 1.1.0-4.el6.centos extras 71 kpython-six noarch 1.7.3-1.el6.centos extras 27 kpython-urllib3 noarch 1.5-7.el6.centos extras 41 kpython-zmq x86_64 14.3.1-1.el6 epel 467 ksalt noarch 2015.5.0-1.el6 epel 4.0 Mzeromq3 x86_64 3.2.5-1.el6 epel 338 kTransaction Summary===============================================================================================Install 18 Package(s)Total download size: 8.8 MInstalled size: 32 MIs this ok [y/N]: n Exiting on user Command[[email protected] ~]# yum install salt-master -yLoaded plugins: fastestmirror, securitySetting up Install ProcessLoading mirror speeds from cached hostfile* base: mirrors.aliyun.com* epel: mirrors.neusoft.edu.cn* extras: mirrors.aliyun.com* updates: mirrors.aliyun.comResolving Dependencies--> Running transaction check---> Package salt-master.noarch 0:2015.5.0-1.el6 will be installed--> Processing Dependency: salt = 2015.5.0-1.el6 for package: salt-master-2015.5.0-1.el6.noarch--> Running transaction check---> Package salt.noarch 0:2015.5.0-1.el6 will be installed--> Processing Dependency: python-zmq for package: salt-2015.5.0-1.el6.noarch--> Processing Dependency: python-requests for package: salt-2015.5.0-1.el6.noarch--> Processing Dependency: python-msgpack for package: salt-2015.5.0-1.el6.noarch--> Processing Dependency: python-jinja2 for package: salt-2015.5.0-1.el6.noarch--> Processing Dependency: m2crypto for package: salt-2015.5.0-1.el6.noarch--> Processing Dependency: PyYAML for package: salt-2015.5.0-1.el6.noarch--> Running transaction check---> Package PyYAML.x86_64 0:3.10-3.1.el6 will be installed--> Processing Dependency: libyaml-0.so.2()(64bit) for package: PyYAML-3.10-3.1.el6.x86_64---> Package m2crypto.x86_64 0:0.20.2-9.el6 will be installed---> Package python-jinja2.x86_64 0:2.2.1-2.el6_5 will be installed--> Processing Dependency: python-babel >= 0.8 for package: python-jinja2-2.2.1-2.el6_5.x86_64---> Package python-msgpack.x86_64 0:0.4.6-1.el6 will be installed---> Package python-requests.noarch 0:1.1.0-4.el6.centos will be installed--> Processing Dependency: python-urllib3 for package: python-requests-1.1.0-4.el6.centos.noarch--> Processing Dependency: python-ordereddict for package: python-requests-1.1.0-4.el6.centos.noarch--> Processing Dependency: python-chardet for package: python-requests-1.1.0-4.el6.centos.noarch---> Package python-zmq.x86_64 0:14.3.1-1.el6 will be installed--> Processing Dependency: libzmq.so.3()(64bit) for package: python-zmq-14.3.1-1.el6.x86_64--> Running transaction check---> Package libyaml.x86_64 0:0.1.3-4.el6_6 will be installed---> Package python-babel.noarch 0:0.9.4-5.1.el6 will be installed---> Package python-chardet.noarch 0:2.0.1-1.el6.centos will be installed---> Package python-ordereddict.noarch 0:1.1-2.el6.centos will be installed---> Package python-urllib3.noarch 0:1.5-7.el6.centos will be installed--> Processing Dependency: python-six for package: python-urllib3-1.5-7.el6.centos.noarch--> Processing Dependency: python-backports-ssl_match_hostname for package: python-urllib3-1.5-7.el6.centos.noarch---> Package zeromq3.x86_64 0:3.2.5-1.el6 will be installed--> Processing Dependency: libpgm-5.1.so.0()(64bit) for package: zeromq3-3.2.5-1.el6.x86_64--> Running transaction check---> Package openpgm.x86_64 0:5.1.118-3.el6 will be installed---> Package python-backports-ssl_match_hostname.noarch 0:3.4.0.2-4.el6.centos will be installed--> Processing Dependency: python-backports for package: python-backports-ssl_match_hostname-3.4.0.2-4.el6.centos.noarch---> Package python-six.noarch 0:1.7.3-1.el6.centos will be installed--> Running transaction check---> Package python-backports.x86_64 0:1.0-3.el6.centos will be installed--> Finished Dependency ResolutionDependencies Resolved===============================================================================================Package Arch Version Repository Size===============================================================================================Installing:salt-master noarch 2015.5.0-1.el6 epel 862 kInstalling for dependencies:PyYAML x86_64 3.10-3.1.el6 updates 157 klibyaml x86_64 0.1.3-4.el6_6 updates 52 km2crypto x86_64 0.20.2-9.el6 base 471 kopenpgm x86_64 5.1.118-3.el6 epel 165 kpython-babel noarch 0.9.4-5.1.el6 base 1.4 Mpython-backports x86_64 1.0-3.el6.centos extras 5.3 kpython-backports-ssl_match_hostname noarch 3.4.0.2-4.el6.centos extras 13 kpython-chardet noarch 2.0.1-1.el6.centos extras 225 kpython-jinja2 x86_64 2.2.1-2.el6_5 base 466 kpython-msgpack x86_64 0.4.6-1.el6 epel 69 kpython-ordereddict noarch 1.1-2.el6.centos extras 7.7 kpython-requests noarch 1.1.0-4.el6.centos extras 71 kpython-six noarch 1.7.3-1.el6.centos extras 27 kpython-urllib3 noarch 1.5-7.el6.centos extras 41 kpython-zmq x86_64 14.3.1-1.el6 epel 467 ksalt noarch 2015.5.0-1.el6 epel 4.0 Mzeromq3 x86_64 3.2.5-1.el6 epel 338 kTransaction Summary===============================================================================================Install 18 Package(s)Total download size: 8.8 MInstalled size: 32 MDownloading Packages:(1/18): PyYAML-3.10-3.1.el6.x86_64.rpm | 157 kB 00:00 (2/18): libyaml-0.1.3-4.el6_6.x86_64.rpm | 52 kB 00:00 (3/18): m2crypto-0.20.2-9.el6.x86_64.rpm | 471 kB 00:00 (4/18): openpgm-5.1.118-3.el6.x86_64.rpm | 165 kB 00:04 (5/18): python-babel-0.9.4-5.1.el6.noarch.rpm | 1.4 MB 00:01 (6/18): python-backports-1.0-3.el6.centos.x86_64.rpm | 5.3 kB 00:00 (7/18): python-backports-ssl_match_hostname-3.4.0.2-4.el6.centos.noarch | 13 kB 00:00 (8/18): python-chardet-2.0.1-1.el6.centos.noarch.rpm | 225 kB 00:00 (9/18): python-jinja2-2.2.1-2.el6_5.x86_64.rpm | 466 kB 00:00 (10/18): python-msgpack-0.4.6-1.el6.x86_64.rpm | 69 kB 00:01 (11/18): python-ordereddict-1.1-2.el6.centos.noarch.rpm | 7.7 kB 00:00 (12/18): python-requests-1.1.0-4.el6.centos.noarch.rpm | 71 kB 00:00 (13/18): python-six-1.7.3-1.el6.centos.noarch.rpm | 27 kB 00:00 (14/18): python-urllib3-1.5-7.el6.centos.noarch.rpm | 41 kB 00:00 (15/18): python-zmq-14.3.1-1.el6.x86_64.rpm | 467 kB 00:06 (16/18): salt-2015.5.0-1.el6.noarch.rpm | 4.0 MB 00:47 (17/18): salt-master-2015.5.0-1.el6.noarch.rpm | 862 kB 00:10 (18/18): zeromq3-3.2.5-1.el6.x86_64.rpm | 338 kB 00:03 -----------------------------------------------------------------------------------------------Total 111 kB/s | 8.8 MB 01:20 warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEYRetrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6Importing GPG key 0x0608B895:Userid : EPEL (6) <[email protected]>Package: epel-release-6-8.noarch (installed)From : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6warning: rpmts_HdrFromFdno: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEYRetrieving key from http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-6Importing GPG key 0xC105B9DE:Userid: "CentOS-6 Key (CentOS 6 Official Signing Key) <[email protected]>"From : http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-6Running rpm_check_debugRunning Transaction TestTransaction Test SucceededRunning TransactionWarning: RPMDB altered outside of yum. Installing : python-ordereddict-1.1-2.el6.centos.noarch 1/18 Installing : python-six-1.7.3-1.el6.centos.noarch 2/18 Installing : python-backports-1.0-3.el6.centos.x86_64 3/18 Installing : python-backports-ssl_match_hostname-3.4.0.2-4.el6.centos.noarch 4/18 Installing : python-urllib3-1.5-7.el6.centos.noarch 5/18 Installing : m2crypto-0.20.2-9.el6.x86_64 6/18 Installing : libyaml-0.1.3-4.el6_6.x86_64 7/18 Installing : PyYAML-3.10-3.1.el6.x86_64 8/18 Installing : python-msgpack-0.4.6-1.el6.x86_64 9/18 Installing : python-chardet-2.0.1-1.el6.centos.noarch 10/18 Installing : python-requests-1.1.0-4.el6.centos.noarch 11/18 Installing : python-babel-0.9.4-5.1.el6.noarch 12/18 Installing : python-jinja2-2.2.1-2.el6_5.x86_64 13/18 Installing : openpgm-5.1.118-3.el6.x86_64 14/18 Installing : zeromq3-3.2.5-1.el6.x86_64 15/18 Installing : python-zmq-14.3.1-1.el6.x86_64 16/18 Installing : salt-2015.5.0-1.el6.noarch 17/18 Installing : salt-master-2015.5.0-1.el6.noarch 18/18 Verifying : openpgm-5.1.118-3.el6.x86_64 1/18 Verifying : PyYAML-3.10-3.1.el6.x86_64 2/18 Verifying : python-babel-0.9.4-5.1.el6.noarch 3/18 Verifying : python-chardet-2.0.1-1.el6.centos.noarch 4/18 Verifying : python-msgpack-0.4.6-1.el6.x86_64 5/18 Verifying : python-backports-ssl_match_hostname-3.4.0.2-4.el6.centos.noarch 6/18 Verifying : salt-2015.5.0-1.el6.noarch 7/18 Verifying : libyaml-0.1.3-4.el6_6.x86_64 8/18 Verifying : python-ordereddict-1.1-2.el6.centos.noarch 9/18 Verifying : salt-master-2015.5.0-1.el6.noarch 10/18 Verifying : m2crypto-0.20.2-9.el6.x86_64 11/18 Verifying : python-urllib3-1.5-7.el6.centos.noarch 12/18 Verifying : python-zmq-14.3.1-1.el6.x86_64 13/18 Verifying : python-jinja2-2.2.1-2.el6_5.x86_64 14/18 Verifying : python-backports-1.0-3.el6.centos.x86_64 15/18 Verifying : python-requests-1.1.0-4.el6.centos.noarch 16/18 Verifying : zeromq3-3.2.5-1.el6.x86_64 17/18 Verifying : python-six-1.7.3-1.el6.centos.noarch 18/18Installed: salt-master.noarch 0:2015.5.0-1.el6 Dependency Installed: PyYAML.x86_64 0:3.10-3.1.el6 libyaml.x86_64 0:0.1.3-4.el6_6 m2crypto.x86_64 0:0.20.2-9.el6 openpgm.x86_64 0:5.1.118-3.el6 python-babel.noarch 0:0.9.4-5.1.el6 python-backports.x86_64 0:1.0-3.el6.centos python-backports-ssl_match_hostname.noarch 0:3.4.0.2-4.el6.centos python-chardet.noarch 0:2.0.1-1.el6.centos python-jinja2.x86_64 0:2.2.1-2.el6_5 python-msgpack.x86_64 0:0.4.6-1.el6 python-ordereddict.noarch 0:1.1-2.el6.centos python-requests.noarch 0:1.1.0-4.el6.centos python-six.noarch 0:1.7.3-1.el6.centos python-urllib3.noarch 0:1.5-7.el6.centos python-zmq.x86_64 0:14.3.1-1.el6 salt.noarch 0:2015.5.0-1.el6 zeromq3.x86_64 0:3.2.5-1.el6 Complete!
4.编辑配置文件
[[email protected] ~]# vim /etc/salt/master[[email protected] ~]# egrep -v "^#|^$" /etc/salt/master392:file_roots:393: base:394: - /etc/salt/states395: prod:396: - /etc/salt/states/proc
5.创建目录,启动服务,并设置为自启动
[[email protected] ~]# mkdir -p /etc/salt/states/proc[[email protected] ~]# /etc/init.d/salt-master startStarting salt-master daemon: [ OK ][[email protected] ~]# chkconfig salt-master on
二、Minion端安装配置
1.查看系统版本
[[email protected] ~]# cat /etc/redhat-releaseCentOS release 6.6 (Final)[[email protected] ~]# uname -aLinux salt-minion 2.6.32-504.el6.x86_64 #1 SMP Wed Oct 15 04:27:16 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
2.安装epel源
[[email protected] ~]# rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpmRetrieving http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpmwarning: /var/tmp/rpm-tmp.aTuqqR: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEYPreparing... ########################################### [100%] package epel-release-6-8.noarch is already installed
3.安装salt-minion
[[email protected] ~]# yum install salt-minion -yLoaded plugins: fastestmirror, securitySetting up Install ProcessLoading mirror speeds from cached hostfile* base: mirrors.aliyun.com* epel: mirrors.neusoft.edu.cn* extras: mirrors.aliyun.com* updates: mirrors.aliyun.comResolving Dependencies--> Running transaction check---> Package salt-minion.noarch 0:2015.5.0-1.el6 will be installed--> Processing Dependency: salt = 2015.5.0-1.el6 for package: salt-minion-2015.5.0-1.el6.noarch--> Running transaction check---> Package salt.noarch 0:2015.5.0-1.el6 will be installed--> Processing Dependency: python-zmq for package: salt-2015.5.0-1.el6.noarch--> Processing Dependency: python-requests for package: salt-2015.5.0-1.el6.noarch--> Processing Dependency: python-msgpack for package: salt-2015.5.0-1.el6.noarch--> Processing Dependency: python-jinja2 for package: salt-2015.5.0-1.el6.noarch--> Processing Dependency: m2crypto for package: salt-2015.5.0-1.el6.noarch--> Processing Dependency: PyYAML for package: salt-2015.5.0-1.el6.noarch--> Running transaction check---> Package PyYAML.x86_64 0:3.10-3.1.el6 will be installed--> Processing Dependency: libyaml-0.so.2()(64bit) for package: PyYAML-3.10-3.1.el6.x86_64---> Package m2crypto.x86_64 0:0.20.2-9.el6 will be installed---> Package python-jinja2.x86_64 0:2.2.1-2.el6_5 will be installed--> Processing Dependency: python-babel >= 0.8 for package: python-jinja2-2.2.1-2.el6_5.x86_64---> Package python-msgpack.x86_64 0:0.4.6-1.el6 will be installed---> Package python-requests.noarch 0:1.1.0-4.el6.centos will be installed--> Processing Dependency: python-urllib3 for package: python-requests-1.1.0-4.el6.centos.noarch--> Processing Dependency: python-ordereddict for package: python-requests-1.1.0-4.el6.centos.noarch--> Processing Dependency: python-chardet for package: python-requests-1.1.0-4.el6.centos.noarch---> Package python-zmq.x86_64 0:14.3.1-1.el6 will be installed--> Processing Dependency: libzmq.so.3()(64bit) for package: python-zmq-14.3.1-1.el6.x86_64--> Running transaction check---> Package libyaml.x86_64 0:0.1.3-4.el6_6 will be installed---> Package python-babel.noarch 0:0.9.4-5.1.el6 will be installed---> Package python-chardet.noarch 0:2.0.1-1.el6.centos will be installed---> Package python-ordereddict.noarch 0:1.1-2.el6.centos will be installed---> Package python-urllib3.noarch 0:1.5-7.el6.centos will be installed--> Processing Dependency: python-six for package: python-urllib3-1.5-7.el6.centos.noarch--> Processing Dependency: python-backports-ssl_match_hostname for package: python-urllib3-1.5-7.el6.centos.noarch---> Package zeromq3.x86_64 0:3.2.5-1.el6 will be installed--> Processing Dependency: libpgm-5.1.so.0()(64bit) for package: zeromq3-3.2.5-1.el6.x86_64--> Running transaction check---> Package openpgm.x86_64 0:5.1.118-3.el6 will be installed---> Package python-backports-ssl_match_hostname.noarch 0:3.4.0.2-4.el6.centos will be installed--> Processing Dependency: python-backports for package: python-backports-ssl_match_hostname-3.4.0.2-4.el6.centos.noarch---> Package python-six.noarch 0:1.7.3-1.el6.centos will be installed--> Running transaction check---> Package python-backports.x86_64 0:1.0-3.el6.centos will be installed--> Finished Dependency ResolutionDependencies Resolved===============================================================================================Package Arch Version Repository Size===============================================================================================Installing:salt-minion noarch 2015.5.0-1.el6 epel 24 kInstalling for dependencies:PyYAML x86_64 3.10-3.1.el6 updates 157 klibyaml x86_64 0.1.3-4.el6_6 updates 52 km2crypto x86_64 0.20.2-9.el6 base 471 kopenpgm x86_64 5.1.118-3.el6 epel 165 kpython-babel noarch 0.9.4-5.1.el6 base 1.4 Mpython-backports x86_64 1.0-3.el6.centos extras 5.3 kpython-backports-ssl_match_hostname noarch 3.4.0.2-4.el6.centos extras 13 kpython-chardet noarch 2.0.1-1.el6.centos extras 225 kpython-jinja2 x86_64 2.2.1-2.el6_5 base 466 kpython-msgpack x86_64 0.4.6-1.el6 epel 69 kpython-ordereddict noarch 1.1-2.el6.centos extras 7.7 kpython-requests noarch 1.1.0-4.el6.centos extras 71 kpython-six noarch 1.7.3-1.el6.centos extras 27 kpython-urllib3 noarch 1.5-7.el6.centos extras 41 kpython-zmq x86_64 14.3.1-1.el6 epel 467 ksalt noarch 2015.5.0-1.el6 epel 4.0 Mzeromq3 x86_64 3.2.5-1.el6 epel 338 kTransaction Summary===============================================================================================Install 18 Package(s)Total download size: 8.0 MInstalled size: 32 MDownloading Packages:(1/18): PyYAML-3.10-3.1.el6.x86_64.rpm | 157 kB 00:00 (2/18): libyaml-0.1.3-4.el6_6.x86_64.rpm | 52 kB 00:00 (3/18): m2crypto-0.20.2-9.el6.x86_64.rpm | 471 kB 00:00 (4/18): openpgm-5.1.118-3.el6.x86_64.rpm | 165 kB 00:02 (5/18): python-babel-0.9.4-5.1.el6.noarch.rpm | 1.4 MB 00:01 (6/18): python-backports-1.0-3.el6.centos.x86_64.rpm | 5.3 kB 00:00 (7/18): python-backports-ssl_match_hostname-3.4.0.2-4.el6.centos.noarch | 13 kB 00:00 (8/18): python-chardet-2.0.1-1.el6.centos.noarch.rpm | 225 kB 00:00 (9/18): python-jinja2-2.2.1-2.el6_5.x86_64.rpm | 466 kB 00:00 (10/18): python-msgpack-0.4.6-1.el6.x86_64.rpm | 69 kB 00:00 (11/18): python-ordereddict-1.1-2.el6.centos.noarch.rpm | 7.7 kB 00:00 (12/18): python-requests-1.1.0-4.el6.centos.noarch.rpm | 71 kB 00:00 (13/18): python-six-1.7.3-1.el6.centos.noarch.rpm | 27 kB 00:00 (14/18): python-urllib3-1.5-7.el6.centos.noarch.rpm | 41 kB 00:00 (15/18): python-zmq-14.3.1-1.el6.x86_64.rpm | 467 kB 00:06 (16/18): salt-2015.5.0-1.el6.noarch.rpm | 4.0 MB 00:49 (17/18): salt-minion-2015.5.0-1.el6.noarch.rpm | 24 kB 00:00 (18/18): zeromq3-3.2.5-1.el6.x86_64.rpm | 338 kB 00:05 -----------------------------------------------------------------------------------------------Total 114 kB/s | 8.0 MB 01:11 warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEYRetrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6Importing GPG key 0x0608B895:Userid : EPEL (6) <[email protected]>Package: epel-release-6-8.noarch (installed)From : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6Running rpm_check_debugRunning Transaction TestTransaction Test SucceededRunning Transaction Installing : python-ordereddict-1.1-2.el6.centos.noarch 1/18 Installing : python-backports-1.0-3.el6.centos.x86_64 2/18 Installing : python-backports-ssl_match_hostname-3.4.0.2-4.el6.centos.noarch 3/18 Installing : python-six-1.7.3-1.el6.centos.noarch 4/18 Installing : python-urllib3-1.5-7.el6.centos.noarch 5/18 Installing : python-chardet-2.0.1-1.el6.centos.noarch 6/18 Installing : python-requests-1.1.0-4.el6.centos.noarch 7/18 Installing : m2crypto-0.20.2-9.el6.x86_64 8/18 Installing : libyaml-0.1.3-4.el6_6.x86_64 9/18 Installing : PyYAML-3.10-3.1.el6.x86_64 10/18 Installing : python-msgpack-0.4.6-1.el6.x86_64 11/18 Installing : python-babel-0.9.4-5.1.el6.noarch 12/18 Installing : python-jinja2-2.2.1-2.el6_5.x86_64 13/18 Installing : openpgm-5.1.118-3.el6.x86_64 14/18 Installing : zeromq3-3.2.5-1.el6.x86_64 15/18 Installing : python-zmq-14.3.1-1.el6.x86_64 16/18 Installing : salt-2015.5.0-1.el6.noarch 17/18 Installing : salt-minion-2015.5.0-1.el6.noarch 18/18 Verifying : openpgm-5.1.118-3.el6.x86_64 1/18 Verifying : PyYAML-3.10-3.1.el6.x86_64 2/18 Verifying : python-babel-0.9.4-5.1.el6.noarch 3/18 Verifying : salt-minion-2015.5.0-1.el6.noarch 4/18 Verifying : python-msgpack-0.4.6-1.el6.x86_64 5/18 Verifying : python-backports-ssl_match_hostname-3.4.0.2-4.el6.centos.noarch 6/18 Verifying : salt-2015.5.0-1.el6.noarch 7/18 Verifying : libyaml-0.1.3-4.el6_6.x86_64 8/18 Verifying : python-ordereddict-1.1-2.el6.centos.noarch 9/18 Verifying : m2crypto-0.20.2-9.el6.x86_64 10/18 Verifying : python-urllib3-1.5-7.el6.centos.noarch 11/18 Verifying : python-zmq-14.3.1-1.el6.x86_64 12/18 Verifying : python-jinja2-2.2.1-2.el6_5.x86_64 13/18 Verifying : python-chardet-2.0.1-1.el6.centos.noarch 14/18 Verifying : python-requests-1.1.0-4.el6.centos.noarch 15/18 Verifying : zeromq3-3.2.5-1.el6.x86_64 16/18 Verifying : python-six-1.7.3-1.el6.centos.noarch 17/18 Verifying : python-backports-1.0-3.el6.centos.x86_64 18/18Installed: salt-minion.noarch 0:2015.5.0-1.el6 Dependency Installed: PyYAML.x86_64 0:3.10-3.1.el6 libyaml.x86_64 0:0.1.3-4.el6_6 m2crypto.x86_64 0:0.20.2-9.el6 openpgm.x86_64 0:5.1.118-3.el6 python-babel.noarch 0:0.9.4-5.1.el6 python-backports.x86_64 0:1.0-3.el6.centos python-backports-ssl_match_hostname.noarch 0:3.4.0.2-4.el6.centos python-chardet.noarch 0:2.0.1-1.el6.centos python-jinja2.x86_64 0:2.2.1-2.el6_5 python-msgpack.x86_64 0:0.4.6-1.el6 python-ordereddict.noarch 0:1.1-2.el6.centos python-requests.noarch 0:1.1.0-4.el6.centos python-six.noarch 0:1.7.3-1.el6.centos python-urllib3.noarch 0:1.5-7.el6.centos python-zmq.x86_64 0:14.3.1-1.el6 salt.noarch 0:2015.5.0-1.el6 zeromq3.x86_64 0:3.2.5-1.el6 Complete!
4.编辑配置文件
[[email protected] ~]# grep -vEn "^#|^$" /etc/salt/minion16:master: salt-master 54:id: salt-minion
5.启动服务,并设置为自启动
[[email protected] ~]# /etc/init.d/salt-minion startStarting salt-minion daemon: [ OK ][[email protected] ~]# chkconfig salt-minion on
三、Master添加Minion
1.添加minion
[[email protected] ~]# salt-key -L Accepted Keys:Denied Keys:Unaccepted Keys:salt-minionRejected Keys:[[email protected] ~]# salt-key -a salt-minionThe following keys are going to be accepted:Unaccepted Keys:salt-minionProceed? [n/Y] yKey for minion salt-minion accepted.[[email protected] ~]# salt-key -LAccepted Keys:salt-minionDenied Keys:Unaccepted Keys:Rejected Keys:
2.测试
[[email protected] ~]# salt ‘salt-minion‘ test.ping salt-minion: True
时间: 2024-11-17 00:45:19