2.5-saltstack Configuring Apache

Source: Internet
Author: User
Tags saltstack

Configuration Management installation Apache

On *server:

Vim/etc/salt/master #搜索找到file_roots

* Open the following comment:

File_roots: #总配置入口路径

Base

-/srv/salt/

Mkdir/srv/salt;cd/srv/salt

*vim/srv/salt/top.sls #加入以下内容, top for the total entrance file, the name is fixed.

Base

‘*‘:

-Apache

* means that the Apache module is executed on all clients.

* Restart/etc/init.d/salt-master Restart


*vim/srv/salt/apache.sls #加入以下内容, this is the contents of the Apache module

Apache-service: #只是一个名字

Pkg.installed: #pkg是模块名, followed by a function

-Names: If there is only one service, then you can write it-name:httpd don't have to change a line.

-HTTPd #安装包

-Httpd-devel #安装包

Service.running:

-NAME:HTTPD

-Enable:true

Description: Apache-service is the name of the ID, customized. Pkg.installed is the package installation function, and the following is the name of the package to install. Service.running is also a function to ensure that the specified service starts, and enable indicates boot.


Execute command: Salt ' client.wyp.com ' state.highstate

You can see the client installation, start up and boot up.


2.5-saltstack Configuring Apache

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.