centos7最小化安装准备工作
1.配置网络
[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
3.关闭沙箱
[root@localhost ~]# vim /etc/selinux/config
[root@localhost ~]# setenforce 0
4.修改时间
[root@localhost ~]# ntpdate asia.pool.ntp.org
5.安装必备工具
[root@localhost ~]# yum install ntpdate net-tools vim wget lrzsz -y
6.修改yum源
[root@localhost ~]# curl -o /etc/yum.repo.d/base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
[root@localhost ~]# curl -o /etc/yum.repo.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
备份原有的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
7.升级yum源:
清理yum
[root@localhost ~]# yum clean all
保存yum源文件
[root@localhost ~]# yum makecache
升级yum
[root@localhost ~]# yum update -y
8.清空防火墙
[root@localhost ~]# iptables -L
[root@localhost ~]# iptables -F
[root@localhost ~]# systemctl stop firewalld.service
[root@localhost ~]# systemctl disable firewalld.service