打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
四、Linux的系统服务管理工具(systemd)
userphoto

2022.09.11 北京

关注

在centos7及以后,重要的改变就是使用systemd管理机制,目前大多数linux发行版都支持systemd管理机制。

所以systemd不仅能够初始化系统开机,还能管理linux系统服务。

为了便于linux用户操作系统服务的管理,systemd提供了systemctl命令工具进行systemd的各项操作。

 

 

常用功能:启动start、停止stop、重启服务restart,任何一个软件或者服务,你都可以尝试着敲入命令systemctl restart 服务名.service

 

例如:

  systemctl start httpd.service    启动 httpd服务

  systemctl stop httpd.service 停止 httpd服务

  systemctl restart httpd.service 重新启动服务

  systemctl try-start httpd.service 服务在运行状态下重新启动服务

  systemctl reload httpd.service  重新加载配置文件

 

查看、禁止、启用服务

  systemctl endable httpd.service   表示httpd服务开机启动

  systemctl disable httpd.service   表示httpd服务开机关闭

  systemctl status  httpd.service   查看httpd服务状态,是否开启

 

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
CentOS 7.x设置自定义开机启动,添加自定义系统服务
Linux系统配置(服务控制)详细介绍
Ubuntu中systemd下service配置文件说明
CentOS linux7 设置开机启动服务
systemd的运行级别与服务管理命令简介
Linux结构目录详解
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服