1-docker操作系统安装要求
1)操作系统
centos7版本系统,最小化安装
2)vmware net模式
IP配置 需要配置DNS,不然不能ping通域名
TYPE=Ethernet BOOTPROTO=static NAME=ens33 UUID=ab5bdcb8-4a71-473c-856d-c1e6a2b8b326 DEVICE=ens33 ONBOOT=yes IPADDR=192.168.40.180 NETMASK=255.255.255.0 GATEWAY=192.168.40.2 DNS1=192.168.40.2
3)安装阿里源
cd /etc/yum.repos.d/ mkdir bak mv *.repo bak wget http://mirrors.aliyun.com/repo/Centos-7.repo yum repolist
4)补安装tab提示功能
yum -y install bash-completion
5)系统优化
A)设置主机名 hostnamectl set-hostname master1 && bash B)关闭防火墙 service iptables stop && systemctl disable iptables yum install iptables-services -y service iptables stop && systemctl disable iptables iptables -F C)selinux关闭 /etc/selinux/config SELINUX=disabled getenforce D)对时 yum install -y ntp ntpdate crontab -e * */1 * * * /usr/sbin/ntpdate cn.pool.ntp.org systemctl restart crond