Install ApachePHPMySQL on Ubuntu and use UbuntuApache
System environment: Ubuntu 10.04.4 LTS, x86_64 GNU/Linux
1. install Apache2
1) sudo apt-get install apache2
2) enter the password and perform some operations as prompted.
3) test:
4) modify the default Document Root
* Sudo cp/etc/apache2/sites-available/default/etc/apache2/sites-available/webserver
* Sudo gedit/etc/apache2/sites-available/webserver
* Change the Document Root to point to the location you want. For ex:
DocumentRoot/home/ /Server/
/Server/>
5) activate the new configuration
Sudo a2dissite default & a2ensite webserver
6) restart Apache HTTP Server
Sudo/etc/init. d/apache2 reload
2. install PHP5
1) install PHP5 and Apache PHP5 module
Sudo apt-get install php5 libapache2-mod-php5
2) restart Apache2
Sudo/etc/init. d/apache2 reload
3) test PHP5 is working and write a phpinfo. php file.
Sudo gedit/home/ /Server/phpinfo. php
Input content:
Visit: you can see some basic php information
3. install MySQL
1) sudo apt-get install mysql-server mysql-client
2) install the php5-mysql package for PHP to support MySQL
Sudo apt-get install php5-mysql
3) install phpMyAdmin: MySQL manager
Sudo apt-get install phpmyadmin
Some options:
Web server to configure automatically: Apache2
Configure database for phpmyadmin with dbconfig-common: No
4) you can create some soft links to/home/ /Server (the root directory of Apache2), for example:
Cd/home/ /Server/
Sudo ln-s/usr/share/phpmyadmin
5) access address: