可以用systemctl命令来添加开机启动,命令:systemctl enable nginx
chkconfig --add /etc/init.d/nginx # 将nginx服务剔除chkconfig管理列表 chkconfig --del /etc/init.d/nginx