A few days ago I minimized installed a bit of CentOS7, entered the system found no ifconfig This network configuration work, and want to rush to the Internet, how to do it. Here are the workarounds I've given:
1. Configure the Yum source with light drive, install Net-tools this package (or use RPM command).
1.1, the CentOS default Yum source in addition (CENTOS-MEDIA.REPO) moved to a specified directory, I was in the Yum source configuration file to build a directory called Repo, the following is the specific operation:
[[email protected] ~]# cd /etc/yum.repos.d/ [[email protected] yum.repos.d]# ls Centos-base.repo centos-cr.repo centos-debuginfo.repo centos-fasttrack.repo CentO S-Media.repo CentOS-Sources.repo centos-vault.repo [[email protected] yum.repos.d]# mkdir repo [[email protected] yum.repos.d]# ls centos-base.repo CentOS-Debuginfo.repo CentOS-Media.repo CentOS-Vault.repo centos-cr.repo centos-fasttrack.repo centos-sources.repo repo [[email protected] yum.repos.d]# mv *.repo Repo/ [[email prOtected] yum.repos.d]# ls repo [[email protected] yum.repos.d]# cd repo/ [[email protected] repo]# ls CentOS-Base.repo CentOS-CR.repo CentOS-Debuginfo.repo CentOS-fasttrack.repo CentO S-Media.repo centos-sources.repo centos-vault.repo [[email protected] repo]#  MV CENTOS-MEDIA.REPO&NBSP, .... / [[email protected] repo]# ls centos-base.repo centos-cr.repo centos-debuginfo.repo centos-fasttrack.repo cento S-Sources.repo CentOS-Vault.repo [[email PROTECTED] REPO]# CD&NBSP, .... [[email protected] yum.repos.d]# ls &nbSp; centos-media.repo repo
1.2, mount the optical drive configuration yum source of the specific steps:
[[email protected] yum.repos.d]# Mount /dev/sr0 /media/ mount: /dev/sr0 is write-protected, mounting read-only #以上是挂载光驱的命令和操作步骤 [[email protected] yum.repos.d]# cat CentOS-Media.repo [c7-media] name=centos-$releasever - Media baseurl=file:///media/ gpgcheck=1 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 #以上光驱yum源的配置文档 [[email protected] yum.repos.d]# yum list | wc -l 3776 #用yum List to see if there is a problem testing the Yum source
1.3. Install Net-tools kit with Yum
[[email protected] yum.repos.d]# yum install net-tools - y loaded plugins: fastestmirror, langpacks Loading mirror speeds from cached hostfile resolving dependencies --> running transaction check ---> Package net-tools.x86_64 0:2.0-0.17.20131004git.el7 will be INSTALLED    --> FINISHED DEPENDENCY RESOLUTION   &NBSP, ..... ......... running transaction installing : net-tools-2.0-0.17.20131004git.el7.x86_64 1/1 Verifying : net-tools-2.0-0.17.20131004git.el7.x86_64 1/1 Installed: net-tools.x86_64 0:2.0-0.17.20131004git.el7 complete!
1.4. Test ifconfig Command
[[email protected] yum.repos.d]# ifconfig eno16777736: flags=4163 <UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.1.131 netmask 255.255.255.0 Broadcast 192.168.1.255 inet6 fe80::20c:29ff:fe2d:c130 prefixlen 64 scopeid 0x20<link> ether 00:0c:29:2d:c1:30 txqueuelen 1000 (Ethernet) RX packets 53366 bytes 3890372 (3.7&NBSP;MIB) RX errors 0 dropped 0 overruns 0 frame 0 &Nbsp; tx packets 47832 bytes 22949340 (21.8&NBSP;MIB) tx errors 0 dropped 0 overruns 0 carrier 0 Collisions 0 lo: flags=73<up,loopback,running> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10
2, in Linux in addition to ifconfig This command can configure the IP address and a command is IP (I use this method).
[[email protected] yum.repos.d]# ip addr l eno16777736 2: eno16777736: <broadcast,multicast,up,lower_up> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 00:0c:29:2d:c1:30 brd ff:ff:ff:ff:ff:ff inet 192.168.1.131/24 brd 192.168.1.255 scope global eno16777736 valid_lft forever preferred_lft forever inet6 fe80::20c:29ff:fe2d:c130/64 scope link valid_lft forever Preferred_lft forever [[email protected] yum.repos.d]# ip addr add 192.168.1.131/24 dev eno16777736
IP This command and profound is not one or two words can be explained, in the future when the network learning I will give you a detailed and serious explanation, and then to everyone mention about the network card, after CentOS7 the default network card type identifier of eno16777736, in the previous system for ETHN.
Hope this article is helpful to everyone, there is no understanding of the place, I hope you have a lot of advice. qq:87736754
This article from "Cowboy" blog, reproduced please contact the author!
CentOS7 no solution to ifconfig this command after minimal installation