centos The requested URL returned error: 404 Not Found
First of all, after investigation by Baidu, I found that the linux version was too old. I installed centos6. After I installed it a few years ago, I didn't manage it. Suddenly I picked it up again these few days and found that even the Internet is not connected, and Baidu can ping.
Only yum install could not be operated. Watchpoint only discovered that the maintenance was stopped on November 30, 2020, which made it impossible to download any mirror network of Ali or Netease.
The old version does not work, I will re-install centos7.
After downloading, I still cannot connect to the Internet.
I don’t want to do ifconfig, check ip
After Baidu, modify the /etc/sysconfig/network-scripts/ifcfg-ens33 configuration file
Change ONBOOT permission to yes
Restart the network service, enter sudo service network restart
The solution is Baidu, ifconfig is still not working, you need to download yum install net-tools
After downloading, you can use it, and then use this tool MobaXterm to make it simple.
-------------------Update start on December 30, 2020----------------------- ------------
Today, I encountered a strange problem. The linux on the virtual machine was not operating for a long time and disconnected.
The ip address has changed and MobaXterm cannot be connected. You need to reconfigure the permanent ifconfig file, otherwise the ip will be changed after the restart.
The strangest problem, ifconfig worked so well last night, it won't work today! ! !
Whether it's reinstallation or various Baidus, I'm doing my best and my brain is buzzing! Or not. . .
Ingenious, try sudo ifconfig command execution
ok!!!
ip re-inquired it out, and sighed with relief.
-------------------Update ends on December 30, 2020----------------------- ------------
-------------------The update starts on December 31, 2020----------------------- ------------
Custom ip follow-up
According to Baidu's method, directly modify the /etc/sysconfig/network-scripts/ifcfg-ens33 configuration file
IPADDR=192.168.3.20
Invalid ip address
Ping also works, ssh is turned on, and the firewall is turned off.
Then use MobaXterm tool ssh to connect, the connection timed out
Network error: Connection timed out
After investigation, it is found that BOOTPROTO=dhcp, and the ip address is not fixed at this time. After reconnecting to the network, there will be a new ip address.
But restarting the virtual machine or restarting the network service, today's ip address is still fixed, it may be more than a certain period of time without operation, the ip address will be changed.
Check back tomorrow to see if it is completely resolved.
Solution to the problem
When your configuration file BOOTPROTO is still in dhcp, use sudo ifconfig to query your ip address at this time, and then modify the IPADDR in the configuration file to your current linux ip address, you're done, and the solution is perfect!
Other configurations do not need to be modified, and no DNS, gateway, and subnet mask are used. If you modify the gateway in ifcfg-ens33, you do not need to configure it in resolv.conf.
Because there will be controlled by ifcfg-ens33, if you don’t believe you can change it and restart the network service, you will find that the original nameserver will change
Restart network card service command
service network restart
-------------------Update ends on December 31, 2020----------------------- ------------