1.配置网卡
[root@localhost ~]# vim /etc/sysconfig/network-scripts/ifcfg-eno16777736 TYPE=EthernetBOOTPROTO=staticDEFROUTE=yesPEERDNS=yesPEERROUTES=yesIPV4_FAILURE_FATAL=noIPV6INIT=yesIPV6_AUTOCONF=yesIPV6_DEFROUTE=yesIPV6_PEERDNS=yesIPV6_PEERROUTES=yesIPV6_FAILURE_FATAL=noNAME=eno16777736UUID=a73f070f-5c43-4817-89d0-6ab78cc60fe6DEVICE=eno16777736ONBOOT=yesIPADDR=192.168.200.50NETMASK=255.255.255.0GATEWAY=192.168.200.2DNS1=114.114.114.114// 重启网络[root@localhost ~]# systemctl restart network
2.关闭防火墙
// 临时关闭[root@localhost ~]# systemctl stop firewalld// 永久关闭[root@localhost ~]# systemctl disable firewalldRemoved 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=centos7baseurl=file:///opt/centosgpgcheck=0enable=1[root@localhost ~]# yum clean all[root@localhost ~]# yum repolist// 安装依赖[root@localhost ~]# yum install -y vim net-tools unzip gcc tree