Dec 11 2007

How to install a LAMP stack on Ubuntu Gutsy Gibbon (7.10)

Welcome back!



Google Query: install lamp stack on ubuntu gutsy gibbon

Since I run a couple of Wordpress blogs, I like to mirror the setup of the blogs on my home desktop. In the past, I just used XAMPP for this. However, it has some quirks of its own because the apache, mysql, and php files are not where the system expects them to be.

Recently, I did a fresh install of Ubuntu Gutsy Gibbon (7.10) so I decided to install the LAMP (Linux, Apache, MySQL, PHP) stack the without XAMPP. Thanks to the Ubuntu Documentation Site, I found my answer after a quick Google search. The details are summarized below.

-Install Apache2 using the following command at the Terminal:
sudo apt-get install apache2
I did get the following error: “apache2: Could not determine the server’s fully qualified domain name, using 127.0.0.1″
So, I followed the directions to add the line “ServerName localhost” to my Apache configuration. The steps are below.
gksudo gedit /etc/apache2/httpd.conf
Add the following to this file and save it.
ServerName localhost

-Install PHP 5 using the following command at the Terminal.
sudo apt-get install php5

-Install MySQL with PHP5 using the following command at the Terminal.
sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql

That’s it! You should be able to open your browser to http://localhost or http://127.0.0.1 and see the default Apache2 website.

If you need help creating a database from the MySQL command-line please take a look at “How to create a MySQL database from the command-line client.”

Happy Coding!

Technorati Tags: , , , , ,

No related posts.

Related posts brought to you by Yet Another Related Posts Plugin.

TAGS:

3 Comments on this post

Trackbacks

  1. openswitch » How to set up a WordPress local web development testing environment in Ubuntu Gutsy wrote:

    [...] instructions are taken verbatim from this helpful article. Why retype the wheel? Open up a terminal and execute this [...]

    January 29th, 2008 at 12:11 pm
  1. Bryan said:

    Your instructions are excellent and I’m following them exactly but I seem to be missing an important part.

    I’ve installed Apache 2 and it works perfectly for as much as I’ve tested it. PHP5.2.5 seems to install correctly but when I try to load a test file, index.php, Firefox interrupts asking if I want to open the file with an editor or save the file because it is an HTML script.

    I’m holding off loading the MySQL script until I can have this installation resolved.

    Thanks in advance for your help.

    Bryan

    March 2nd, 2008 at 11:13 pm
  2. hstagner said:

    Hello Bryan,

    I have not experienced this particular problem. However, a quick look on the Mozilla Support Forum pointed me to this thread.

    I hope this helps. Thanks for reading!

    Regards,

    Harley Stagner

    March 4th, 2008 at 2:40 pm

LEAVE A COMMENT

Subscribe Form

Subscribe to Blog

Sponsors

Recent Readers

JOIN MY COMMUNITY!
                  Computers Blogs - Blog Top Sites