1 通过在脚本init.d目录下写脚本,脚本的名称就是服务的名字,通过chkconfig -add servicename添加进服务,设置开机启动chkconfig servicename on即可。 2 通过ntsysv软件设置。如没有安装,可以通过yum install ntsysv安装即可。