一.docker安装与部署

来源:互联网 发布:古希腊神话 知乎 编辑:程序博客网 时间:2024/05/21 06:18

 

 

一.CentOS 6安装Docker

1.安装EPEL镜像源

yum install http://ftp.riken.jp/Linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm

2.关闭selinux

修改配置文件: /etc/selinux/config

 SELINUX=disabled

  8 # SELINUXTYPE= can take one of these two values:

  9 #     targeted - Targeted processes are protected,

 10 #     mls - Multi Level Security protection.

 11 SELINUXTYPE=targeted

 

3.安全起见,先升级系统至最新版本;

yum update -y

4.重启系统

init 6

5. 安装

[root@bogon Desktop]# yum -y install docker-io

Loaded plugins: fastestmirror, refresh-packagekit, security

Setting up Install Process

Loading mirror speeds from cached hostfile

 * epel: mirrors.ustc.edu.cn

Resolving Dependencies

--> Running transaction check

---> Package docker-io.x86_64 0:1.7.1-2.el6 will be installed

--> Processing Dependency: lxc for package: docker-io-1.7.1-2.el6.x86_64

--> Processing Dependency: libcgroup for package: docker-io-1.7.1-2.el6.x86_64

--> Running transaction check

6.启动服务

[root@bogon Desktop]# service docker start

Starting cgconfig service:                                 [  OK  ]

Starting docker:                                         [  OK  ]

 

7.添加随机启动

[root@bogon Desktop]# chkconfig docker on

8.查看服务运行状态

root@bogon Desktop]# service docker status

docker (pid  2752) is running...

1 0
原创粉丝点击