How to configure LAMP stack in Ubuntu 12.10

For installing LAMP stack at Ubuntu 12.10 follow these steps:

1. Get root access in your terminal:

sudo su

2. Install MySQL5:

apt-get install mysql-server mysql-client

Then just wait. And you’ll be prompted to type root password for mysql.

3. Install Apache2:

apt-get install apache2

Now to confirm Apache2 was successfully installed, type http://localhost/ in your browser,
and you should get this message:

It works!

This is the default web page for this server.

The web server software is running but no content has been added, yet.

4. Install PHP5:

apt-get install php5 libapache2-mod-php5

then restart apache:

/etc/init.d/apache2 restart

5. Test if php was installed:
Go to directory /var/www/

cd /var/www/

then create a new php file.

touch test.php

Now open your new file:

nano test.php

Type whatever php you want. Like this:

echo "Hello Linux-World";

Then hit ctrl+x, and save.

Now to test your php file just type:

php test.php

And you will probably see:

Hello Linux-World

in your console.

Note: Remember to configure your php.ini and apache conf file. Have fun.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>