Installation of Saltstack
1. The system is based on CentOS
2. Add Ali's Yum source
Ali:
Wget-o/etc/yum.repos.d/epel.repo Http://mirrors.aliyun.com/repo/epel-6.repo
Website Source:
#CentOS6. Xyum install https://repo.saltstack.com/yum/redhat/salt-repo-latest-1.el6.noarch.rpm #CentOS7. Xyum Install https://repo.saltstack.com/yum/redhat/salt-repo-latest-1.el7.noarch.rpm
3. Installation Master:
#安装masteryum Install salt-master-y# set boot chkconfig salt-master on# boot Salt master/etc/init.d/salt-master start
4, installation Minion:yum install-y salt-minion
- General clients and servers are not on a single machine
- If there is an error, please add the official Yum source, Vim does not indicate, please find yourself
#安装minionyum Install
5. Modify the configuration file
Host: Found also can not be vim/etc/salt/master
Client: Note ":" Must be followed by a space vim/etc/salt/minion
6. Common commands
SALT-KEY-A: Adding clients
SALT-KEY-L: List the requested client
Salt-key-d: Remove all Clients
salt-key-d ' client hostname ': Deleting a client
Salt-key--help
[[email protected] ~]# salt-key--helpusage:salt-key [Options]salt Key for Management certification keyoptions:--version display version number Back out--versions-report display all dependent package version numbers of the program and exit-H,--help help information-C Config_dir,--config-dir=config_dir Specify configuration directory, default:/etc/salt/-Q,--quiet quiet mode, do not output information to console-y,--yes to all queries continue, answer Yes, default: false Logg ing options: Setting the Loggin option overrides the configuration of the log in the configuration file. --LOG-FILE=LOG_FILE Specifies the log file path, default:/var/log/salt/key. --log-file-level=log_level_logfile log file level, you can set one of the values below ' all ', ' garbage ', ' trac E ', ' Debug ', ' Info ', ' warning ', ' error ', ' quiet '. Default: ' Warning '. --key-logfile=key_logfile sends all the output to the specified file, default: '/var/log/salt/key ' output Options: Configure the export format--ou T=output,--output=output sends the output information of the Salt-key command to the specified outputer. Can be set to the following parameter value ' No_return ', ' virt_query '. ' Grains ', ' yaml ', ' overstatestage ', ' json ', ' pprint ', ' nested ', ' raw ', ' highstate ', ' Q Uiet ', ' key ', ' txt ',--out-indent=output_indent,--output-indent=output_indent sets the number of spaces the output line indents. Negative numbers suppress the output indent orchestration. Valid only for outputer used.--out-file=output_file,--output-file=output_file Output the display to the specified file--no-color,--no-colour turn off the font color--force-color,--force-colour Force turn on output color rendering Actions:-L ARG,--list=arg print public key. You can set the following three values "pre", "un", and "unaccepted" to show unlicensed/unsigned keys. "ACC" or "accepted" displays the licensed/signed keys. "Rej" or "rejected" displays the denied keys. "All" will show all keys. -L,--list-all will display all public keys for a considerable month: "--list all"-a ACCEPT,--accept=accept the public key specified by the license (using--include-all option to specify the public key of all reject states except the suspended key)-A,--accept-all license all pending public keys-R REJect,--reject=reject denies the specified public key (use the--include-all option to specify the public key of all accept states except the suspended key )-R,--reject-all rejects all pending public key--include-all with accepting/rejecting option, specifies all non-pending state public keys-P PRINT ,--print=print prints the specified public key-p,--print-all print all, keys-d DELETE,--delete=delete Remove the public key based on the name of the public key-D,--delete-all Delete all keys-f FINGER,--finger=finger hit Prints the fingerprint information of the specified key-F,--finger-all prints all key fingerprint information key common options:--gen-keys=gen_keys set a salt to the generated Key configuration The name used. --gen-keys-dir=gen_keys_dir sets the drop directory that generates key pairs, the default current directory. Default=.--keysize=keysize sets the number of bits for the build key, only valid with the--gen-keys option, and the value must be greater than 2048. Otherwise it will be promoted to 2048-bit, default 2048 default=2048
Deploying Saltstack under Linux