修改服务器yum源
yum -y install wget
cd /etc/yum.repos.d/
sudo mv CentOS-Base.repo CentOS-Base.repo.bak
sudo wget -O CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
sudo wget -P /etc/yum.repos.d/ http://mirrors.aliyun.com/repo/epel-7.repo
yum clean all
yum makecache
yum -y update
安装vim编辑器
yum -y install vim
修改服务器host
hostname tortoise
vim /etc/hostname 修改 localhost.localdomain为xxx 执行:wq! 保存退出
vim /etc/hosts 修改 localhost.localdomain为xxx 执行:wq! 保存退出
shutdown -r now 重启系统
关闭防火墙
systemctl stop firewalld 停止防火墙
systemctl disable firewalld 禁止开机启动防火墙
安装Docker
yum install -y yum-utils device-mapper-persistent-data 安装需要的依赖包
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo 配置仓库
yum install docker-ce 安装Docker社区版
systemctl start docker 启动docker
systemctl enable docker 设置开机启动