码迷,mamicode.com
首页 > 其他好文 > 详细

CentOS 修改源为163和指定epel源和docker安装

时间:2017-07-01 14:38:31      阅读:191      评论:0      收藏:0      [点我收藏+]

标签:site   attribute   开机启动   title   安装   epo   完成   str   repo   

首先备份/etc/yum.repos.d/CentOS-Base.repo
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

下载对应版本repo文件, 放入/etc/yum.repos.d/(操作前请做好相应备份)

运行yum makecache生成缓存

eple源:

rpm -Uvh http://ftp.sjtu.edu.cn/fedora/epel/6/i386/epel-release-6-8.noarch.rpm

docker 安装:

You will need RHEL 6.5 or higher, with a RHEL 6 kernel version 2.6.32-431 or higher as this has specific kernel fixes to allow Docker to work.

CentOS 6.5已经是2.6.32-431内核了,所以最好安装这个版本。

yum -y install docker-io
升级:
yum -y update docker-io

手动升级:

 

wget https://get.docker.io/builds/Linux/x86_64/docker-latest -O docker
mv -f docker /usr/bin/docker

升级完成

 

启动:

service docker start

开机启动:

 

chkconfig docker on

CentOS 修改源为163和指定epel源和docker安装

标签:site   attribute   开机启动   title   安装   epo   完成   str   repo   

原文地址:http://www.cnblogs.com/hanson1/p/7102117.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!