Could not resolve host: mirrorlist.centos.org; Unknown error solution

After installing the CentOS system on the server today, when installing the network, the error message yum failed to connect to the Internet.

yum -y install net-tools

The above code cannot be run and an error is reported. Here I would like to remind everyone that if you choose to install the network tool module during the initial installation, you do not need to install net-tools. Because I selected minimal installation, I have to install net-tools in the end.

Because of the minimal installation, the problem came: Could not resolve host:mirrorlist.centos.org; Unknown error. I checked the reason online: "This machine cannot connect to the network settings of the network."

So relying on powerful search engine articles and his first solution, he finally solved the error reporting problem. The processing process is recorded below:

Step 1 :

Enter the following command in the terminal to view the network card installed on the machine:

[root@localhost ~]# nmcli d

 Note here that my problem may be different from everyone else's, but it is still connected, so let's try it later.

Other questions: p8p1 may be in no connection state or disconnected state;

 Step 2 :

Enter the following command in the terminal to open the network administrator:

Select "Edit a connection" and press Enter (option to use TAB key to select)

Step 3:

Now you can see all the network interfaces, select one (mine is p8p1), then use the up, down, left, and right keys on the keyboard to select "Edit" and enter to confirm:

 

Step 4:

Perform dynamic configuration:

  (1) Select <Automatic> in the IPv4 CONFIGURATION configuration;

  (2) Press the space bar to select the "Automatically connectc" check box;

  (3) Click the OK button to exit the network manager;

  (4) Back Exit in sequence to return to the terminal interface;

  (5) Enter the command to restart the network service: [root@localhost ~]# systemctl restart network

 

 After the network restarts, execute yum install net-tools to install it. After successful installation, you can ifconfig, or you can use yum -y install wget installation and download command to download the file wget.

        What needs to be noted above is that the minimal installation is indeed fast and small, but many plug-in tools are not available. Therefore, it is best for everyone to choose a suitable version when installing: for example, the standard server will prompt you to check the components.

おすすめ

転載: blog.csdn.net/Angel_asp/article/details/132165106