yum grouplist #通常是安裝這兩個軟件包組,這樣作會肯定你擁有編譯時所需的一切工具
yum groupinstall "Development Tools" #你必須這樣才能讓 make *config 這個指令正確地執行
yum install ncurses-devel #若是你沒有 X 環境,這一條能夠不用
yum install qt-devel #建立 CentOS-6 內核時須要它們
yum install hmaccalc zlib-devel binutils-devel elfutils-libelf-devel linux
cd /usr/src/
wget https://mirrors.edge.kernel.org/pub/linux/kernel/v3.x/linux-3.10.105.tar.gzdocker
tar xzvf linux-3.10.105.tar.gz
cd /usr/src/linux-3.10.105vim
#複製原內核配置
cp /boot/config-* .config
vim .config工具
/*將以下內容 追加入.config 並保存
CONFIG_NF_NAT_IPV4=y
CONFIG_IP_NF_TARGET_MASQUERADE=y
CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=y
CONFIG_MEMCG_SWAP=y
CONFIG_MEMCG_SWAP_ENABLED=y
CONFIG_AUFS_FS=y
CONFIG_DM_THIN_PROVISIONING=y
CONFIG_OVERLAY_FS=y
CONFIG_CGROUP_PERF=y
CONFIG_CFS_BANDWIDTH=y
HYPERVISOR_GUEST=y
CONFIG_VMWARE_BALLOON=m
*/spa
#編輯內核配置,開啓內核CGROUP支持
make menuconfig
#選擇General setup-->Control Group support->Memory Resource Controller for Control Groups選中.net
#自動整理.config
sh -c 'yes "" | make oldconfig'線程
#編譯並安裝內核(j4表明4個線程同時編譯,請根據你的機器狀況設置,由於虛擬機的緣故,中間卡了幾回,重啓接着步驟作,程序返回正常就OK)
make -j4 bzImage && make -j4 modules && make -j4 modules_install && make installblog
遇到的問題:
ERROR: modinfo: could not find module sco
ERROR: modinfo: could not find module l2cap
ERROR: modinfo: could not find module vmhgfs
ERROR: modinfo: could not find module vsock
ERROR: modinfo: could not find module vmware_balloon
ERROR: modinfo: could not find module vmci
參考 https://blog.csdn.net/jlh912008548/article/details/72943741
lsmod | grep sco
lsmod | grep l2cap
lsmod | grep vmhgfs
lsmod | grep vsock
lsmod | grep vmware_balloon
lsmod | grep vmci
直接進行下一步ci
vim /etc/grub.conf
修改default=0保存,即選擇從你新編譯的內核啓動linuxget
#重啓
reboot
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
yum -y install docker-io
docker version
#啓動docker服務
sudo service docker start
參考: https://blog.csdn.net/u014057054/article/details/72461630 https://blog.csdn.net/wuapeng/article/details/51728614 https://blog.csdn.net/jlh912008548/article/details/72943741