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









it works..thanks
it works fine , Thank you
but i can not create any files using the GUI, i mean when i be in the /var/www i can not create any file
/var/www is owned by root, so you either need to change the ownership to yourself, or you could start a file manager as root. Assuming you use regular Ubuntu, you can launch the Nautilus file manager with root permissions with:
Another option is to put your files in a folder under your user ID and configure Apache to load them from there.
Gracias muy amable, me sirvió mucho..
thank u very much, this was utility
buenisima la explicacion. instalacion completa gracias a esto.
great explication, thank you.
Great tutorial, thanx! One question - does an FTP server get installed with the lampserver install? Or does it have to be set up separately?
I don't believe that an ftp server gets installed with this process, so you will have to do that separately.
Great piece there. Thanx a lot.
If you are facing some problem with phpmyadmin then consult this post [http://codesprints.blogspot.in/2012/04/phpmyadmin-not-working-ubuntu.html].
Or you can fix it easily with this: http://tuxtweaks.com/2012/05/fixing-common-problems-with-lamp-on-ubuntu/
worked very well !!!! Thanks for your help !!!!!
Thank you, All Ok. Now Im want to install PHPMYADMIN
Run the following command
sudo apt-get install lamp-server^ phpmyadmin
http://tuxtweaks.com/2011/10/install-lamp-and-phpmyadmin-on-ubuntu-11-10/2/
thank you so much for your help!! Your troubleshooting section was a very nice addition
thank you! Perfectly Working...
Works perfectly, thanks!
To install phpmyadmin, Just run the command in the terminal
sudo apt-get install lamp-server^ phpmyadmin
It's all covered on page 2 of this post: http://tuxtweaks.com/2011/10/install-lamp-and-phpmyadmin-on-ubuntu-11-10/2/