[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. Docker 安装 Redis 需要注意的地方

    Docker 安装 Redis 需要注意的地方 拉取镜像 docker pull redis 可以使用redis:xxx xxx为版本号,不写默认是latest 启动容器 无配置文件无密码: dock ...

  2. Day7 python高级特性-- 切片 Slice

    先举一个例子,取list或tuple中的某几个元素:     1.取 ['a','b','c','d','e','f'] 第1.2.5.6个元素:        >>> a = [' ...

  3. Elastic Search 学习之路(二)——inverted index(反向索引)

    这是篇翻译文,图画的挺有意思. Elastic使用非常特殊的数据结构,称作反向索引.反向索引中,包括了一组document中出现的唯一的单词,和对应的单词,所出现的位置.反向索引是在ES中,docum ...

  4. DSL查询基础—关键字

    1.query查询语句 { "query" : { "match" : { "last_name" : "Smith" ...

  5. 2020-2021-1 20209307 《Linux内核原理与分析》第二周作业

    1.寻址方式和常用汇编指令 寄存器寻址:movl %eax,%edx  相当于edx=eax 立即寻址:movl $0x123,%edx   相当于edx=0x123 直接寻址:movl 0x123, ...

  6. 【英雄帖】FreeRedis 邀请您一起优化项目。

    嘿!各位!自 FreeRedis 开库以来,相继出现了很多贡献者,我们正在对 FreeRedis 的各功能模块做优化,这并不意味着现版的 FreeRedis 有问题,我们只是希望在某些方面做得更好.如 ...

  7. 网站开发学习Python实现-Django学习-自学注意(6.1.3)

    @ 目录 1.配置文件相关 2.应用创建相关 3.项目相关 4.模板相关 5.其他 关于作者 1.配置文件相关 1.可以更改时间,地区相关(国际化) 2.BASE_DIR很重要,一个工程要有很好的移植 ...

  8. 多任务-python实现-同步概念,互斥锁解决资源竞争(2.1.4)

    @ 目录 1.同步的概念 2.解决线程同时修改全局变量的方式 3.互斥锁 1.同步的概念 同步就是协同步调,按照预定的先后次序进行运行,如你说完我在说 同步在子面上容易理解为一起工作 其实不是,同指的 ...

  9. Redis缓存穿透和缓存雪崩的面试题解析

    前段时间去摩拜面试,然后,做笔试的时候,遇到了几道Redis面试题目,今天来做个总结.捋一下思路,顺便温习一下之前的知识,如果对您有帮助,左上角点下关注 ! 谢谢 文章目录 缓存穿透 缓存雪崩 大家都 ...

  10. 实验题目:python面向对象程序设计

    1.定义并实现一个矩形类Rectangle,其私有实例成员为矩形的左下角与右上角两个点的坐标,能设置左下角和右上角两个点的位置,能根据左下角与右上角两个点的坐标计算矩形的长.宽.周长和面积,另外根据需 ...