安装CentOS7.7 minimal版本后的配置
1、安装必备软件
yum install -y zip unzip lrzsz vim net-tools
2、网卡自启动
vim /etc/sysconfig/network-scripts/ifcfg-p8p1
ONBOOT=yes
3、关闭防火墙和selinux
systemctl stop firewalld.service
systemctl disable firewalld.service
vim /etc/sysconfig/selinux
SELINUX=disabled
4、添加开机启动项,并设置可执行
vim /etc/rc.d/rc.local
chmod a+x /etc/rc.d/rc.local
5、安装ntp修改时区
安装ntp服务软件包:yum -y install ntp
将ntp设置为缺省启动:systemctl enable ntpd
修改启动参数,增加-g -x参数,允许ntp服务在系统时间误差较大时也能正常工作:vi /etc/sysconfig/ntpd
启动ntp服务:service ntpd restart
将系统时区改为上海时间(即CST时区):ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
时间写入cmos
输入date命令查看时间是否正确