Set the network connection after CentOS 7 Installation
The minimal installation in CentOS. The network cannot be connected because the default Nic is not activated. Just set it.
Run the command cd/etc/sysconfig/network-scripts to press enter.
Enter ls and press enter
The following files are displayed. We are looking for the arrows in the image.
Then open it with the text edit tool, enter the command vi ifcfg-eno16777736 and press enter
Some key-value pairs will appear, and what we need to change is indicated by the arrow, which indicates activating the NIC.
Press I to enter the editing mode, change no to yes, Press ESC, and enter wq (wq indicates saving and exiting)
After that, you will find that the file cannot be properly saved because you must use the root permission to modify the file. Do not save and exit, enter su and press enter
After entering the root password (the password is not displayed), press enter. Repeat the preceding steps to open the file and save the modification.
Restart NIC: service network start is OK
Then you can connect to the network and install some packages you need.