# 查看正在运行的服务

systemctl

# 查看某个服务的状态

systemctl status httpd.service

# 启动服务

systemctl start  foo.service

如:systemctl start httpd.service

# 停止服务

systemctl stop foo.service

如:systemctl stop httpd.service

# 重启服务

systemctl restart foo.service

如:systemctl restart httpd.service

# 重新加载配置文件

systemctl reload  foo.service

如:systemctl reload httpd.service

# 开机时启动一个服务

systemctl enable foo.service

如:systemctl enable httpd.service

# 开机时关闭一个服务

systemctl disable foo.service

如:systemctl disable httpd.service

# 查看服务是否开机启动

systemctl is-enabled foo.service

如:systemctl is-enabled httpd.service

CentOS7 systemctl的使用的更多相关文章

  1. centos7 systemctl grub2

    centos最小好化安装没有ifconfig命令 刚安装了centos7.0,最小化安装,发现没有ifconfig命令,虚拟机里面的网卡显示ens32,这是centos7.0的特点,要使用 ifcon ...

  2. Centos7 systemctl添加自定义系统开机服务

    Centos7的服务systemctl脚本存放在: /usr/lib/systemd/ 有系统(system)和用户(user)之分,需要开机不登陆就能运行的程序,存下系统服务里,即:/usr/lib ...

  3. centos7 systemctl 启动 Redis 失败

    转自:http://sloger.info/posts/systemd-failed-to-start-redis-in-gentoo 今天启动 Redis 时阻塞很长时间,之后显示启动失败,启动状态 ...

  4. centos7 systemctl命令

    systemctl命令是系统服务管理器指令,它实际上将 service 和 chkconfig 这两个命令组合到一起. 实例: 启动nfs服务:systemctl start nfs-server.s ...

  5. CentOS7 systemctl tomcat常用配置

    开始配置tomcat 1.环境准备,安装java 在生产环境上,我一般使用oracle java,不使用openjdk,所以先卸载系统自带的openjdk yum remove java 下载orac ...

  6. Centos7 systemctl和防火墙firewalld命令(参考https://www.cnblogs.com/marso/archive/2018/01/06/8214927.html)

    一.防火墙的开启.关闭.禁用命令 (1)设置开机启用防火墙:systemctl enable firewalld.service (2)设置开机禁用防火墙:systemctl disable fire ...

  7. java jar 自启动 centos7 systemctl

    我本地有一个 data-service.jar 1. 编写启动脚本  data-service-start [root@iz2ze0fq2isg8vphkpos5sz shell]# more dat ...

  8. centos7 systemctl

    下机为systemctl指令systemctl enable *.service #开机运行服务systemctl disable *.service #取消开机运行systemctl start * ...

  9. centos7 systemctl一些用法

    systemctl 是管制服务的主要工具, 它整合了chkconfig 与 service功能于一体. systemctl is-enabled servicename.service #查询服务是否 ...

随机推荐

  1. tomcat 6.0 压缩功能

    官方文档: http://tomcat.apache.org/tomcat-6.0-doc/config/http.html

  2. Oracle用户及角色的权限管理[Oracle基础]

    1.查看全部用户:   select * from dba_users;   select * from all_users;   select * from user_users; 2.查看用户或角 ...

  3. Centos6 源代码部署MySQL5.6

    mysql从5.5版本号開始,不再使用./configure编译,而是使用cmake编译器,详细的cmake编译參数能够參考mysql官网文档(※ 很重要) http://dev.mysql.com/ ...

  4. [AngularJS] 'require' prop in Directive or Component

    When use 'require', recommend to add some error check, for example: class ChildCtrl { constructor(){ ...

  5. [Python]linux自己定义Python脚本命令

    在window下写好的程序配置到Linux上,要实现随意文件夹下的命令调用. 因为初学Linux,这里从文件传输等最主要的方法入手,记录配置的过程中遇到的各种问题. 连接远端server 这里使用pu ...

  6. ios中UIButton选中状态切换

    关于UIButton的事件枚举有许多,平时用的少所以很多的都不是很清楚,今天了解了下,看了以前的代码,觉得在UIButton选中时操作写了许多冗余代码,而忽略了UIButton一个很重要的属性,如下: ...

  7. Ⅱ.spring的点点滴滴--对象

    承接上文 对象的各种实例化 .net篇(环境为vs2012+Spring.Core.dll) 修改原来的PersonDao对象为 public class PersonDao : IPersonDao ...

  8. php笔记01:php基本语法格式

    1. <?php ....... ?> 2. <script laugnage="php"> ....... </script> 3. < ...

  9. Android学习之Activity初步

    Activity作为Android的第一步接触的概念,在学习中将初步的认识总结下来,以便后续的回顾与反思. 1.在用Android Studio生成第一个helloworld应用程序运行在手机上时,发 ...

  10. case,cast

    UPDATE dbo.Dat_Camera SET Cam_Config='<xml><cam><type>2</type>'+CASE WHEN Ca ...