CentOS-6.5離線安裝docker-1.7教程

來源:互聯網
上載者:User
CentOS-6.5離線安裝docker-1.7教程 0.  準備

本文是類比實際上線時,沒有網路的情況下使用rpm包安裝docker-1.7的方法。不過安裝中也是使用yum,相比較直接使用rpm安裝,yum可以解決一些庫檔案的依賴關係。

# cd /etc/yum.repos.d/

# mkdir bak

# mv * bak/

1.  安裝libcgroup

# cd cgroup/

# yum installlibcgroup-0.40.rc1-16.el6.x86_64.rpm

2.  安裝lxc

# yum installlua-filesystem-1.4.2-1.el6.x86_64.rpm lua-alt-getopt-0.7.0-1.el6.noarch.rpmlxc-libs-1.0.7-2.el6.x86_64.rpm lxc-1.0.7-2.el6.x86_64.rpmlua-lxc-1.0.7-2.el6.x86_64.rpm

3.  安裝docker

# yum installdocker-io-1.7.1-2.el6.x86_64.rpm

4.  更新device-mapper-libs

# yum installdevice-mapper-*

5.    設定開機自啟

# chkconfig docker on 6.    檢查支援情況

# lxc-checkconfig 7.    啟動cgroup

# service cgconfig start

8.  啟動docker

9.  測試

# docker ps –a

10.        常見錯誤

l 啟動docker報錯,錯誤log:

INFO[0000] +jobserveapi(unix:///var/run/docker.sock)

INFO[0000] Listening forHTTP on unix (/var/run/docker.sock)

INFO[0000] WARNING: You arerunning linux kernel version 2.6.32-504.8.1.el6.x86_64, which might be unstablerunning docker. Please upgrade your kernel to 3.8.0.

docker: relocationerror: docker: symbol dm_task_get_info_with_deferred_remove, version Base notdefined in file libdevmapper.so.1.02 with link time reference

原因:是因為libdevmapper版本太舊,需要update。執行步驟4即可。

 

l 啟動docker出錯,錯誤log為:

[root@csv-bdyx01yum.repos.d]# docker -d &

[1] 7449

[root@csv-bdyx01yum.repos.d]# WARN[0000] You are running linux kernel version2.6.32-431.el6.x86_64, which might be unstable running docker. Please upgradeyour kernel to 3.10.0.

INFO[0000] [graphdriver]using prior storage driver "devicemapper"

INFO[0000] Listening forHTTP on unix (/var/run/docker.sock)

WARN[0000] Running modprobebridge nf_nat failed with message: , error: exit status 1

WARN[0000] Yourkernel does not support cgroup memory limit: mountpoint for memory not found

WARN[0000]mountpoint for cpu not found                

FATA[0000] Errormounting devices cgroup: mountpoint for devices not found

原因:cgconfig未啟動。執行步驟7即可。


相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.