一、要求html
二、查看當前系統的位數和版本python
[root@jacky jacky]# uname -r 2.6.32-431.el6.x86_64 [root@jacky jacky]# cat /etc/issue CentOS release 6.5 (Final) Kernel \r on an \m
說明當前版本是centos6.5 64位系統linux
三、 安裝yum優先級插件git
#yum installyum-priorities
四、 安裝epelgithub
# rpm -Uvh http://mirrors.ustc.edu.cn/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm # rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
五、查看是否安裝epel成功golang
# rpm -q epel-release
六、導入keydocker
# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
七、修改/etc/yum.repos.d/epel.repo文件,在最後添加一條屬性 priority=11vim
# vim /etc/yum.repos.d/epel.repo
八、重建緩存centos
yum makecache
九、安裝完成以後,確保yum list能找到Docker的相關rpm包緩存
[root@jacky jacky]# yum list | grep docker docker-io.x86_64 1.7.1-2.el6 @epel docker.x86_64 1.5-5.el6 epel docker-io-devel.x86_64 1.7.1-2.el6 epel docker-io-fish-completion.x86_64 1.7.1-2.el6 epel docker-io-logrotate.x86_64 1.7.1-2.el6 epel docker-io-vim.x86_64 1.7.1-2.el6 epel docker-io-zsh-completion.x86_64 1.7.1-2.el6 epel fedora-dockerfiles.x86_64 0-0.12.gitf6cd84c.el6 epel golang-github-docker-libcontainer.x86_64 1.1.0-10.gitdb65c35.el6 epel golang-github-docker-libcontainer-devel.x86_64 golang-github-docker-libtrust-devel.noarch golang-github-docker-libtrust-unit-test.x86_64 golang-github-docker-spdystream-devel.noarch golang-github-docker-spdystream-unit-test.x86_64 golang-github-fsouza-go-dockerclient-devel.noarch golang-github-fsouza-go-dockerclient-unit-test.x86_64 python-docker-py.x86_64 0.7.0-1.el6 epel python-docker-registry-core.noarch 2.0.1-2.el6 epel python-dockerfile-parse.noarch 0.0.5-1.el6 epel [root@jacky jacky]#
十、升級內核
http://www.cnblogs.com/520playboy/p/7041819.html
十一、安裝docker
#yum install docker-io
十二、更新
device-mapper-libs
# yum upgrade device-mapper-libs
1三、啓動docker
[root@jacky jacky]# service docker service
1四、設置docker開機自啓動
#chkconfig docker on
1五、測試
[root@jacky jacky]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
1八、查看docker版本
[root@jacky jacky]# docker --version
Docker version 1.7.1, build 786b29d/1.7.1
安裝成功