升级内核至3.10.28
导入public key:rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
安装ELRepo:rpm -ivh http://mirror.ventraip.net.au/elrepo/elrepo/el6/x86_64/RPMS/elrepo-release-6-5.el6.elrepo.noarch.rpm
安装kernel-lt(lt=long-term,3.10.28):yum --enablerepo=elrepo-kernel install kernel-lt -y
修改Grub引导顺序:vim /etc/grub.conf
default=0
重启:reboot
安装docker
安装yum源:yum -y install http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
安装docker:yum install docker-io
启动docker
启动docker:service docker start
查看版本:docker version
查看日志:tail -f /var/log/docker
运行helloworld:docker run hello-world
启用docker官方中国区加速器:
修改配置文件:vim /etc/sysconfig/docker
other_args=--registry-mirror=https://registry.docker-cn.com
重启docker:service docker restart
下载go和c++版以太坊客户端
go版:docker pull ethereum/client-go
c++版:docker pull ethereum/client-cpp
下载和运行go和c++版以太坊客户端
下载go版:docker pull ethereum/client-go
运行go版:docker run -it --name ethereum-testgo -v /Users/alice/ethereum:/root -p 8545:8545 -p 30303:30303 ethereum/client-go --testnet console
下载c++版:docker pull ethereum/client-cpp
运行c++版:
mkdir -p ~/.ethereum ~/.web3
docker run --rm -it -p 127.0.0.1:8545:8545 -p 0.0.0.0:30303:30303 -v ~/.ethereum:/.ethereum -v ~/.web3:/.web3 -e HOME=/ --user $(id -u):$(id -g) ethereum/client-cpp
geth attach ipc:/$HOME/.ethereum/geth.ipc
列出所有容器:docker ps -al
关闭容器:docker stop d00ec3885630
参考文档:
Centos6.5下docker 环境搭建
http://www.cnblogs.com/saneri/p/6178536.html
Docker 中国官方镜像加速
https://www.docker-cn.com/registry-mirror