Installing Saltstack automation software

Source: Internet
Author: User
Tags saltstack


Install the Master side:

[[Email protected] ~]# ifconfig eth0      link encap: ethernet  hwaddr 52:54:00:28:16:11             inet addr:192.168.0.21  Bcast:192.168.1.255  Mask:255.255.254.0           inet6 addr: fe80::5054:ff:fe28:1611/64  scope:link          up broadcast running  multicast  mtu:1500  metric:1           rx packets:2648004 errors:0 dropped:0 overruns:0 frame:0           TX packets:21384 errors:0 dropped:0 overruns:0  carrier:0          collisions:0 txqueuelen:1000            rx bytes:338622498  (322.9 MIB)   tx bytes:1884671   (1.7 MIB) Lo        link encap:local loopback             inet addr:127.0.0.1   mask:255.0.0.0          inet6 addr: ::1/128  scope:host          up loopback running   mtu:65536  metric:1          rx packets :39 errors:0 dropped:0 overruns:0 frame:0           TX packets:39 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:0            rx bytes:2694  (2.6 kib)   TX bytes:2694  (2.6 kib) [[email protected]  ~]# yum install epel-release -y[[email protected] ~]# yum  install salt-master -y [[email protected] ~]# salt-master -- versionsalt-master 2015.5.8  (Lithium) [[Email protected] ~]# /etc/init.d/salt-master  start Starting salt-master daemon:                                 [  ok  ][[email protected] ~]# ss -lnpt |  grep 45LISTEN     0      100                         *:4505                     *:*       users: (("Salt-master", 4882,12)) listen     0       100                        *:4506                      *:*        users: (("Salt-master", 4902,20)) [[email protected] ~]#

#启动salt-master End


====================================================================


Install the Minion side:

[[Email protected] ~]# ifconfig eth0      link encap: ethernet  hwaddr 52:54:00:20:b9:98             inet addr:192.168.0.22  Bcast:192.168.1.255  Mask:255.255.254.0           inet6 addr: fe80::5054:ff:fe20:b998/64  scope:link          up broadcast running  multicast  mtu:1500  metric:1           rx packets:2561616 errors:0 dropped:0 overruns:0 frame:0           TX packets:17514 errors:0 dropped:0 overruns:0  carrier:0          collisions:0 txqueuelen:1000            rx bytes:328408944  (313.1 MIB)   tx bytes:1569597   (1.4 MIB) Lo        link encap:local loopback             inet addr:127.0.0.1   mask:255.0.0.0          inet6 addr: ::1/128  scope:host          up loopback running   mtu:65536  metric:1          rx packets :0 errors:0 dropped:0 overruns:0 frame:0           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:0            rx bytes:0  (0.0 b)   TX bytes:0  (0.0 b) [[email protected] ~]#  yum install epel-release -y[[email protected] ~]# yum install  salt-minion -y[[email protected] ~]# salt-minion --versionsalt-minion 2015.5.8   (Lithium) [[email protected] ~]# sed -i  ' [email protected]^ #master:. *@ Master: [email protected] '  /etc/salt/minion

#192.168.0.21 is the IP address of my master side

[Email protected] ~]#/etc/init.d/salt-minion start starting salt-minion daemon: [OK][[ Email protected] ~]# Ps-ef |        grep salt-minionroot 3983 1 0 15:59?  00:00:00/usr/bin/python2.6/usr/bin/salt-minion-droot 4139 3755 0 16:08 pts/0 00:00:00 grep salt-minion[[email Protected] ~]#

#启动salt-minion End


Master side:

[Email protected] ~]# salt-key-l Accepted keys:denied keys:unaccepted keys:vm02rejected keys:[[email protected] ~]#

#出现了vm02的key

#salt common options for-key are

#-a-a-l-l-d-d-y


#接受vm02的key

[[email protected] ~]# salt-key -a vm02the following keys are  going to be accepted:unaccepted keys:vm02proceed? [n/y] ykey for  Minion vm02 accepted. [[email protected] ~]#[[email protected] ~]# salt  "*"  TEST.PING VM02:     True[[email protected] ~]#[[email protected] ~]# salt  "* " cmd.run " Ifconfig "vm02:    eth0      link  encap:ethernet  hwaddr 52:54:00:20:b9:98                 inet addr:192.168.0.22  Bcast:192.168.1.255   Mask:255.255.254.0               inet6 addr: fe80::5054:ff:fe20:b998/64 scope:link              up broadcast running multicast  mtu:1500   metric:1              rx  packets:2654870 errors:0 dropped:0 overruns:0 frame:0               TX packets:18851 errors:0 dropped:0  overruns:0 carrier:0               collisions:0 txqueuelen:1000                RX bytes:336733440  (321.1 MIB)   TX bytes:1832351  (1.7  MIB)         lo         link encap:local loopback                 inet addr:127.0.0.1  mask:255.0.0.0               inet6 addr: ::1/128 Scope:Host               up loopback running  mtu:65536  metric :1              rx packets:0  errors:0 dropped:0 overruns:0 frame:0               tx packets:0 errors:0 dropped:0 overruns:0 carrier:0               collisions:0  txqueuelen:0               rx  bytes:0  (0.0 b)   TX bytes:0  (0.0 b) [[email protected] ~]#

#至此, your salt has been installed successfully!!

#更多的使用方法请查官网文档!!!

650) this.width=650; "src=" Http://img.baidu.com/hi/jx2/j_0003.gif "alt=" J_0003.gif "/>


This article is from "every show." "Blog, be sure to keep this provenance http://xiaofengmo.blog.51cto.com/10116365/1763038

Installing Saltstack automation software

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.