centos7最小安装后网络配置

ip addr查看网络接口

[zhujiang@localhost 6379]$ ip addr
1: lo: mtu 65536 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eno16777736: mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:0c:29:75:c7:60 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.50/23 brd 192.168.1.255 scope global dynamic eno16777736
       valid_lft 53709sec preferred_lft 53709sec
    inet6 fe80::20c:29ff:fe75:c760/64 scope link
       valid_lft forever preferred_lft forever

vi /etc/sysconfig/network-script/ifcfg-eno16777736

修改onboot为yes

安装ifconfig
[zhujiang@localhost ~]$ sudo yum provides ifconfig
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.pubyun.com
 * extras: mirrors.pubyun.com
 * updates: mirrors.aliyun.com
net-tools-2.0-0.17.20131004git.el7.x86_64 : Basic networking tools
Repo        : base
Matched from:
Filename    : /sbin/ifconfig

从上面可以知道ifconfig在net-tools包里
yum install net-tools

你可能感兴趣的:(centos7最小安装后网络配置)