1.配置网卡
[root@localhost ~]# vim /etc/sysconfig/network-scripts/ifcfg-eno16777736
TYPE=Ethernet
BOOTPROTO=static
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME=eno16777736
UUID=a73f070f-5c43-4817-89d0-6ab78cc60fe6
DEVICE=eno16777736
ONBOOT=yes
IPADDR=192.168.200.50
NETMASK=255.255.255.0
GATEWAY=192.168.200.2
DNS1=114.114.114.114
// 重启网络
[root@localhost ~]# systemctl restart network
2.关闭防火墙
// 临时关闭
[root@localhost ~]# systemctl stop firewalld
// 永久关闭
[root@localhost ~]# systemctl disable firewalld
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.
// 关闭selinux
[root@localhost ~]# setenforce 0
[root@localhost ~]#vim /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disable
# SELINUXTYPE= can take one of three two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
3.挂载配置yum源
// 挂载
[root@localhost ~]# mkdir /opt/centos
[root@localhost ~]# mount -o loop /dev/cdrom /opt/centos/
// 其他文件移到media
[root@localhost ~]# mv /etc/yum.repos.d/* /media/
// 配置yum源
[root@localhost ~]# vim /etc/yum.repos.d/local.repo
[centos]
name=centos7
baseurl=file:///opt/centos
gpgcheck=0
enable=1
[root@localhost ~]# yum clean all
[root@localhost ~]# yum repolist
// 安装依赖
[root@localhost ~]# yum install -y vim net-tools unzip gcc tree