不言不语

您现在的位置是: 首页 >  Linux

Linux

linux之nginx-mysql设置开机自启动

2022-03-18Linux
linux之nginx-mysql设置开机自启动

linux之nginx-mysql设置开机自启动


设置开机自启动


chkconfig --listt 列出非系统


systemctl list-unit-files 列出系统的


systemctl disable firewalld //禁止防火墙开机自启动


image.png


非系统


chkconfig --add nginx 添加到 开机管理列表


如果报错



image.png


[root@localhost ~]# vi /etc/init.d/nginx 


image.png


[root@localhost ~]# chkconfig --add nginx   ---添加


[root@localhost /]# chkconfig --list   --查看


image.png


chkconfig nginx on 设置开机自启动


[root@localhost /]# chkconfig --list   --查看


image.png


那么,恭喜你,设置完毕!

文章评论