centos7 集群准备
hostnamectl set-hostname master
hostname
systemctl stop firewalld
systemctl disable firewalld
systemctl status firewalld
swapoff -a
vi /etc/fstab
free -h
setenforce 0
vi /etc/selinux/config
SELINUX=disabled
vi /etc/sysconfig/network-scripts/ifcfg-ens33
BROWSER_ONLY="no"
BOOTPROTO="static"#
NAME="ens33"
UUID="981d99bc-f371-4958-aaf9-b87fb063591c"
DEVICE="ens33"
ONBOOT="yes"#将网卡设置为开机启用
IPADDR="192.168.31.20"#ip地址
PREFIX="24"
GATEWAY="192.168.31.2"#网关
DNS1=114.114.114.114
DNS2=192.168.31.1
service network restart
yum install -y wget
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
yum makecache
timedatectl status
timedatectl set-timezone Asia/Shanghai
yum install -y chrony
chronyc -n sources -v
chronyc tracking
timedatectl status