1. Install apache2.0
Sudo apt-Get install apache2
After installation, open it in the browser:
Http: // localhost/or http: // 127.0.0.1
If it works appears !, The installation is successful.
2. install PHP
Sudo apt-Get install PHP 5 // install PHP 5
Sudo apt-Get install libapache2-mod-php5 // configure Apache + PHP
Sudo/etc/init. d/apache2 restart // restart Apache
Test:
Open gksudo gedit/var/www/testphp. php
Then enter something (SD is input) and save it.
Enter http: // 127.0.0.1/testphp. php or http: // localhost/testphp. php in the browser.
The input is successful if it is displayed.
3. Install MySQL
Sudo apt-Get install mysql-Server
After installation is complete, follow the prompts to set the root password
4. Make Apache and PHP support MySQL
Sudo apt-Get install libapache2-mod-auth-mysql
Sudo apt-Get install php5-mysql
Sudo/etc/init. d/apache2 restart
Now The apache2 + PhP 5.2.4.2 + mysql5.0.51 environment is complete.