安装git
# 1. 卸载旧版本
yum remove git
# 2. 安装 yum 源的 Git 版本
yum install -y git
# 3. 查看版本
git version
# 输出 git version 1.8.3.1
git配置
# 配置用户名
git config --global user.name "yourname"
# 配置邮箱
git config --global user.email "[email protected]"
# 生成SSH密钥
ssh-keygen -t rsa -C “your email address”
安装wget
# 如果没有安装 wget 则安装
yum install -y wget
安装docker
# 安装yum-config-manager
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
# 安装前先更新yum软件包索引
yum makecache fast
# 添加 `yum` 源
# 阿里镜像仓库 :(推荐)
sudo yum-config-manager \
--add-repo \
http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
# 安装最新版本
sudo yum install docker-ce docker-ce-cli http://containerd.io
# 安装指定版本
sudo yum install docker-ce-<VERSION_STRING> docker-ce-cli-<VERSION_STRING> containerd.io
# 运行docker
sudo systemctl start docker
yum 安装报错解决办法
You can remove cached packages by executing 'yum clean packages'.
Error: GPG check FAILED
# 在安装命令后加 --nogpgcheck
卸载docker
# 卸载
sudo yum remove docker-ce
#主机上的镜像、容器、卷或自定义配置文件不会自动删除,删除所有镜像、容器和卷:
sudo rm -rf /var/lib/docker