Centos system installation salt

Source: Internet
Author: User
Salt installation and use 1. preparations for installing and installing centos system salt: many of our servers do not have internet permissions. it doesn't make much sense to set up each source server. Therefore, we use the nginx proxy function, reverse proxy of the yum source address on the Internet to the intranet. Example: the Jiangsu server ipxxx. xxx has nginx and other intranet machines.

Salt installation and use

1. install centos system salt

Preparations before installation:

Many of our servers do not have internet permissions. it doesn't make much sense to set up each source server. Therefore, we use the nginx proxy function to reverse proxy The yum source address on the internet back to the intranet.

Example:

The ip address xxx. xxx of the Jiangsu server is nginx on the server.

1. ps aux | grep nginx can be used to view the directory in which nginx is located

2. Add include vhosts/*. conf to/axon/nginx/conf/nginx. conf.

3. mkdir/axon/nginx/conf/vhosts

4. vi/axon/nginx/conf/vhosts/mirrors. conf

5. axon/nginx/sbin/nginx-t (check whether the Mirrors. conf file is normal after being configured)

6. if success is entered:/axon/nginx/sbin/nginx-s reload, restart the process.

7. If an error occurs in the pid, use pkill-9 nginx to kill all nginx processes. before killing the nginx process, check that ps aux | grep nginx has a keeplive script to automatically restart nginx.

So far, the reverse generation intranet yum server has been set up successfully.

 

 

1. Master-side installation

① EPEL installation:

Wget ftp.linux.ncsu.edu/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

Rpm-ivh epel-release-6-8.noarch.rpm

② Yum source configuration file:/etc/yum. repos. d/Centos-Base.repo

 

③ Epel configuration file:/etc/yum. repos. d/epel. repo

 

④ Salt installation:

Yum install salt-master

Yum install salt-minion

⑤ Master, minion configuration file :(/etc/salt/master start/etc/salt/minion start)

⑥ Check whether salt-key-L is authorized and salt-key-A is authorized

Master installed

 

2. install Minion:

① Host installation:

Because the intranet does not have a dns server, you can simply use hosts to solve the problem.

Vi/etc/hosts

 

In this case, ping the test.

The following is the same as the master installation.

 

 

II. Salt usage

1. master configuration

2. minion configuration

3. group configuration

Salt-N group test. ping

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.