- Installing Apache
sudo apt-get install apache2
- Browse
http://localhost
- Installing PHP5
sudo apt-get install php5
- Configure apache+php
sudo apt-get install LIBAPACHE2-MOD-PHP5
- Restart Apache
Sudo/etc/init.d/apache2 restart
You may encounter errors at this time: Httpd:could not reliably determine the server ' s fully qualified domain name, using 127.0.0, workaroundhttpd.conf in/etc/apache2, servername 127.0.0.1:80 added httpd.conf save. Then restart Apache.
- Test
sudo gedit/var/www/test.php
Input content: <?php phpinfo ();? >
Open Address: http://localhost/test.php
- Install MySQL
sudo apt-get install Mysql-server
Setup is complete, set the root password as prompted.
- Configure Apache, PHP support MySQL
sudo apt-get install Libapache2-mod-auth-mysql
sudo apt-get install Php5-mysql
- Restart Apache
Sudo/etc/init.d/apache2 restart
Step-by-step operation Ubuntu Configuration lamp