[root@localhost ~]# cat /etc/selinux/config # This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing - SELinux security policy is enforced. # permissive - SELinux prints warnings instead of enforcing. # disabled - No SELinux policy is loaded. SELINUX=enforcing # SELINUXTYPE= can take one of these two values: # targeted - Targeted processes are protected, # mls - Multi Level Security protection. SELINUXTYPE=targeted2.修改該配置文件中將enforcing替換為disabled
[root@localhost ~]# cat /etc/selinux/config # This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing - SELinux security policy is enforced. # permissive - SELinux prints warnings instead of enforcing. # disabled - No SELinux policy is loaded. SELINUX=disabled # SELINUXTYPE= can take one of these two values: # targeted - Targeted processes are protected, # mls - Multi Level Security protection. SELINUXTYPE=targeted
3.reboot重啟一下系統,使生效。 四、准備就緒,安裝docker-io,摸摸哒。 [root@localhost ~]# yum install docker-io 已加載插件:fastestmirror, refresh-packagekit, security 設置安裝進程
Loading mirror speeds from cached hostfile * base: mirrors.hust.edu.cn * epel: ftp.cuhk.edu.hk * extras: mirrors.163.com * updates: mirrors.163.com 解決依賴關系 --> 執行事務檢查 ---> Package docker-io.x86_64 0:1.7.1-2.el6 will be 安裝 --> 處理依賴關系 lxc,它被軟件包 docker-io-1.7.1-2.el6.x86_64 需要 --> 處理依賴關系 libcgroup,它被軟件包 docker-io-1.7.1-2.el6.x86_64 需要 --> 執行事務檢查 ---> Package libcgroup.x86_64 0:0.40.rc1-16.el6 will be 安裝 ---> Package lxc.x86_64 0:1.0.7-2.el6 will be 安裝 --> 處理依賴關系 lua-lxc(x86-64) = 1.0.7-2.el6,它被軟件包 lxc-1.0.7-2.el6.x86_64 需要 --> 處理依賴關系 lua-alt-getopt,它被軟件包 lxc-1.0.7-2.el6.x86_64 需要 --> 處理依賴關系 liblxc.so.1()(64bit),它被軟件包 lxc-1.0.7-2.el6.x86_64 需要 --> 執行事務檢查 ---> Package lua-alt-getopt.noarch 0:0.7.0-1.el6 will be 安裝 ---> Package lua-lxc.x86_64 0:1.0.7-2.el6 will be 安裝 --> 處理依賴關系 lua-filesystem,它被軟件包 lua-lxc-1.0.7-2.el6.x86_64 需要 ---> Package lxc-libs.x86_64 0:1.0.7-2.el6 will be 安裝 --> 執行事務檢查 ---> Package lua-filesystem.x86_64 0:1.4.2-1.el6 will be 安裝 --> 完成依賴關系計算 依賴關系解決 ================================================================================================================================================= 軟件包 架構 版本 倉庫 大小 ================================================================================================================================================= 正在安裝: docker-io x86_64 1.7.1-2.el6 epel 4.6 M 為依賴而安裝: libcgroup x86_64 0.40.rc1-16.el6 base 129 k lua-alt-getopt noarch 0.7.0-1.el6 epel 6.9 k lua-filesystem x86_64 1.4.2-1.el6 epel 24 k lua-lxc x86_64 1.0.7-2.el6 epel 15 k lxc x86_64 1.0.7-2.el6 epel 120 k lxc-libs x86_64 1.0.7-2.el6 epel 250 k 事務概要 ================================================================================================================================================= Install 7 Package(s)
總下載量:5.1 M Installed size: 20 M 確定嗎?[y/N]: 還需要我解釋麼,一路y下去。 啟動我們的寶貝docker [root@localhost ~]# /etc/init.d/docker start Starting cgconfig service: [確定] Starting docker: [確定] 查看docker進程 [root@localhost ~]# ps -ef | grep docker root 3602 1 0 18:26 pts/0 00:00:00 /usr/bin/docker -d root 3745 3429 0 18:27 pts/0 00:00:00 grep docker 查看安裝的docker版本 Status: Downloaded newer image for centos:latest [root@localhost ~]# docker version Client version: 1.7.1 Client API version: 1.19 Go version (client): go1.4.2 Git commit (client): 786b29d/1.7.1 OS/Arch (client): linux/amd64 Server version: 1.7.1 Server API version: 1.19 Go version (server): go1.4.2 Git commit (server): 786b29d/1.7.1 OS/Arch (server): linux/amd64 注意: 我在這裡並沒有升級系統內核 [root@localhost ~]# uname -r 2.6.32-573.3.1.el6.x86_64 docker官方文檔說要求Linux kernel至少3.8以上。 在一個新的終端裡守護模式運行docker時,會出現warning [root@localhost ~]# docker -d WARN[0000] You are running linux kernel version 2.6.32-573.3.1.el6.x86_64, which might be unstable running docker. Please upgrade your kernel to 3.10.0. 但是目前表示我可以正常使用。