Linux command
salt-master 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Start the Salt master daemon
salt-master
Start the Salt master
salt-master -d
Start with a specific configuration directory
salt-master -c [/etc/salt]
Start with debug logging
salt-master -l debug
Start with a specific log file
salt-master --log-file=[/var/log/salt/master]
说明
salt-master is the central control daemon for SaltStack infrastructure. It manages minion keys, distributes configurations, executes remote commands, and serves files to connected minions. The master listens on two ports: 4505 for publishing commands to minions via ZeroMQ, and 4506 for receiving returns and file server requests. Configuration is stored in /etc/salt/master. Key components include the job cache for tracking command execution, the file server for distributing states and files, and the PKI infrastructure for secure minion authentication. The master supports worker threads for handling large numbers of minions.
参数
- -d, --daemon
- Run the Salt master as a daemon in the background
- -c _DIR_, --config-dir=_DIR_
- Specify the configuration directory (default: /etc/salt)
- -l _LEVEL_, --log-level=_LEVEL_
- Console log level: info, warning, error, debug, trace, garbage, none
- --log-file=_FILE_
- Specify the log file path
- --log-file-level=_LEVEL_
- Log file logging level
- --pidfile=_FILE_
- Specify the location of the pidfile
- -u _USER_, --user=_USER_
- Specify user to run salt-master
- -h, --help
- Print help message and exit
- --version
- Print version information
FAQ
What is the salt-master command used for?
salt-master is the central control daemon for SaltStack infrastructure. It manages minion keys, distributes configurations, executes remote commands, and serves files to connected minions. The master listens on two ports: 4505 for publishing commands to minions via ZeroMQ, and 4506 for receiving returns and file server requests. Configuration is stored in /etc/salt/master. Key components include the job cache for tracking command execution, the file server for distributing states and files, and the PKI infrastructure for secure minion authentication. The master supports worker threads for handling large numbers of minions.
How do I run a basic salt-master example?
Run `salt-master` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -d, --daemon do in salt-master?
Run the Salt master as a daemon in the background