CentOS7 systemctl的使用
# 查看正在运行的服务
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的使用的更多相关文章
- centos7 systemctl grub2
centos最小好化安装没有ifconfig命令 刚安装了centos7.0,最小化安装,发现没有ifconfig命令,虚拟机里面的网卡显示ens32,这是centos7.0的特点,要使用 ifcon ...
- Centos7 systemctl添加自定义系统开机服务
Centos7的服务systemctl脚本存放在: /usr/lib/systemd/ 有系统(system)和用户(user)之分,需要开机不登陆就能运行的程序,存下系统服务里,即:/usr/lib ...
- centos7 systemctl 启动 Redis 失败
转自:http://sloger.info/posts/systemd-failed-to-start-redis-in-gentoo 今天启动 Redis 时阻塞很长时间,之后显示启动失败,启动状态 ...
- centos7 systemctl命令
systemctl命令是系统服务管理器指令,它实际上将 service 和 chkconfig 这两个命令组合到一起. 实例: 启动nfs服务:systemctl start nfs-server.s ...
- CentOS7 systemctl tomcat常用配置
开始配置tomcat 1.环境准备,安装java 在生产环境上,我一般使用oracle java,不使用openjdk,所以先卸载系统自带的openjdk yum remove java 下载orac ...
- Centos7 systemctl和防火墙firewalld命令(参考https://www.cnblogs.com/marso/archive/2018/01/06/8214927.html)
一.防火墙的开启.关闭.禁用命令 (1)设置开机启用防火墙:systemctl enable firewalld.service (2)设置开机禁用防火墙:systemctl disable fire ...
- java jar 自启动 centos7 systemctl
我本地有一个 data-service.jar 1. 编写启动脚本 data-service-start [root@iz2ze0fq2isg8vphkpos5sz shell]# more dat ...
- centos7 systemctl
下机为systemctl指令systemctl enable *.service #开机运行服务systemctl disable *.service #取消开机运行systemctl start * ...
- centos7 systemctl一些用法
systemctl 是管制服务的主要工具, 它整合了chkconfig 与 service功能于一体. systemctl is-enabled servicename.service #查询服务是否 ...
随机推荐
- mysql中删除表
有两种方式: 1.delete from table table_name; 2.truncate table table_name; 第一种中,清空表后,主键id会在原先的记录基础上继续增加,而第二 ...
- [Effective C++ --023]宁以non-member、non-friend替换member函数
作者在这一节中花了大幅度的篇幅来介绍为什么最好使用non-member.non-friend函数. 思路如下: 场景:如果有一个class用来表示网页浏览器,那么清楚缓存及历史记录的时候,我们可能定义 ...
- 文件I/O之fcntl函数
fcntl函数可以改变已打开的文件的性质. #include <fcntl.h> int fcntl( int filedes, int cmd, ... /* int arg */ ); ...
- 原 Debian设置开机自动启动与关闭
发表于1年前(2013-01-08 13:01) 阅读(2380) | 评论(0) 2人收藏此文章, 我要收藏 赞0 开机自动启动 update-rc.d chkconfig 熟悉debian系统 ...
- Apache配置虚拟目录,以及各种操作
apache配置虚拟目录: 打开并创建虚拟目录的步骤如下: # Virtual hosts # Include conf/extra/httpd-vhosts.conf 去掉conf/http.con ...
- TCP/IP协议原理与应用笔记12:单播、多播和广播地址(目的地址)
根据数据接收者的接收范围,将目的地址分为单播.多播.广播. 这里目的地址的划分主要针对的是 物理地址 和 IP地址,没有涉及到端口地址,因为主要针对标识通信节点的地址(物理地址 和 IP地址)而言,和 ...
- Android(java)学习笔记137:Android中SimpleAdapter,ArrayAdapter和BaseAdapter常见的适配器
1.SimpleAdapter(BaseAdapter子类扩展类): simpleAdapter的扩展性最好,可以定义各种各样的布局出来,可以放上ImageView(图片)等.可以显示比较复杂的列表, ...
- ios知识点
在controller中加载plist数据 1,设置属性NSArray 或可变数组NSMutableArray @property(nonatomic,strong)NSArray *message; ...
- 深入理解计算机系统第二版习题解答CSAPP 2.18
将32位补码表示的数转换为10进制数. 32位补码 十进制 0x1b8 0x14 0xFFFFFE58 -424 0xFFFFFE74 -396 0x44 0xFFFFFEC8 -312 0x10 0 ...
- Azure PowerShell (一)如何安装和配置 Azure PowerShell
什么是 Azure PowerShell? Azure PowerShell 是一组模块,提供用于通过 Windows PowerShell 管理 Azure 的 cmdlet.你可以使用 cmdle ...