[root@liuawen local]# docker -v
Docker version 1.13.1, build cccb291/1.13.1
[root@liuawen local]#

启动、关闭与重启docker时

[root@liuawen ~]# service docker stop
Redirecting to /bin/systemctl stop docker.service
[root@liuawen ~]# service docker start
Redirecting to /bin/systemctl start docker.service
[root@liuawen ~]# service docker restart
Redirecting to /bin/systemctl restart docker.service
[root@liuawen ~]#

出现这个Redirecting to /bin/systemctl start docker.service。

https://docs.docker.com/config/daemon/systemd/

大多数Linux发行版本使用systemctl启动服务,如果不是那就尝试使用下service来启动。

我的环境是使用这个systemctl start docker来启动。

查看下ps -ef | grep "docker" docker启动了

启动docker:systemctl start docker

停止docker:systemctl stop docker

重启docker:systemctl restart docker

[root@liuawen local]# systemctl start docker
[root@liuawen local]# ps -ef | grep "docker"
root 25171 1 0 11:14 ? 00:00:00 /usr/bin/dockerd-current --add-runtime docker-runc=/usr/libexec/docker/docker-runc-current --default-runtime=docker-runc --exec-opt native.cgroupdriver=systemd --userland-proxy-path=/usr/libexec/docker/docker-proxy-current --init-path=/usr/libexec/docker/docker-init-current --seccomp-profile=/etc/docker/seccomp.json --selinux-enabled --log-driver=journald --signature-verification=false --storage-driver overlay2
root 25177 25171 0 11:14 ? 00:00:00 /usr/bin/docker-containerd-current -l unix:///var/run/docker/libcontainerd/docker-containerd.sock --metrics-interval=0 --start-timeout 2m --state-dir /var/run/docker/libcontainerd/containerd --shim docker-containerd-shim --runtime docker-runc --runtime-args --systemd-cgroup=true
root 25887 21199 0 11:24 pts/2 00:00:00 grep --color=auto docker
[root@liuawen local]# systemctl stop docker
[root@liuawen local]# ps -ef | grep "docker"
root 25910 21199 0 11:24 pts/2 00:00:00 grep --color=auto docker
[root@liuawen local]# systemctl restart docker
[root@liuawen local]# ps -ef | grep "docker"
root 25960 1 2 11:24 ? 00:00:00 /usr/bin/dockerd-current --add-runtime docker-runc=/usr/libexec/docker/docker-runc-current --default-runtime=docker-runc --exec-opt native.cgroupdriver=systemd --userland-proxy-path=/usr/libexec/docker/docker-proxy-current --init-path=/usr/libexec/docker/docker-init-current --seccomp-profile=/etc/docker/seccomp.json --selinux-enabled --log-driver=journald --signature-verification=false --storage-driver overlay2
root 25966 25960 0 11:24 ? 00:00:00 /usr/bin/docker-containerd-current -l unix:///var/run/docker/libcontainerd/docker-containerd.sock --metrics-interval=0 --start-timeout 2m --state-dir /var/run/docker/libcontainerd/containerd --shim docker-containerd-shim --runtime docker-runc --runtime-args --systemd-cgroup=true
root 26063 21199 0 11:25 pts/2 00:00:00 grep --color=auto docker
[root@liuawen local]#

使用systemctl 来启动、停止、重启docker都可以了。

【Docker】Docker启动停止重启 Redirecting to /bin/systemctl start docker.service的更多相关文章

  1. nginx启动失败:Redirecting to /bin/systemctl start nginx.service Failed to start nginx.service: Unit not found.

    解决方法: 是因为nginx没有有添加到系统服务,手动手动添加一个即可. 在 /etc/init.d/下创建名为nginx的启动脚本即可,内容如下: #!/bin/bash # # chkconfig ...

  2. 重启ssh服务出现Redirecting to /bin/systemctl restart sshd.service

    转自:https://blog.csdn.net/caijunfen/article/details/70599138 CentOs 重启ssh服务的命令如下: # service sshd rest ...

  3. 安装和启动tftp-server服务器及可能出现Redirecting to /bin/systemctl restart xinetd.service问题的解决方式

    安装和启动tftp-server服务器及可能出现Redirecting to /bin/systemctl restart xinetd.service问题的解决方式 1)首先,检查服务器已安装的tf ...

  4. Linux Redirecting to /bin/systemctl restart iptables.service

    方案 一 1.昨天碰到一个错误,linux下输入命令:service iptables restart时,总会报下面一个提示很简单,这句话的意思就是让你重定向到systemctl然后再启用,白话就是说 ...

  5. 【linux】CentOS 6 使用cron定时任务,报错:Redirecting to /bin/systemctl restart crond.service

    在centos7上,执行cron定时任务的相关命令,反馈如下: 定时任务执行,反馈是: Redirecting to /bin/systemctl restart crond.service 原因: ...

  6. linux出现Redirecting to /bin/systemctl start mysqld.service,解决方法

    上去就是一个命令     /bin/systemctl start httpd.service

  7. 阿里云报错Redirecting to /bin/systemctl restart sshd.service

    转:http://blog.csdn.net/caijunfen/article/details/70599138 云服务器 ECS Linux CentOS 7 下重启服务不再通过 service  ...

  8. Redirecting to /bin/systemctl restart mysql. service Failed to restart mysql.service: Unit not found.

    使用如下命令操作mysql即可: systemctl restart mysqld.service systemctl start mysqld.service systemctl stop mysq ...

  9. Linux Systemd——在RHEL/CentOS 7中启动/停止/重启服务

    RHEL/CentOS 7.0中一个最主要的改变,就是切换到了systemd.它用于替代红帽企业版Linux前任版本中的SysV和Upstart,对系统和服务进行管理.systemd兼容SysV和Li ...

随机推荐

  1. JavaScript:使用递归构建树型菜单

    使用递归函数将扁平数据转为树型结构,并渲染到页面 效果图: 代码: <!DOCTYPE html> <html lang="en"> <head> ...

  2. 定制iview选择器——全选按钮

    源码下载:https://github.com/littleOneYuan/c_select 本文索引 效果 template data prop methods watch created 效果 下 ...

  3. 记一次HBase的NotServingRegionException问题

    1. 问题 在hbase测试集群上,访问一些hbase表,均报类似下面的错误:region不可用 Wed Oct 28 14:00:56 CST 2020, RpcRetryingCaller{glo ...

  4. 面试 04-HTTP协议

    04-HTTP协议 一面中,如果有笔试,考HTTP协议的可能性较大. #前言 一面要讲的内容: HTTP协议的主要特点 HTTP报文的组成部分 HTTP方法 get 和 post的区别 HTTP状态码 ...

  5. SQL注入----盲注总结

    参考文章:https://mp.weixin.qq.com/s?__biz=MzIzMTc1MjExOQ==&mid=2247490388&idx=1&sn=c677837d7 ...

  6. 彻底理解Hive中的锁

    前面遇到过一次因为Hive中表被锁住了,导致定时任务一直失败.这两天又出现了表被锁,原因是连接hiveserver2过于频繁,mysql连接被打满,引发的连锁反应,导致我们的小时任务一直失败,下午重点 ...

  7. 不一样的资产安全 3D 可视化平台

    前言   数字经济时代,应用好数据是企业数字化转型的关键,基于前沿科学技术进行数据的有效管控,更是对数字增值服务的新趋势.近年来,整个安全行业对资产管理的重视程度正在提高.据IDC发布的相关数据显示, ...

  8. ID3很不错的讲解(matlab程序实现)

    1)决策树之ID3 决策树算法是分类算法的一种,基础是ID3算法,C4.5.C5.0都是对ID3的改进.ID3算法的基本思想是,选择信息增益最大的属性作为当前的分类属性. 看Tom M. Mitche ...

  9. AOP的姿势之 简化 MemoryCache 使用方式

    0. 前言 之前写了几篇文章介绍了一些AOP的知识, 但是还没有亮出来AOP的姿势, 也许姿势漂亮一点, 大家会对AOP有点兴趣 内容大致会分为如下几篇:(毕竟人懒,一下子写完太累了,没有动力) AO ...

  10. [leetcode72]166. Fraction to Recurring Decimal手动实现除法

    让人火大的一道题,特殊情况很多 不过也学到了: java中int类型的最大值的绝对值比最小值的绝对值小1 int最小值的绝对值还是负的,除以-1也是 这种时候最好转为long类型进行处理 long n ...