1.安装底层⼯具 sudo yum install -y yum-utils device-mapper-persistent-data lvm2 2.加⼊阿⾥云yum仓库提速docker下载过程 sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo 3.更新⼀下仓库的源信息 sudo yum makecache 4.⾃动安装下载Docker sudo yum -y install docker-ce 5.启动Docker服务 sudo service docker start 6.验证docker是否启动成功 docker version 7.Aliyun加速镜像下载 Centos命令⾏输⼊下⾯的指令加⼊Aliyun容器镜像,加速镜像的下载 https://cr.console.aliyun.com/cn-shanghai/instances/mirrors
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["https://ufgb0bmz.mirror.aliyuncs.com"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker
231安装OpenJDK8+ yum -y install java-1.8.0-openjdk-devel.x86_64 sudo cat >> /etc/profile <<-'EOF' export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk export JRE_HOME=$JAVA_HOME/jre export CLASSPATH=$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH EOF source /etc/profile echo $JAVA_HOME 标签:JAVA,sudo,export,yum,HOME,Docker,安装,docker From: https://www.cnblogs.com/jiaozg/p/17349914.html