How to install a LAMP stack on Ubuntu Gutsy Gibbon (7.10)
- 3 Comment
If you're new here, you may want to start with my most popular posts. Then, subscribe to my RSS feed to stay updated. Thanks for visiting!
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: Ubuntu, LAMP, Apache, MySQL, PHP, Programming
Related posts:
- How to set up a virtual host on Apache2 in Ubuntu Gutsy Gibbon (7.10)
- How to create a MySQL database from the command-line client
- How to install ruby on rails on Ubuntu Gutsy Gibbon (7.10)
- How to get past the `require’: no such file to load — mkmf (LoadError) when installing the “mysql” gem
- How to be more productive with the Ubuntu Gutsy Gibbon (7.10) Terminal using Tilda
3 Comments on this post
Trackbacks
-
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 -
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



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