linux文件服务器httpd开机自启动

一、相关命令

1.查看所有系统服务

systemctl list-units --all --type=service

2.查询服务状态

systemctl status httpd.service

3.查询服务是否为开机启动

systemctl is-enabled crond.service

enabled是 disabled否

4.设置服务为开机启动状态

systemctl enable service

会自动创建一个系统链接

Created symlink from /etc/systemd/system/multi-user.target.wants/crond.service to /usr/lib/systemd/system/crond.service.

5.设置服务为开机不启动状态

systemctl disable crond

会自动移除系统链接

Removed symlink /etc/systemd/system/multi-user.target.wants/crond.service.

二、设置httpd开机自启动

systemctl enable service

重启即可。

更多博客内容详见我的博客 Wang's Blog

猜你喜欢

转载自blog.csdn.net/abcwanglinyong/article/details/80079068
今日推荐