Linux MiniMal版本常规所需环境安装
生活随笔
收集整理的這篇文章主要介紹了
Linux MiniMal版本常规所需环境安装
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
Docker 環境安裝
前置工作 之 基礎環境安裝
當前環境
centos7.9 64位 minimal版本
當前環境為 root用戶
若當前存在Docker環境 需卸載
yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-engine
更新 yum 并下載curl工具
yum update -y && yum install curl -y
安裝net-tool
yum -y install net-tools.x86_64
安裝Wget
yum -y install wget
安裝gcc相關環境
yum -y install gcc
yum -y install gcc-c++
安裝yum工具包
yum install -y yum-utils
修改為阿里云yum源(不可以先更換源、應先執行上面的命令、否則會導致yum失效)
cd /etc/yum.repos.d
mv CentOS-Base.repo CentOS-Base.repo.bk
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
yum clean all
yum makecache
yum makecache fast
設置docker的倉庫地址
阿里云
yum-config-manager \
--add-repo \
http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
清華大學
yum-config-manager \
--add-repo \
https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/centos/docker-ce.repo
Docker 安裝
安裝docker
yum install docker-ce docker-ce-cli containerd.io
啟動docker
systemctl start docker
重啟docker
systemctl restart docker
打印HelloWorld
docker run hello-world
出現以下內容即為成功
總結
以上是生活随笔為你收集整理的Linux MiniMal版本常规所需环境安装的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 【JAVA秒会技术之秒杀面试官】Java
- 下一篇: linux 其他常用命令