一、CentOS7.6操作系统最小化后续配置
①设置主机名称
# hostnamectl status
# hostnamectl set-hostname centos7.itcast.cn
# su
②更改IP获取方式为静态设置以及绑定主机名+IP到/etc/hosts
# vi/etc/sysconfig/network-scripts/ifcfg-ens33
TYPE="Ethernet"
BOOTPROTO="none"
IPADDR=10.1.1.10
NETMASK=255.255.255.0
GATEWAY=10.1.1.2
DNS1=8.8.8.8
DNS2=119.29.29.29
NAME="ens33"
DEVICE="ens33"
ONBOOT="yes"
# vi /etc/hosts
192.168.150.3 centos7.itcast.cn
# systemctl restart network
如果是多网卡形式,建议使用ifdown与ifup# ifdown ens33
# ifup ens33
# ip a
③关闭防火墙与SELinux
# systemctl stop firewalld
# systemctl disable firewalld
# setenforce 0
# vim /etc/selinux/config
SELINUX=disabled
④配公网YUM源(可以考虑腾讯)
# yum install wget -y
# 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 http://mirrors.cloud.tencent.com/repo/centos7_base.repo
# yum clean all
# yum makecache
# yum list
⑤安装扩展软件(bash-completion自动补全、vim编辑器、net-tools网络工具包以及ntpdate 时间同步工具)
# yum install bash-completion vim net-tools ntpdate -y
⑥ ntpdate时间同步
# ntpdate 120.25.108.11
评论区