centos7最小化安装准备工作

[root@localhost ~]# vim /etc/sysconfig/network-scripts/ifcfg-eno16780032

HWADDR=00:0C:29:48:94:20
TYPE=Ethernet
BOOTPROTO=static
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=yes
#IPV6INIT=yes
#IPV6_AUTOCONF=yes
#IPV6_DEFROUTE=yes
#IPV6_PEERDNS=yes
#IPV6_PEERROUTES=yes
#IPV6_FAILURE_FATAL=no
NAME=eno16780032
UUID=0d7a5594-5736-4ef2-b5fa-55ba82da266c
ONBOOT=yes
IPADDR=192.168.1.177
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
DNS1=218.30.19.40
DNS2=61.134.1.4
~                                                                                                                                                                                                                                                
2.重启网卡访问外网

[root@localhost ~]# /etc/init.d/network restart

centos7最小化安装准备工作

3.关闭沙箱

[root@localhost ~]# vim /etc/selinux/config

centos7最小化安装准备工作

[root@localhost ~]# setenforce 0

centos7最小化安装准备工作

4.修改时间

centos7最小化安装准备工作

[root@localhost ~]# ntpdate asia.pool.ntp.org

centos7最小化安装准备工作

5.安装必备工具

[root@localhost ~]# yum install ntpdate net-tools vim wget lrzsz -y

6.修改yum源

[root@localhost ~]# wget 

centos7最小化安装准备工作

备份原有的yum源:

[root@localhost ~]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
更换yum源:

[root@localhost ~]# mv Centos-7.repo /etc/yum.repos.d/CentOS-Base.repo

centos7最小化安装准备工作

7.升级yum源:

清理yum

[root@localhost ~]# yum clean all

升级yum

[root@localhost ~]# yum update -y

保存yum源文件

[root@localhost ~]# yum makecache

8.清空防火墙

[root@localhost ~]# iptables -F

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/zgjspp.html