1、修改网络配置
vi /etc/sysconfig/network-scripts/ifcfg-eth0 #编辑network配置文件修改以下两项 (eth1同理)
ONBOOT=yes
BOOTPROTO=static
#同时删除UUID MAC
2、安装基础包
[root@localhost ~]# yum -y install gcc glibc gcc-c++ make net-tools screen vim lrzsz tree dos2unix lsof tcpdump bash-completion wget ntp
3、更改yum源地址
wget -O /etc/yum.repos.d/epel.repo https://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
查看修改后的信息。
ls /etc/yum.repos.d/
4、关闭防火墙和selinux
#关闭防火墙
systemctl disable firewalld
systemctl stop firewalld
#关闭selinux
sed -i 's#SELINUX=disabled#SELINUX=enforcing#g' /etc/sysconfig/selinux
5、提权george用户可以使用sudo
useradd xxxxecho "123456"|passwd --stdin niwei
\cp /etc/sudoers /etc/sudoers.oriecho "xxxx ALL=(ALL) NOPASSWD: ALL" >>/etc/sudoerstail -1 /etc/sudoers