Install LAMP on Ubuntu 13.04 Raring Ringtail

Hello Linux Geeksters.

In this article I will show you how to install LAMP on Ubuntu 13.04 Raring Ringtail.

As you know, LAMP comes from Linux, Apache, MySQL, PHP. LAMP is so popolar that it powers half of the online websites.

Installing LAMP:

To start installing LAMP on Ubuntu, do this:

$ sudo apt-get install lamp-server^

Next, do the following:

$ sudo usermod -a -G www-data your_user
$ sudo chgrp -R www-data /var/www
$ sudo chmod -R g+w /var/www
$ sudo apt-get install php5-curl
$ sudo a2enmod rewrite

Next, open the /etc/apache2/sites-available/default file in your favourite text editor:

$ sudo gedit /etc/apache2/sites-available/default

Change the following code block. From this:

<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>

To this:

<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>

Restart the Apache server:

$ sudo /etc/init.d/apache2 restart

To turn on error messages, open the files /etc/php5/apache2/php.ini and /etc/php5/cli/php.ini and change display_errors = Off to display_errors = On.

Testing if LAMP works:

To verify if Apache runs, type: http://localhost in your browser’s URL bar.

http://linuxg.net/wp-content/uploads/2013/05/a.png

To test if the PHP is working properly, paste the following line to /var/www/test.php:

<?php phpinfo();?>

Next, go to http://localhost/test.php and if the following image appears, it means that php also works:

http://linuxg.net/wp-content/uploads/2013/05/a.jpg

To test MySQL run this command:

$ mysql -u root -p

You must enter the same password you created for MySQL during the installation to sign in.

Liked it? Take a second to support Geekster on Patreon!
Tagged with: , , , , ,
Posted in The Linux and Unix Articles!
4 comments on “Install LAMP on Ubuntu 13.04 Raring Ringtail
  1. Thanks a lot! I’ve been diving deep into apache and it’s good to see it is confirmed to have your web root as www-data and not root. This tends to be a subject of debate and I always thought root was the safest, but I guess it is not.
    I’m loving 13.04. Thanks again.

  2. raffaele della rosa says:

    Thank by a beginner, absolutely beginners…I only cut and paste and every thing OK, also when after I executed the tests.

    • chaker says:

      hi dear raffaele …. linux is huge and crazy world … any one uses linux needs documentations and need cut and paste ,because we are not able to get all this comandes line in our head ,right
      so don’t be upset about it ok
      bye bye

  3. Numa says:

    Fast and concise tutorial! I was tired of repeating the same steps over and over again and getting different errors every time. This tutorial sure helps a lot!

    Page bookmarked

Leave a Reply to raffaele della rosa Cancel reply

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

*

Support LinuxG via Patreon
Support LinuxG.net on Patreon!
Subscribe

  

Subscribe to get the latest Linux news and how to guides directly on your e-mail!