Record a tangle of Virtual Machine Linux network configurations, virtual machine linux
The reason for this network configuration problem should also be explained from the configuration of DNF, because Linux servers are built by others, for Internet access, you need to configure the PHP Gateway access page,
However, computers are personal computers, which are in the large Intranet allocated by China Telecom. There is no way to use nat123 to penetrate the Intranet. It is hard to apply for port 80, modify the Httpd Access Port of Apache in Linux,
vi /etc/httpd/conf/httpd.conf
Search for Listen and change the following 80 to 8080. Aha, you can finally access/var/www/html/function. the PHP file is ready for access, but it is not long. However, the connection to mysql is successful.
Where did the message go? After continuous attempts, I found that the login server only installed PHP and did not install mysql plug-in support. You can only reinstall it, but you cannot use the yum command to install it.
The current system uses the yum source, okay, centos 5.8 yum source has been extinct, and finally it is difficult to find a yum address, to the following directory modified the default yum source CentOS-Base.repo
cd /etc/yum.repos.d/
yum clean all
yum makecache
I still had no choice but to report an error. I found that Linux on the local machine could not access the network at all. I am so entangled that the problem is getting farther and farther away. Next let's go to the question: the virtual machine uses the Nat method to connect and
Fixed IP Address: 192.168.200.131. I only want to modify it as little as possible to avoid other problems. For example, I reconfigure the gateway of the virtual machine as 192.168.200.2,
Then go to Linux, to the system Nic path to find the NIC, modify the ifcfg-eth0 settings as follows
cd /etc/sysconfig/network-scriptsvi ifcfg-eth0
I found that the resolv. conf file still does not work. I will continue to use Baidu to change resolv. conf.
Ping www.baidu.com again, but it still doesn't work. At this time, I crashed. At this time, I tried to Ping my local IP address (192.168.200.1) Again, and ping the gateway 192.168.200.2 again. At this time, it is true.
You can only seek help from Baidu daxie.
However, I finally found out what was missing. See
vi /etc/sysconfig/network
Now I can go to Baidu. Because I have just been familiar with Linux, and I have never studied the system. I can only learn one hundred degrees in one step. It is really a tangle of exceptions.