实验环境:

OS:CentOS 6.8

[root@sky9896 /]# chkconfig --add rsyncd 

rsyncd 服务不支持 chkconfig

[root@sky9896 /]# cat /etc/init.d/rsyncd 

#/bin/bash

# chkconfig: 2345 20 80    #添加该条即解决服务支持chkconfig


[root@sky9896 /]# chkconfig --add rsyncd

[root@sky9896 /]# chkconfig --list rsyncd

rsyncd          0:关闭  1:关闭  2:启用  3:启用  4:启用  5:启用  6:关闭


[root@sky9896 /]# /etc/init.d/rsyncd start  

-bash: /etc/init.d/rsyncd: 权限不够


[root@sky9896 /]# chmod 777 /etc/init.d/rsyncd   #授权后,即解决

[root@sky9896 /]#  /etc/init.d/rsyncd start    #启动服务 

rsyncd is started.

[root@sky9896 /]# netstat -lnt|grep 873    

tcp        0      0 0.0.0.0:873           0.0.0.0:*        LISTEN      

tcp        0      0 :::873         


设置开机自启动的过程:

[root@sky9896 /]# chkconfig --add rsyncd  #添加服务

[root@sky9896 /]# chkconfig --list rsyncd  #显示服务

rsyncd  0:关闭  1:关闭  2:启用  3:启用  4:启用  5:启用  6:关闭

[root@sky9896 /]# chkconfig --del rsyncd  #删除该服务

[root@sky9896 /]# chkconfig --list rsyncd

rsyncd 服务支持 chkconfig,但它在任何级别中都没有被引用(运行“chkconfig --add rsyncd”)