Monday, October 18, 2010

Installing Apache, MySQL and PHP5(LAMP) on Ubuntu 10.10

Setting up LAMP(Linux + Apache + MySQL + PHP) stacks is something I do quite often and in Ubuntu 10.10 it's really easy.  Just open a terminal and type:

sudo apt-get install tasksel

and then:

sudo tasksel install lamp-server

and that's it, you will be prompted to enter information during the installation such as MySQL password etc. during the installation process.

To check apache is up and running visit http://127.0.0.1 in your browser.

Note: the default web root is /var/www

Some other useful stuff:

I always need to use CURL too, to install CURL for php just type this:

 sudo apt-get install php5-curl


and mod rewrite for apache:

sudo a2enmod rewrite


After installing mode rewrite or CURL you need to restart apache like this:

sudo /etc/init.d/apache2 restart

3 comments:

  1. Thank you very much for this! I had scoured the first Google search page for instructions on how to this, and there are some pretty good tutorials for the long way to do it. Ubuntu 10.10 makes it so much easier! Thanks again for posting this.

    ReplyDelete
  2. hey. this is indeed informative n quite easy to follow. ty..

    ReplyDelete
  3. PHP Development Service assists organizations to deploy their collaboration, resource planning, customer and supplier management systems as web applications.
    PHP Developers

    ReplyDelete