1. Modify the network card to start automatically after booting
vi /etc/sysconfig/network-scripts/ifcfg-ens33
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=ens33
UUID=548f2497-de70-4a27-b5d9-fd67e7401699
DEVICE=ens33
ONBOOT=yes
IPADDR=192.168.31.100
NETMAST=255.255.255.0
GATEWAY=192.168.31.1
DNS1=192.168.31.1
DNS2=114.114.114.114
service network restart #restart network service
2. Modify the computer name
hostnamectl set-hostname muban
reboot #reboot
3. Turn off the firewall
systemctl stop firewalld && systemctl disable firewalld
4. close selinux
setenforce 0
sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
5. Modify the Ali image source
yum install wget vim -y
cd /etc/yum.repos.d/
mv CentOS-Base.repo CentOS-Base.repo.bak
wget -O CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
yum clean all
rm -rf /var/cache/yum
yum makecache
6. Install compilation dependencies
Installation dependencies:
yum -y install perl gcc gcc-c++ make cmake kernel kernel-headers kernel-devel net-tools
Install python:
yum install python3
wget https://bootstrap.pypa.io/get-pip.py