Comments on Installing Apache2 With PHP5 And MySQL Support On Ubuntu 12.04 LTS (LAMP)

Installing Apache2 With PHP5 And MySQL Support On Ubuntu 12.04 LTS (LAMP) LAMP is short for Linux, Apache, MySQL, PHP. This tutorial shows how you can install an Apache2 webserver on an Ubuntu 12.04 LTS server with PHP5 support (mod_php) and MySQL support.

52 Comment(s)

Add comment

Please register in our forum first to comment.

Comments

By: Anonymous

Spent a day trying to get tomcat to do some simple stuff. Man was I happy to land on this website! I stopped the tomcat service, installed Apache2 (already had the L, M & P) and BAM! default web page, NO PROB!!!  Took me all of five minutes! Now, I'm in tall cotton; even the food tastes better :-))  MANY THANKS!!!

By: sigma

huge! Works the same on ubuntu12.10. Thanks for this great tutorial

By: Thushara

Awesome tutorial. Saved my day. :)

By: Anonymous

thanks my friend  cool, please add symbol link phpmyadmin direct acces

 


By: Luiz

 Your tutorial saved me days of work. 

Thanks a lot.

Luiz

By: Anonymous

Great tutorial. I did this really fast. I have to add that I needed to add the line:
 
 Include /etc/phphmyadmin/apache2.conf
 
to the file /etc/apache2/apache2.conf for getting the phphmyadmin page to work.
 
 

 

 

By:

Thanks for your post. I got a LAMP server in 5 minutes!!! Work like a charm!

You could also insert some performance tips after the basic install.

 

By: Anonymous

Thank you for the superb guide.

Although regarding phpmyadmin, have to say that I need to do the:\

sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf.d/phpmyadmin.conf
sudo /etc/init.d/apache2 reload

 as suggested in https://help.ubuntu.com/community/phpMyAdmin.

But I have to comment out the 

Include /etc/phpmyadmin/apache.conf

 to ensure it works (since I followed the help step-by-step).

Hope this will help others having the same problem.

 

By:

Thank you for your details. I did this as follows: sudo dpkg-reconfigure -plow phpmyadmin sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf.d/phpmyadmin.conf sudo /etc/init.d/apache2 reload as suggested in https://help.ubuntu.com/community/phpMyAdmin.(My Ubuntu version is 11.04)

By: Wim Anckaert

tx, this worked also on ubuntu 12.04

By: Anonymous

This works great for me as well!

Thank you very much

By: gaodayue

thanks for your remind and the helpful link

By: jda

Quote 'Although regarding phpmyadmin, have to say that I need to do etc '

Me too...

By: Anonymous

Thanks alot for your help ! 

 I had similar problem and it does work after I read your comment :) ,,, Also , using nano instead of vi in step 5 is much easier ! if someone does not know how to deal with "vi" as well ;) ... Thank you all ! 

 

 

By: Allan

Perfect, worked first try.

By: Hakob

Thanks for this tutorial. It is really best tutorial for this kind of installations...

By: Gg

Thanks for the nice and pretty tutorial!

I just wanted to mention that it might be worth considering the tasksel utility too. A little less control on things, but overall a quite immediate approach.

You just need to install the tasksel package from repos:

sudo apt-get update 

sudo atp-get install tasksel

Then just run tasksel as superuser:

sudo tasksel

What you get on screen is a whole bunch of configurations you can change your system into. Just scroll to "LAMP server", select it with space bar and press enter. All packages to be installed are automatically included for you. Along the installation you'll be asked to provide pretty much the same info such as MySQL password etc. Once done, you'll have your LAMP server (or any other config you selected) ready to go.

Hope it helps!

Gg 

By: Anonymous

after the command-

apt-get install mysql-server mysql-client

i wasnt prompted for the user name or password!!!

what could be the problem

By: Anonymous

Thanks, it worked first time without any problem

By: INCH-5

Great!!!, all went well, tried it on my Vmware, just that i was confronted with "username/password" option - but after a while i figured it out

Username = root

Password = "yourrootsqlpassword" one provided during Msql installation.

By: Afandi

Hi, many thanks

I have successed until no #4 but when create info.php, I can save the file into var/www

it said you do not have the permission.

Please advise thanks 

 

By: Kunal

Use sudo before the command and enter password when prompted.

like

sudo vi /etc/www/info.php

By: Anonymous

save your file on the desktop

try this on terminal

 

su

your password

cd Desktop

mv info.php /var/www

By: Randi\y III

thanks for your help....
it is a big help for me....^^

By: KBC

good job buddy nice and easy to understand guide. TNX

By: uday

this is really a wonderful tutorial

By: Anonymous

ottimo ha funzionato subito

perfetta e chiara, complimenti

By: Ravi Kumar

Thank you very much for your nice guidelines.

It worked pretty well up to  step 6 but get stucked at 7th step. During 7th step it asked two questions, in first case i allowed - "Apache2" and in 2nd question which was long with with some other information also (e.g do you have any database etc) then i choose the option as "NO".

Then after refreshing the page with replacing info.php to phpmyadmin, there was not any sign of phpmyadmin page.

What should i do now ?. Thank you again for your help.

 

Ravi Kumar

By: Ravi Kumar

Hi everyone,

After 2-3 days i got the simple solution of my problem. In my case upto step 6 (localhost/php.info) everything worked very well but 7th step i.e localhost/phpmyadmin didn't show anything.

 I came to know from another tutorial that phpmyadmin is poor in making automatic link with apache2, so you have to makeup a symbolic link as:

cd /var/www

sudo ln -s /usr/share/phpmyadmin phpmyadmin

and that's it. It worked !!!

I login as "username =root" and "password=rootpassword" , please enter the correct password while u entered during ur mysql installation. It worked for me, n i hope it will definitely work for you too. 

Ravi Kumar (BIC, IMTECH)

Chandigarh

 

By: Cristian

Thanks Ravi!

By: Anonymous

Thanks Ravi, had the same problem.

By: Kamil

Thanks dude! I had the same problem and you helped me a lot!

By: osdarodi

Thank you for your comment, it helpme to install phpmyadmin.

By: Namal

Thanks a lot

By: sukanya jeyabal

thank you sir, i too came across the same problem, and now it works

By: Sampath

Ravi thank you very much.

By: Quan Tran

So is this server availble for LAN only or i can access it outside LAN network?

By: Anonymous

Wow, thanks a lot! It only took about 5 minutes to set everything up (almost as fast as easyphp on Win :).
And the solution for phpmyadmin that Ravi Kumar posted worked perfectly.
So everything works as expected

By: matmosis

ha funzionato tutto e subito

bella guida, professionale, complimenti

By: fermax2020

thank you very much for the  great   info

By: san pedro

very nice tutorial, work flawless...thank you very much!

By: vinsr

Thank you very much it helped me completely...it works without any errors..

By: Anonymous

Very good. Thank you.

By: chuck eckenroed

Thank-you, Thank-you!!  This saved me a ton of time (and mistakes).  :)

By: Mohamed Alioui

Thank you very much, that was very easy to implement. Saved me lots of trouble.

 

By: Anonymous

what a great tutorial, glad I found it. saved me days of work most likely

By: Bishal

Thank you very much. Saved me a lots of time. Thanks a lot.

By: Anonymous

This Is Really very good? This Is The Best Site Yet, But I Must Add, After You Install Ubuntu 12.04 or what ever version you are running, you need to check the install third part software button before you install the system, you can leave the upgrade for later or after you have installed UBUNTU 12.04, Then You Need To Go To Upgrade Manager The Check For Upgrades If There Are Some There The Upgrade The System First, It May Take A While But It Is Worth It In The Long Run, My System Run Match Better After This. Then I Followed The 7 Steps Here And It Worked Grate For Me, The Best I Have Ever Done THANKS!

By:

This tutorial is for Ubuntu 12.04 and has been written in 2012. So it uses the Software Versions that were the current Versions at that date for this ubuntu Version. If you follow the sme tutorial on a current Ubuntu Version like 13.10, then you will get a current PHP Version autmatically. So it depends all on the Ubuntu Version that you choose for your Server.

By: HG

How come you guys doing tutorials never tell your readers that using the repos they will be installing software that is 3 - 5 years old?  PHP 5.3 support ends soon.  Who wants to run a 5 year old version of PHP?

By: knsjay

awesome ., worked and installed great

linux lite., 

By: Pierre-Antoine

Thanks. Works good.