CentOS VMware can not solve the problem in the Internet

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/KurtX/article/details/102695172

Yesterday, the newly installed CentOS7 at VMware, had wanted to use ftp tomcat package will pass in, but found no ftp installation, use the "yum -y install vsftpd" command to install, but I did not even prompt me to network! ?

I began to think that the problem is the mirror server, and later found after the ping is simply no way connected to the network. Since many settings are the default, and virtual machine is the default NAT mode, and the host computer shared network, so it should not VMware set of problems. After you have reviewed a lot of information through the Internet, the ultimate cause of disaster turned out to be the default installation mess, the specific approach is as follows:

Network Configuration file directory: cd / etc / sysconfig / network-scripts

List directory contents: ls (L next to K, not 1 nor i)

And then view the file in the directory has a ifcfg-ens33, usually the ifcfg-ens33, different environments "ens" behind the "33" there may be other numbers.

To open it for editing by "vi" command: vi ifcfg-ens33

Note: Most online tutorials are edited with "vim" command, I found that in the process of testing, "vim" also is not installed, look for how to install "vim" of course, in the end still have to download things, so As used herein, "vi" command.

There will be a long list of English, but you can read the last line for a long time, and prompt us to continue Enter, press "ENTER" on it

At this point the cursor to the last row, the one to which ONBOOT = no ONBOOT = yes

Enter the command:: wq to save

Enter the input mode ": wq" will be recognized as text, press the "ESC" conversion mode, then enter:: wq to save

最后在输入命令:service network restart 重启网络服务即可

Guess you like

Origin blog.csdn.net/KurtX/article/details/102695172