Install LAMP and phpMyAdmin on Ubuntu 11.10
Page 1 Page 2
LAMP stands for Linux, Apache, MySQL, and php, (or Perl). It's one of the most popular web hosting platforms. If you're developing websites, it's good to have your own private development environment to use while you build and test your websites. This post will show you how to install and configure a LAMP web development environment on Ubuntu 11.10 Oneiric Ocelot to use for testing. It can also be used to set up LAMP on a Virtual Private Server (VPS) or a Dedicated Server, but please note that this post does not cover setting up proper security for serving content to the internet.
Install LAMP
The Ubuntu development team has made it very easy to install and configure a LAMP web server. Open a terminal window and enter the following command.
Please enter the command exactly as it's shown above. The carat (^) is not a typo and the command will not work without it.
If prompted, enter your password.
The package manager will now display a list of packages to be installed. Hit <Enter> to confirm that you want to go ahead with the install.
Apt will now start downloading and installing the packages on your computer.
After a short wait, you will be prompted to set a password for MySQL's administrative user. Enter a password at the prompt and make sure it's something you will remember or make a note of it.
You will then be prompted to confirm your password.
Type in the same password and hit <Enter>. The package manager will now continue downloading and installing packages. After a short wait the installation will complete.
Testing Apache
Now we'll run a quick test to make sure that the Apache web server is working. Open a web browser and enter the address http://localhost/. You should see a page that says "It Works!"
Testing php
Now that we've verified that Apache works, we need to verify that php is working properly. We're going to create a file in the /var/www directory called testing.php. Enter the following command in the terminal to create the file.
Enter your password if prompted.
Now you'll need to restart the Apache web server. Enter into the terminal:
Now open your web browser and enter the following address: http://localhost/testing.php
You should see a web page that displays a bunch of information about your php and Apache environment.
Configure MySQL
Since this is for a local development environment, the MySQL database needs to be bound to the localhost IP address. This should be 127.0.0.1 by default. You can verify your localhost address with the following terminal command.
You should see output something like this:
127.0.0.1 localhost ::1 ip6-localhost ip6-loopback
Now you need to verify that this address is the bind address MySQL's my.cnf file. Use the following terminal command.
You should see output like this.
bind-address = 127.0.0.1
If it's not correct you'll need to edit /etc/mysql/my.cnf as root to fix it.
Page 1 Page 2









apprecialble support!!!!!
A+!! Cheers for this.. Very simple walk through.. Also, thank you for the 404 fix for phpmyadmin! When I first installed I assumed that apache2 was already selected due to the red box.. Who would have thought to press space!!!
Thank You...It's very helpful
Thanks for the common fixes bit. I forgot to select the Apache2. Maybe you should write that the user should click the spacebar in the Tut for those of us who are new to Ubuntu Server.
thanks again.
nothing, i can't connect or ping http://localhost/phpmyadmin

i had clean cache, etc but nothing.
support please
I think that you did not press for this step "Make sure to then mark apache2 by having the cursor next to apache2 and then hitting to mark it with a *, then hit ."
plz repeat this portion
"Fixing some common problems
Fixing phpMyAdmin" from the above link
I had same issue like u
Excellent help many thanks.
Not 100% sure of Ubuntu 11.10, much prefer 10.04. but I guess I'll get use to it...
Don
Yeah, I'm still using 10.04 as my main desktop. I can't stand Unity, so I've installed the fallback session on 11.10.
all went smoothly, thanx a bunch, except the last bit. i got this error.
tanuwa@tanuwa-Satellite-L310:~$ echo "ServerName localhost" | sudo tee /etc/apache2/conf.d/fqdn
ServerName localhost
tanuwa@tanuwa-Satellite-L310:~$ service apache2 reload
* Reloading web server config apache2 ulimit: 88: error setting limit (Operation not permitted)
httpd not running, trying to start
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
Action 'graceful' failed.
The Apache error log may have more information.
[fail]
Oops. I forgot to include a sudo before the last command. It should read
Thanks for your comment. I'll fix the instructions.
Thanks a lot , It was like cake - walk .
Thanks, great article! I particularly like the sudo apt-get install lamp-server^ information and the fix common problems with phpmyadmin because that is exactly what I did wrong. Oh, the tee command was nice too!
Would you be willing to do an article like this for a LAPP (Linux Apache PostgreSQL PHP) server install? It would be great if there was a sudo apt-get install lapp-server^ option.
download and install lamp on ubuntu 11.10 done easy.
terminal in ubuntu 11.10 is accessed by pressing ctrl + alt + T.
installation done!!
Thanks a lot! A very informative article which made easy the LAMP installation within short time;Can you please add squirrelmail server also
This is the first time I see a crisp and clear work instruction like this. Superthanks!
Thanks a lot
I was searching this for 3 days. Thanks very much ..!! problem was 404 not found .!! now it's sorted.! 100% working.
Thanks, did something wrong when i tryed to set up some virtual hosts, my lamp server didn't host anything. But i did run http://tuxtweaks.com/2010/01/how-to-uninstall-lamp-in-ubuntu-9-10-karmic-koala/ and this guide and now my Lamp works better then before.
Thanks for all the support
It is a useful topic, I have done lamp and phpmyadmin setup to study this above topic.
That works like a pro.
Thanks.
I keep this page for my personal reference on http://www.webnapps.co.uk/helpful-links
I hope this will be OK with you.
Cheers.
Here is a video tutorial on setting up phpmyadmin
http://www.youtube.com/watch?v=AdV2Yhg__YE
Thanks for the great article . You have given the great support to install.