ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
启动:salt-master [admin@master yum.repos.d]$ sudo systemctl start salt-master [admin@master /srv/salt ]$ sudo lsof -i:4505 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME salt-mast 25703 root 16u IPv4 152619 0t0 TCP *:4505 (LISTEN) salt-mast 25703 root 18u IPv4 153443 0t0 TCP master.51yuki.cn:4505->10.2.11.228:42042 (ESTABLISHED) salt-mast 25703 root 19u IPv4 153512 0t0 TCP master.51yuki.cn:4505->10.2.11.226:34924 (ESTABLISHED) [admin@master /srv/salt ]$ sudo lsof -i:4506 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME salt-mast 25709 root 24u IPv4 152628 0t0 TCP *:4506 (LISTEN) [admin@master /srv/salt ]$ sudo yum -y install python-setproctitle11 [admin@master /srv/salt ]$ ps aux|grep salt-master root 30518 30.5 3.5 384432 35904 ? Ss 16:17 0:00 /usr/bin/python /usr/bin/salt-master ProcessManager root 30528 0.0 1.8 312140 19096 ? S 16:17 0:00 /usr/bin/python /usr/bin/salt-master MultiprocessingLoggingQueue root 30533 0.0 2.9 465776 30140 ? Sl 16:17 0:00 /usr/bin/python /usr/bin/salt-master ZeroMQPubServerChannel root 30534 0.0 2.9 383848 29752 ? S 16:17 0:00 /usr/bin/python /usr/bin/salt-master EventPublisher root 30537 12.5 3.2 387556 33304 ? R 16:17 0:00 /usr/bin/python /usr/bin/salt-master Maintenance root 30538 1.0 2.9 384432 30180 ? S 16:17 0:00 /usr/bin/python /usr/bin/salt-master ReqServer_ProcessManager root 30539 0.0 3.0 499144 30756 ? Sl 16:17 0:00 /usr/bin/python /usr/bin/salt-master MWorkerQueue root 30540 11.5 3.1 385708 31876 ? R 16:17 0:00 /usr/bin/python /usr/bin/salt-master MWorker-0 root 30547 11.0 3.1 385708 31880 ? R 16:17 0:00 /usr/bin/python /usr/bin/salt-master MWorker-1 root 30548 11.5 3.1 385716 31888 ? R 16:17 0:00 /usr/bin/python /usr/bin/salt-master MWorker-2 root 30549 11.0 3.1 385716 31884 ? R 16:17 0:00 /usr/bin/python /usr/bin/salt-master MWorker-3 root 30550 10.5 3.1 385716 31880 ? R 16:17 0:00 /usr/bin/python /usr/bin/salt-master MWorker-4 admin 30564 0.0 0.0 112648 960 pts/0 R+ 16:17 0:00 grep --color=auto salt-master 一)在salt-master机器上授权 那么master如何接受同意salt-minion呢? [admin@master master]$ salt-key Accepted Keys: Denied Keys: Unaccepted Keys: node2.51yuki.cn node3.51yuki.cn Rejected Keys: (注意:必须配置selinux和firewalld防火墙服务,学习环境,我这边已经关闭了selinux和firewalld) [admin@master master]$ salt-key -a node* The following keys are going to be accepted: Unaccepted Keys: node2.51yuki.cn node3.51yuki.cn Proceed? [n/Y] y Key for minion node2.51yuki.cn accepted. Key for minion node3.51yuki.cn accepted. 参数: -a accept(接受)--可以支持通配符 -l 列出所有 -A 同意所有 二)配置状态文件保存的位置 [admin@master ~]$ sudo vim /etc/salt/master file_roots: base: - /srv/salt 说明: sys状态文件的保存位置 [admin@master ~]$ sudo systemctl restart salt-master 然后创建/srv/salt目录 [admin@master ~]$ sudo mkdir -p /srv/salt