欢迎光临散文网 会员登陆 & 注册

Linux 服务开机自动启动

2023-08-05 07:17 作者:小步2023  | 我要投稿

https://www.xiaobuteach.com/linux2/process/poweron-start.html?from=bi

Linux 服务开机自动启动

以httpd为例,默认安装完成后,需通过systemctl start启动。

重启后,不会自动启动,每次需要systemctl start启动,过于麻烦。

通过chkconfig命令设置开机自动启动。


语法

开机自动启动

chkconfig 服务名 on

关闭开机自动启动

chkconfig 服务名 off

示例

Apache设为自动启动

chkconfig httpd on

重启后,查看服务httpd状态为Active。OK。


Linux 服务开机自动启动的评论 (共 条)

分享到微博请遵守国家法律