Test environment: Ubuntu10.041. install apache2.0sudoapt-getinstallapache2. After installation, open http: // localhost/or http: // 127.0.0.1 in the browser. If Itworks is displayed! It proves OK 2. install PHP in turn on the terminal: sudoapt-getinstallphp5 // Security
Test environment: Ubuntu 10.04
1. Install apache2.0
Sudo apt-get install apache2
The installation process is not detailed.
After installation, open it in the browser:
Http: // localhost/
Or http: // 127.0.0.1
If It works appears! That proves OK.
2. install PHP
Enable it on the terminal in sequence:
Sudo apt-get install php5 // install PHP5
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-mysqlsudo/etc/init. d/apache2 restart
Now The apache2 + php 5.2.4.2 + mysql5.0.51 environment is complete.