Preliminary study on Saltstack

Source: Internet
Author: User
Tags saltstack

1.1 Installing the Epel source

# cd/usr/local/src/

# wget http://mirrors.sohu.com/fedora-epel/6/x86_64/epel-release-6-8.noarch.rpm

# RPM-IVH epel-release-6-8.noarch.rpm

1.2 installation Rpmforge

This step is important, there is no python-jinja2 on the Epel source of Redhat 6 and CentOS 6, and a change card is installed at the beginning .

1 wgethttp://apt.sw.be/redhat/el6/en/x86_64/rpmforge/rpms/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm

RPM-UVH rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm


2. Installing dependent packages

Yum Install PYTHON-JINJA2


3 Installing saltstack

only one installation master is required , and all other installations are minion.

3.1 Installation Salt-master

# yum-y Install Salt-master

3.2 Installation salt-minion

#yum-y Install Salt-minion


4 Configuring Saltstack

4.1 configuration of server-side Master

Vi/etc/salt/master

interface:121.41.80.171

See clearly interface front There are two spaces , This line of code means I want to connect the saltstack Master is 121.41.80.171

4.2 Minion Configuration

Vi/etc/salt/minion

master:121.41.80.171

See that there are two spaces in front of master, this line of code indicates that the master of the saltstack I want to connect to is 121.41.80.171


5 Start saltstack

5.1 start Master

Service Salt-master Start

5.2 Start minion

Service Salt-minion Start

Set boot auto-start

Chkconfig Salt-master on

Chkconfig salt-minion on


Salt-key

Accepted Keys:

Denied Keys:

unaccepted Keys:

Node2

Rejected Keys:


If there's something inside unaccepted keys,


Salt-key-a Node2

After executing this sentence, the Minion end appears minion_master.pub


Remote execution commands

Salt ' * ' Cmd.run "hostname"

Salt ' * ' Cmd.run "df-m"




This article is from the DBA Sky blog, so be sure to keep this source http://9425473.blog.51cto.com/9415473/1683882

Preliminary study on Saltstack

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.