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 #前置需要启动的服 ...
随机推荐
- 教女朋友写第一个php
1 首先 下载xampp 软件.按默认安装好之后 在电脑的右下角的箭头里能发现一个橘色的小图标 双击它 启动阿帕奇和mysql 会变绿 2 打开 C:\xampp\apache 文件夹 找到httpd ...
- mongodb-MYSQL
#encoding:utf8 import pymongoimport MySQLdbimport randomdef GetMongoData(): MyQuery = Mongo_Tab.find ...
- nginx实现http www服务的方式
- 156. Binary Tree Upside Down反转二叉树
[抄题]: Given a binary tree where all the right nodes are either leaf nodes with a sibling (a left nod ...
- 515. Find Largest Value in Each Tree Row查找一行中的最大值
[抄题]: You need to find the largest value in each row of a binary tree. Example: Input: 1 / \ 3 2 / \ ...
- JVM思考-ClassLoader.loadClasshe和Class.forName区别
JVM思考-ClassLoader.loadClasshe和Class.forName区别 目录:JVM总括:目录 见博客第四节:JVM总括四-类加载过程.双亲委派模型.对象实例化过程
- 时间戳转中国人能看得懂的日期格式 yy-mm-dd
很多项目都会用到时间戳的转换 说实话 我现在的这家公司超级好 因为后太要求传数据的时候竟然可以是时间戳的格式 我觉得我好幸福 哈哈哈 不过 等后台转给你数据的时候很多时候都是时间戳 这时候就得前端转 ...
- wincvs配置方法
1.安装wincvs_中文1.3.exe 2.安装cvsnt-2.5.03.2260.msi 安装过程中选择complete选项 3.安装python221-setup.exe 安装完成后,先配置环 ...
- 使用jquery load遇到一个问题解决
1.环境 动态加载页面后给页面中的控件动态赋值,赋完更新后一闪值就没了. 2.原因 load()方法是异步加载,页面没有加载完就开始赋值,导致情况出现. 3.解决 加载完成后赋值 $(&qu ...
- VM无法连接到虚拟机
The VMware Authorization Service is not running. 原因 虚拟机服务没有开启 解决方法 1. 我的电脑右击->管理 2. 打开服 ...