systemctl添加开机启动
我们对service和chkconfig两个命令都不陌生,systemctl 是管制服务的主要工具, 它整合了chkconfig 与 service功能于一体。
systemctl is-enabled iptables.service
systemctl is-enabled servicename.service #查询服务是否开机启动
systemctl enable *.service #开机运行服务
systemctl disable *.service #取消开机运行
systemctl start *.service #启动服务
systemctl stop *.service #停止服务
systemctl restart *.service #重启服务
systemctl reload *.service #重新加载服务配置文件
systemctl status *.service #查询服务运行状态
systemctl --failed #显示启动失败的服务
注:*代表某个服务的名字,如http的服务名为httpd
例如在CentOS 7 上安装http
[root@CentOS7 ~]# yum -y install httpd
启动服务(等同于service httpd start)
systemctl start httpd.service
停止服务(等同于service httpd stop)
systemctl stop httpd.service
重启服务(等同于service httpd restart)
systemctl restart httpd.service
查看服务是否运行(等同于service httpd status)
systemctl status httpd.service
开机自启动服务(等同于chkconfig httpd on)
systemctl enable httpd.service
开机时禁用服务(等同于chkconfig httpd on)
systemctl disable httpd.service
查看服务是否开机启动 (等同于chkconfig --list)
systemctl添加开机启动的更多相关文章
- Linux centOS Ubuntu --- 使用systemctl添加开机启动
我们对service和chkconfig两个命令都不陌生,systemctl 是管制服务的主要工具, 它整合了chkconfig 与 service功能于一体. systemctl is-enable ...
- ubuntu 添加开机启动服务
新建umpserver.service [Unit] Description=UMPServer After=syslog.target network.target remote-fs.target ...
- (转) CentOS 7添加开机启动服务/脚本
CentOS 7添加开机启动服务/脚本 原文:http://blog.csdn.net/wang123459/article/details/79063703 一.添加开机自启服务 在CentOS 7 ...
- centos7如何添加开机启动项?
centos7提供开启服务启动的方式: 1.系统服务管理命令,如果是通过yum安装的软件,开机启动脚本,已经自动创建好了,直接执行如下命令 nginx.service后缀可以省略 systemctl ...
- Centos 7 添加开机启动
1.添加启动服务 添加docker开机启动服务 [root@localhost ~]# systemctl enable docker.serviceCreated symlink from /etc ...
- 不同linux系统添加开机启动程序的命令
see http://phpcj.org/blog/%E4%B8%8D%E5%90%8Clinux%E7%B3%BB%E7%BB%9F%E6%B7%BB%E5%8A%A0%E5%BC%80%E6%9C ...
- centos7之添加开机启动服务/脚本
一.添加开机启动脚本 #!/bin/bash # THIS FILE IS ADDED FOR COMPATIBILITY PURPOSES # # It is highly advisable to ...
- windows添加开机启动项
http://www.cnblogs.com/jokey/archive/2010/06/17/1759370.html添加开机启动项(通过注册表) 例子:增加QQ开机启动项 第一步:找到注册表的启动 ...
- Linux 添加开机启动项的三种方法
linux 添加开机启动项的三种方法. (1)编辑文件 /etc/rc.local 输入命令:vim /etc/rc.local 将出现类似如下的文本片段: #!/bin/sh## This scri ...
随机推荐
- python——虚拟环境之virtualenv(windows10,64位)
1 问题 当我们拥有两个甚至多个项目A.B.C......,各个项目正常运行需求的python运行环境都不相同.而默认情况下,不管哪个项目,使用的都是全局的Python环境.上述情况,造成的问题就是, ...
- Categories VS Extensions (分类 vs 扩展)
转载翻译自:http://rypress.com/tutorials/objective-c/categories 一.Categories(分类) Categories是一个把单个类定义分 ...
- Win平台阅读Kafka源码时候使用bat脚本时候报错以及解决方案
问题1: 使用bat脚本报错: 解决方案: 在配置好kafka的server.properties文件后,cmd进入命令窗口输入命令:.\bin\windows\kafka-server-start. ...
- remove-duplicates-from-sorted-list (删除)
题意略: 思路:先造一个点它与所有点的值都不同,那么只要后面两个点的值相同就开始判断后面是不是也相同,最后将相同的拆下来就可以了. #include<iostream> #include& ...
- ls操作总结
la = ls -a ll = ls -l ls -lsh: ls -lsh train_log 看train_log的软链接的原始路径
- 搭建C++环境
因为测试用例是C++,我必须安装对应的C++环境,否则跑不起C++代码.突然觉得VsCode如此操蛋,觉得为什么就不能像Eclipse中的Maven那样,安装插件就集成了Maven所必需的,省了安装这 ...
- vue 路由的基本使用
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- MATLAB——神经网络构造线性层函数linearlayer
% example5_7.m x=-:; y=*x-; randn(); % 设置种子,便于重复执行 y=y+randn(,length(y))*1.5; % 加入噪声的直线 plot(x,y,'o' ...
- Objective-C 浅拷贝与深拷贝
一个Objective-C对象通常分配在堆上,并有一个或者多个指针指向它.如下代码及其关系图所示: NSObject *obj1 = [[NSObject alloc] init]; NSObject ...
- QT pro文件详细写法+实例
很多的初学者都没有注意pro 文件的内容 今天简单的介绍一下 这个文件主要内容 TEMPLATE:这个变量是用来定义你的工程将被编译成什么模式.如果没有这个设置,系统将默认编译为application ...