Install saltstack on centos 6

Source: Internet
Author: User
Tags saltstack
[[email protected]_server home]# ifconfig eth0 | grep "inet addr:" | awk -F: ‘{print $2}‘ | awk ‘{print $1}‘    192.168.100.228    [[email protected]_server home]# cat /etc/redhat-release     CentOS release 6.3 (Final)    [[email protected]_server home]# uname -r    2.6.32-279.el6.x86_64    [[email protected]_server home]#


Http://ftp.linux.ncsu.edu/pub/epel/6/x86_64/
References
Http://docs.saltstack.cn/topics/installation/rhel.html

Pay attention to several packages before installation

Python does not need to mention that everyone knows this. The zeromq message middleware written by python is equivalent to the rabbitmq and activemq pycrypto Python cryptographic kit m2crypto encryption modules. The Python OpenSSL package msgpack-Python's high-performance message exchange format yaml. we all know that the file format jinja2 parses salt states (configured in the master configuration file) markupsafe implements a XML/html/XHTML markup safe string for python APACHE-libcloud Python class for unified APIs when interacting with a large number of mainstream cloud service providers

Before installation, we need to set the firewall port

lokkit  -p 4505:tcp -p 4506:tcp

1. Install master salt-master 2014.1.1
Download and install
Remember that the next installation of the path does not require downloading.
If you want to save locally, You Need To Cache
Vim/etc/yum. conf
Keepcache = 1 to 1

To install master 17.0.5, first install the local source code.

[[email protected]_server mnt]# yum install python-jinja2    [[email protected]_server mnt]# yum install salt-master

Install minion 17.0.5

[[email protected]_client1 ~]# yum install python-jinja2    [[email protected]_client1 ~]# yum install salt-minion

Iii. Start master
[[Email protected] _ server ~] # Vim/etc/salt/master is correctly written as follows or an error will be reported

#interface: 0.0.0.0    interface: 192.168.100.228    [[email protected]_server ~]# /etc/rc.d/init.d/salt-master start    Starting salt-master daemon:                               [  OK  ]    [[email protected]_server ~]# chkconfig --level 35 salt-master on    [[email protected]_server ~]#

4. Modify minion and start

[[Email protected] _ Client1 ~] # Cat/etc/salt/minion | grep 100.228 master: 192.168.100.228 this maste can enter the maste host name or make the IP Address [[email protected] _ Client1 ~] #

You also need to modify the ID. This ID is used by the server to identify the client. If the configuration ID is used as the standard, note that
ID: salt_client1

[[email protected]_client1 ~]# /etc/rc.d/init.d/salt-minion start   Starting salt-minion daemon:                               [  OK  ]    [[email protected]_client1 ~]# chkconfig --level 35 salt-minion on    [[email protected]_client1 ~]#

5. check whether there is a client key request on the master.

[[email protected]_server ~]# salt-key -L    Accepted Keys:    Unaccepted Keys:    salt_client1    Rejected Keys:    [[email protected]_server ~]#

6. The Master will approve the client's request file
----- A is all the request files through the client
----- D: This option is used to delete the certificate request file.

[[email protected]_server ~]# salt-key -a salt_client1    The following keys are going to be accepted:    Unaccepted Keys:    salt_client1    Proceed? [n/Y] Y    Key for minion salt_client1 accepted.    [[email protected]_server ~]#

If you do not want to manually confirm the configuration, we can modify the configuration file to automatically confirm
Modify the configuration file Vim/etc/salt/Master
# Auto_accept: false
Remove the # sign and modify false to true.

View key

[[email protected]_server base]# salt-key -f salt_client1    Accepted Keys:    salt_client1:  20:a6:2d:6b:24:4a:a9:bc:77:72:ba:6f:30:22:20:7f    [[email protected]_server base]# salt ‘salt_client1‘ cmd.run ‘salt-call key.finger --local‘    salt_client1:        local:            20:a6:2d:6b:24:4a:a9:bc:77:72:ba:6f:30:22:20:7f    [[email protected]_server base]#

Test:

[[email protected]_server ~]# salt ‘salt*‘ test.ping   salt_client1:        True    salt_client2:        True    [[email protected]_server ~]#


This article from the "O & M home (Q group: 1991706)" blog, please be sure to keep this source http://304076020.blog.51cto.com/7503470/1553222

Install saltstack on centos 6

Related Article

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.