centos 6.5 安裝 docker 容器

這裏寫圖片描述

1.系統版本:centos6.5
2.內核需要3.10以上

總體介紹

在centos6.5 中安裝docker 安裝前需要先安裝EPEL,它提供了 docker 的安裝包 docker-io 。隨後即可安裝docker

安裝步驟

1.EPEL 安裝(http://www.cnblogs.com/SunnyZhu/p/5420549.html

在CentOS 上安裝EPEL
要想安裝EPEL,我們先要下載EPEL的rpm安裝包。
CentOS/RHEL下的6.x和5.x版本下載頁面如下
http://download.fedoraproject.org/pub/epel/6/i386/repoview/epel-release.htmlhttp://download.fedoraproject.org/pub/epel/5/i386/repoview/epel-release.html
以上網址可能會被重定向到特定的鏡像站而加快下載速度。這個頁面包含可以直接獲取到rpm包的下載鏈接。直接的下載鏈接如下:
http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpmhttp://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
根據你的CentOS 版本來選擇正確的下載地址。
請注意EPEL 的安裝包是獨立編譯的,所以它可以安裝在32位和64位系統中。
1. 確認你的CentOS 的版本
首先通過以下命令確認你的CentOS 版本
cat/etc/redhatreleaseCentOSrelease6.4(Final)2.EPELrpmCentOSEPEL wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
3. 安裝EPEL
通過以下命令安裝EPEL 軟件包
sudorpmivhepelrelease68.noarch.rpm sudo rpm -ivh epel-release*
5. 檢查EPEL 源
安裝好EPEL 源後,用yum 命令來檢查是否添加到源列表
yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.vonline.vn
* epel: buaya.klas.or.id
* extras: centos-hn.viettelidc.com.vn
* updates: mirrors.fibo.vn
repo id repo name status
base CentOS-6 - Base 6,381
epel Extra Packages for Enterprise Linux 6 - x86_64 10,023
extras CentOS-6 - Extras 13
nginx nginx repo 47
updates CentOS-6 - Updates 1,555
repolist: 18,019
EPEL已經在repo 後列出,並且顯示提供了上萬個軟件包,所以EPEL 已經安裝到你的CentOS了。

EPEL源的配置安裝到了 /etc/yum.repos.d/epel.repo 文件。

2.Docker 安裝

1.若系統有docker包,則先將其移出
$ sudo yum -y remove docker

2.安裝 Docker
$sudo yum -y install docker-io

3.在 docker 安裝完成後需要手動啓動 Docker daemon ,如下:

$ sudo service docker start

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章