方法一:(适用于centos7以上版本)
使用systemctl工具
方法二:(使用多种linux)
使用nginx官方的脚本,设置开机自启
nginx设置开机自启
原文:https://www.cnblogs.com/fanshehu/p/11910887.html