I thought that for the next bunch of ubuntu commands, you only need to find the correct command, and it is not that troublesome. What's tricky is that there are so many results on the Internet that I don't know the method I just created. I don't have a good idea that the next bunch of commands in ubuntu can be found as long as the correct command is found, not that troublesome. What's tricky is that there are so many results on the Internet that you don't know how to create them at all. The whole process of apache was handled seven or eight times. It took over two hours.
Finally, I finally saw a person's approach in a forum. I found the command is a little different from other people, so I tried it.
Method:
Sudo apt-get-purge remove apache2
Sudo apt-get-purge remove apache2-common
Sudo apt-get-purge remove apache2-utils
Sudo apt-get autoremove apache2
(-Purge indicates that the configuration file is not retained. this is definitely not enough)
Then sudo apt-get install apache2.
PS: If not, delete all the items about apache2, because I have killed all the items before executing these commands.
Delete the/etc/apache2 folder: sudo rm-r/etc/apache2
Delete the/var/www folder: sudo rm-r/var/www
Delete the/etc/init. d/apache2 File: sudo rm-r/etc/init. d/apache2
Then uninstall PHP5.
The method is as follows:
Sudo apt-get-purge remove libapache2-mod-php5 php5 php5-gd php5-mysql
Sudo apt-get autoremove php5
The following describes how to uninstall MYSQL:
Run the following command on the terminal:
1 sudo apt-get autoremoving-purge mysql-server-5.0
2 sudo apt-get remove mysql-server
3 sudo apt-get autoremove mysql-server
4 sudo apt-get remove mysql-common (very important)
The following sentence shows the residual information.
Dpkg-l | grep ^ rc | awk '{print $2}' | sudo xargs dpkg-P