Installing Centos 7 with a minimal install option will leave you in a funny situation, where no “net-tools” package is installed, so (as far as I can tell) you can’t bring up the basic network interface (because it’s off on boot by default) with the usualĀ ifconfig command, because there is no ifconfig.
The only solution is to edit the bootup script:
vi /etc/sysconfig/network-scripts/ifcfg-enp0s3
and set the
ONBOOT=yes
option. After save and restart, by default it will ask the DHCP for an IP address, and you’re basically good to go.
On the other side, you might want to give the box a static IP address immidiately, in that case, stay a bit more on the ifcfg-enp0s3 file, and change/add the following options:
ONBOOT=yes
BOOTPROTO=none
IPADDR=<desired_static_ip>
GATEWAY=<your_gateway_ip>
DNS1=<primary_dns_server_ip>
DNS2=<optionally_secondary_dns_ip>
Save, and reboot.
Furthermore, if you wish to have ifconfig around now, install it with
yum isntall “net-tools”