服务管理--systemctl命令

简介:

启动一个服务:systemctl start postfix.service
关闭一个服务:systemctl stop postfix.service
重启一个服务:systemctl restart postfix.service
显示一个服务的状态:systemctl status postfix.service
在开机时启用一个服务:systemctl enable postfix.service
在开机时禁用一个服务:systemctl disable postfix.service
查看服务是否开机启动:systemctl is-enabled postfix.service
查看已启动的服务列表:systemctl list-unit-files|grep enabled

systemctl status httpd.service 
查看httpd服务的运行状态

//Loaded行中的enabled表示该服务是开机自动启动的,disable表示该服务不是开机自动启动的





     本文转自yzy121403725 51CTO博客,原文链接:http://blog.51cto.com/lookingdream/1834620 ,如需转载请自行联系原作者

相关文章
|
4月前
chkconfig 设置后台服务的自启配置
chkconfig 设置后台服务的自启配置。
35 2
|
10月前
|
Ubuntu Linux
ubuntu使用小技巧 -- 设置rclocal开机启动
CentOS下可以通过编辑/etc/rc.local文件,加入一些开机启动项,ubuntu下怎么设置呢?
|
Ubuntu Java Linux
使用systemctl管理系统服务
使用systemctl管理系统服务
122 0
|
4月前
|
关系型数据库 MySQL Linux
Linux服务管理与chkconfig命令
Linux服务管理与chkconfig命令
52 0
|
4月前
|
监控 关系型数据库 Linux
systemctl管理系统服务的详细用法
systemctl管理系统服务的详细用法
131 0
|
负载均衡 Unix 应用服务中间件
systemctl 命令设置开机自启动失败
systemctl 命令设置开机自启动失败
|
关系型数据库 MySQL Linux
Linux:1.service:服务管理+2.服务运行类别:runlevel+3.给各种服务设置自启动:chkconfig指令+4.systemctl:服务管理
Linux:1.service:服务管理+2.服务运行类别:runlevel+3.给各种服务设置自启动:chkconfig指令+4.systemctl:服务管理
120 0
Linux:1.service:服务管理+2.服务运行类别:runlevel+3.给各种服务设置自启动:chkconfig指令+4.systemctl:服务管理
|
Linux
Linux:systemctl、service、chkconfig
Linux:systemctl、service、chkconfig
121 0
|
网络协议 Linux 网络安全
Linux firewalld配置与systemctl开启启动配置(转载)
1、firewalld的基本使用 启动: systemctl start firewalld 查看状态: systemctl status firewalld 停止: systemctl disable firewalld 禁用: systemctl stop firewalld 2.systemctl是CentOS7的服务管理工具中主要的工具,它融合之前service和chkconfig的功能于一体。
1334 0