Recently, because the project needs to configure the mysql + php + apache environment, the steps are relatively simple and listed as follows:
1. Installation Command: apt-get install apache2
After changing the configuration, restart:/etc/init. d/apache2 restart
2. Install php:
Apt-get install libapache2-mod-php5
Apt-get install php5
Note: If you want to support graphics plus php5-gd, if you want to support Mysql plus php5-mysql, the reason here to list libapache2-mod-php5 separately, mainly because the php5 dependency is not well done, it is possible to install the package on the libapache-mod-php4, so to avoid unnecessary trouble, it is better to simply specify it separately. If a friend still has a problem, find the libapache-mod-php4 package in the new, and delete it if installed.
3. Install mysql
Apt-get install mysql-server
4. Install phpmyadmin
In fact, this is the easiest thing to do, but I don't know what's going on. I 've been confused during installation for a long time. In fact, phpmyadmin can regard it as a php program, so you only need to go down the Internet, modify the apache files, and create an alias for him.
Uninstall command
Mysql uninstall with sudo aptitude purge mysql-server mysql-server-5.0
Sudo aptitude purge php5
It's done.
Apache2 uninstall: 1. sudo apt-get remove apache2
2. sudo apt-get remove apache2.2-common
3. sudo apt-get autoremove (this command will automatically uninstall PHP)
Important File Directory:
/Etc/apache2: apache2 server settings,
/Etc/php5/apache2/php. ini
/Etc/mysql/my. cnf