centos7下用yum源安装ifconfig

  1. |-/etc/sysconfig/network-scripts/ifcfg-ens33 (只要该配置文件,要做备份)
    |-reboot 重启后就不会丢失。
    |-
    TYPE=Ethernet
    BOOTPROTO=static
    PEERROUTES=no
    NAME=ens33
    DEVICE=ens33
    ONBOOT=yes
    IPADDR=192.168.1.110
    NETMASK=255.255.255.0
    GATEWAY=192.168.1.1
    DNS1=8.8.8.8
  2. |-/etc/yum.repos.d (先删掉这里面的东西,rm -rf *)\
    |-cd /etc/yum.repos.d (进入这个目录)

centos7下用yum源安装ifconfig
3.mount /dev/sr0 /opt/ (把dvd通过文件的方式放在opt下)
4.vi dvd.repo

centos7下用yum源安装ifconfig
5.yum install net-toolscentos7下用yum源安装ifconfig
6.yum list
centos7下用yum源安装ifconfig