25 rsyslog命令详解
1-1. 查看是否已安装服务rsyslog
1 | rpm -qa | grep rsyslog |
2-1. 安装 rsyslog
1 | yum install -y rsyslog |
3-1. 查看服务状态rsyslog
1 | systemctl status rsyslog.service |
3-2. 启动服务rsyslog
1 | systemctl start rsyslog.service |
3-3. 关闭服务rsyslog
1 | systemctl stop rsyslog.service |
3-4. 重启服务rsyslog
1 | systemctl restart rsyslog.service |
3-5. 设置开机启动项服务rsyslog
1 | systemctl enable rsyslog.service |
3-6. 取消开机启动项服务rsyslog
1 | systemctl disable rsyslog.service |
4-1. 列出各种服务开机是否启动
1 | systemctl list-unit-files |
4-2. 列出rsyslog服务是否开机启动
1 | systemctl list-unit-files | grep rsyslog.service |
4-3. 列出rsyslog服务是否开机启动
1 | systemctl is-enabled rsyslog.service |
5-1. 查看rsyslog守护进程是否正常工作
1 | netstat -tulpn | grep rsyslog |