Monday, March 25, 2013

Configuring an Ubuntu 12.10 LAMP Server

I found a great tutorial for configuring a LAMP server using Ubuntu 12.10.  It's all done through the command line, but all you need to know to follow along is how to copy and paste! You can read the full article here.

Note: All the commands will need to be run as root.

First, install MySQL. During the installation, you will be asked for a MySQL administrator password.

apt-get install mysql-server mysql-client
Next, install Apache, which is simple. You can install it by typing the following command:
apt-get install apache2
Now if you open a web browser and put localhost as the URL, you should see an Apache placeholder page.

To install PHP and the PHP Apache module, use this command:
apt-get install php5 libapache2-mod-php5
Now restart Apache so that the changes will take effect.
/etc/init.d/apache2 restart
You now have a LAMP server, but there are some other packages that you may want to install.  There are a bunch of PHP modules that you might want for your applications.  You can find a list by searching apt:
apt-cache search php5
After you install modules, restart Apache again. To install the phpMyAdmin interface, use:
apt-get install phpmyadmin
 That's it!