!
也想出现在这里? 联系我们
广告位
当前位置:首页>教程分享>服务器教程>Cenetos系统服务器检查/设置服务运行情况的命令

Cenetos系统服务器检查/设置服务运行情况的命令

Centos系统如何启动/关闭某项服务?如何设置服务自动启动?本文将主要列举CentOS系统服务器中常用的服务相关命令。

服务(service)启动相关命令(以httpd服务为例)

因系统命令不同,命令也不同;一般Centos5.x/6.x使用旧命令、Centos7.x/8.x使用新命令:

任务 旧命令 新命令
使某服务开机自动启动 Chkconfig --level   3 httpd on systemctl enable   httpd.service
使某服务开机不自动启动 chkconfig --level   3 httpd off systemctl disable   httpd.service
检查服务状态 service httpd   status systemctl   status httpd.service (服务详细信息)
systemctl   is-active httpd.service(仅显示是否Active)
显示所有已启动的服务 chkconfig --list systemctl list-unit-files
systemctl   list-units --type=service
启动某服务 service httpd   start systemctl start   httpd.service
停止某服务 service httpd   stop systemctl stop   httpd.service
重启某服务 service httpd   restart systemctl restart   httpd.service

给TA打赏
共{{data.count}}人
人已打赏
服务器教程

宝塔Linux面板PHP性能调优

2021-4-17 19:34:33

服务器教程

Nginx: [emerg] getpwnam(“www”) failed错误

2021-4-17 19:34:38

声明 本站上的部份代码及教程来源于互联网,仅供网友学习交流,若您喜欢本文可附上原文链接随意转载。无意侵害您的权益,请发送邮件至 [email protected] 或点击右侧 私信:吉吉国王 反馈,我们将尽快处理。
0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索
OneEase