l Server on: Vi/etc/salt/master// Search to find File_roots
L Open a comment that reads:
File_roots:
Base
-/srv/salt
L Mkdir/srv/salt; Cd/srv/salt
L Vi/srv/salt/top.sls// Add the following:
Base
‘*‘:
-Apache
L This means that all clients are executed on the Apache Module
L Restart /etc/init.d/salt-master Restart
L Vi/srv/salt/apache.sls// Add the following: this is Apache contents of the module
Apache-service:
Pkg.installed:
-Names:// If there is only one service here, then you can write –name:httpd There 's no need to change another line.
-httpd
-Httpd-devel
Service.running:
-NAME:HTTPD
description, apache-service id the name, custom. pkg.installed for the package installation function, here is the name of the package to install. service.running is also a function to ensure that the specified service starts, enable indicates boot start.
L Execution: Salt ' web10.aming.com ' state.highstate
saltstack– Configuration Management installation Apache