Linux - 利用systemctl命令管理服务
systemctl命令是系统服务管理器指令,融合了service和chkconfig的功能,可以查看和设置服务。
这里以docker服务为例。
利用systemctl命令管理
显示服务状态:systemctl status docker.service
列出服务层级和依赖关系:systemctl list-dependencies docker.service
启动服务:systemctl start docker.service
关闭服务:systemctl stop docker.service
重启服务:systemctl restart docker.service
设置服务自启动:systemctl enable docker.service
禁止服务自启动:systemctl disable docker.service
查看服务是否自启动:systemctl is-enabled docker.service
列出系统所有服务的启动情况:systemctl list-units --type=service
列出所有自启动服务:systemctl list-unit-files|grep enabled
对应的旧指令(chkconfig、service)
显示服务状态:service docker status
列出服务层级和依赖关系:systemctl list-dependencies docker.service
启动服务:service docker start
关闭服务:service docker stop
重启服务:service docker restart
设置服务自启动:chkconfig --level 3 docker on
禁止服务自启动:chkconfig --level 3 docker off
查看服务是否自启动:chkconfig --list docker
列出系统所有服务的启动情况:chkconfig --list
Linux - 利用systemctl命令管理服务的更多相关文章
- Linux中用systemctl命令管理服务
systemctl start foo.service 启动服务systemctl restart foo.service 重启服务systemctl stop foo.service 停止服务sys ...
- 使用systemctl命令管理服务mysql
启动mysql systemctl start mysqld.service 停止mysql systemctl stop mysqld.service 重启mysql systemctl resta ...
- Linux中systemctl命令详细介绍
Linux Systemctl是一个系统管理守护进程.工具和库的集合,用于取代System V.service和chkconfig命令,初始进程主要负责控制systemd系统和服务管理器.通过Syst ...
- linux的systemctl 命令用法 转
目录 预热 管理单个 unit 查看系统上的 unit 管理不同的操作环境(target unit) 检查 unit 之间的依赖性 相关的目录和文件 systemctl daemon-reload 子 ...
- Windows:使用Dos命令管理服务(Services)
Windows 服务器系列: Windows:查看IP地址,IP地址对应的机器名,占用的端口,以及占用该端口的应用程 Windows:使用Dos命令管理服务(Services) Windows:任务调 ...
- Linux的setup命令启动服务名称和功能
Linux的setup命令启动服务名称和功能 1 anacron 可执行crontab既定时间内没执行的工作.2 atd 单一使用的例行性命令.3 apmd 了解系统电池电量(手提式计算机使用).4 ...
- Linux利用nc命令脚本批量检测服务器指定端口是否开放
一.nc命令检测端口的用法 # nc -v -w 10 %IP% -z %PORT% -v 显示指令执行过程. -w <超时秒数> 设置等待连线的时间. -u 表示使用UDP协议 -z 使 ...
- 把Asp.Net Core 2.0部署在Linux上,使用Nginx代理服务器,并且用Systemctl命令以服务的方式监听项目
在Linux上部署.net core 2.0程序: 第一步:配置Nginx代理 在/etc/nginx/sites-available/default 中添加 server { listen ; lo ...
- CentOS7 使用systemctl来管理服务
1.建立service文件 以tomcat为例 , 建立tomcat.service文件 #服务说明 [Unit] #服务描述 Description=Tomcat Service #前置需要启动的服 ...
随机推荐
- office 安装
在 gaobo百度云下载安装包. 自定义安装,并在自定义界面选择安装路径. 破解:
- 十一、Composite 组合模式
原理: 代码清单 Entity public abstract class Entry { public abstract String getName(); public abstract int ...
- pipeline-安全测试
代码安全检查 需要安装SonarQube(版本6.7,安装了Findbugs插件) MySQL >=5.6,笔者安装的是MySQL 5.7版本 Jenkins需要安装下列插件: SonarQub ...
- HDU 6301 Distinct Values
题目链接 http://acm.hdu.edu.cn/showproblem.php?pid=6301 多校contest1 题目大意是有一个长度为N的数组,给出M个"事实",每个 ...
- Windows Server 2016离线安装.NET Framework 3.5
windows server 2016默认是不安装.netframework3.5的,可以在添加删除程序中单独添加.但是有时候系统安装文件不在的时候,找不到安装程序就不能安装成功. 这时候单独下载do ...
- EasyUI datagrid单元格文本超出显示省略号,鼠标移动到单元格显示文本
nowrap : true; 是前提 $('#×××').datagrid({ nowrap : true,//设置为true,当数据长度超出列宽时将会自动截取 }); 省略号样式: <sty ...
- 151. Reverse Words in a String翻转一句话中的单词
[抄题]: Given an input string, reverse the string word by word. Example: Input: "the sky is blue& ...
- viewstate?
用于存放数据,可永久保存,存放在页面的隐藏控件里 支持string,integer,array,boolean,ArrayList,hashtable类型,使用viewstate会增加页面h ...
- [leetcode]87. Scramble String字符串树形颠倒匹配
Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrin ...
- React-router4 第七篇 Recursive Paths 递归路径
https://reacttraining.com/react-router/web/example/recursive-paths import React from 'react' import ...