16 rsyncd 命令详解
1-1. 查看是否已安装服务rsync
1 | rpm -qa | grep rsync |
2-1. 安装 rsync
1 | yum install -y rsync |
3-1. 查看服务状态rsyncd
1 | systemctl status rsyncd.service |
3-2. 启动服务rsyncd
1 | systemctl start rsyncd.service |
3-3. 关闭服务rsyncd
1 | systemctl stop rsyncd.service |
3-4. 重启服务rsyncd
1 | systemctl restart rsyncd.service |
3-5. 设置开机启动项服务rsyncd
1 | systemctl enable rsyncd.service |
3-6. 取消开机启动项服务rsyncd
1 | systemctl disable rsyncd.service |
4-1. 列出各种服务开机是否启动
1 | systemctl list-unit-files |
4-2. 列出rsyncd服务是否开机启动
1 | systemctl list-unit-files | grep rsyncd.service |
4-3. 列出rsyncd服务是否开机启动
1 | systemctl is-enabled rsyncd.service |
5-1. 查看rsync占用哪个端口
1 | cat /etc/services | grep rsync |
5-2. 上面那一步可以看到是占用端口873,查看端口是否在运行.
1 | lsof -i:873 |
5-3. 另一种方式查询端口873是否在运行
1 | netstat -tnl | grep 873 |