1 关闭防火墙
systemctl disable --now firewalld
2 关闭SELinux
vim /etc/selinux/config SELINUX=disabled
3修改网卡
修改centos7,8网卡 nmcli connection show nmcli connection add type ethernet con-name eth0 ifname ens33 nmcli connection delete ens33 ls /etc/sysconfig/network-scripts/ cp /etc/default/grub /etc/default/grub.bak sed -i 's/rhgb/net.ifnames=0 &/' /etc/default/grub grub2-mkconfig -o /boot/grub2/grub.cfg vim /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 NAME=eth0 BOOTPROTO=static IPADDR=10.0.0.8 #每个主机IP不同 PREFIX=24 GATEWAY=10.0.0.2 DNS1=10.0.0.2 DNS2=180.76.76.76 ONBOOT=yes reboot
centos安装完成后建议安装的包
yum install gcc make autoconf gcc-c++ glibc glibc-devel pcre pcre-devel openssl openssl-devel systemd-devel zlib-devel vim lrzsz tree tmux lsof tcpdump wget net-tools iotop bc bzip2 zip unzip nfs-utils man-pages