Comments on Installing LAMP On Ubuntu For Newbies
Installing LAMP On Ubuntu For Newbies In this guide I will show you how to install a LAMP system. LAMP stands for Linux, Apache, MySQL, PHP. The guide is intended to help those who have very little knowlegde of using Linux.
496 Comment(s)
Comments
Great work man. material really helped.
Great Help
Thank you, very good tutorial, now I have LAMP set up on Ubuntu 9.
Parag
Great guides. Used it for Ubuntu 8.1 desktop.
couple of slight differences:
1. It will auto ask you for a password for the mySQL database - so you dont need to manually enter the commands
2. the ";extension=mysql.so" section isnt needed - because it now starts as "extension=mysql.so"
HOWEVER: if you want to use mysqli (<- see the "i" extension) commands you need to:
gksudo gedit /etc/php5/apache2/conf.d/mysql.ini
and add the line
extension=mysqli.so
Restart the apache server and it will work
hi above document is really very good. i really thank. i have installed apache php and mysql in my pc
thanks :)
While I realize the article was published quite a while ago, I just wanted to add that I also found this extremely helpful and I thank you for adding it. Wonderful job!
Great Tutorial....
hi,
I followed the above steps in installing lamp server but when I tried to connect to mySQL.. the below error occurs
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
addition info:
apache works fine
php works fine
I have changed my bind address
I have changed php.ini file to get PHP to work with MySQL
plz help
Thanks for the very great guide.i almost finish all of your instructions but i encountered some problem on ubuntu 8.10 which may be related to get php work with mysql.
the line ;extension=mysql.so doesn't exist,i just found ;extension=msql.so
after i read the comment above,i can find line extension=mysql in /etc/php5/apache2/conf.d/mysql.ini
typing gksudo gedit/etc/php5/apache2/conf.d/mysql.ini into terminal will find line extension=mysql.so
great tutorial,thanks a lot.
Ramon
Just went through and it worked wonderful.
As a small advice. Maybe you should explain why some things are changed and maybe what other options one has depending on the purpose.
Great tutorial!
Thanks! :)
I am running the 64bit version of Ubuntu 7.04 and I found that I could not log in with phpMyAdmin. It refused me with an error #1035. A little googling reveals that loading the mcrypt package fixes it.
sudo apt-get install php4-mcrypt
Now I'm in and running fine!
It is so nice that you took time to write such an awesome exaustive tutorial by doing everything in command line. It saved a great deal of time
Thank you
I always thought there was a magical one liner to get LAMP up and running.
Was it
sudo tasksel install lamp-server
??
Great Tutorial,
A few additions if you are hosting a site on this,
Enable Apache Rewrite = ># a2enmod rewrite
nano /etc/apache2/sites-available/default
<Directory /var/www/>Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
i followed your guide with my new installation of ubuntu server 7.04 (feisty) and everything worked exactly as you said.
one small correction in the part where you edit: /etc/php5/apache2/php.ini
it seems, they moved "extension=mysql.so" to /etc/php5/apache2/conf.d/mysql.ini so we dont really need to bother editing php.ini after all.
thanks for the guide, saved me the trouble of figuring out the correct sequence of packages to install
sudo apt-get install apache2 php5 mysql-server phpmyadmin
Worked for me.
Great article! Easy to follow. Now what?
Thanks for the comments everyone.
@ IronHide - Now just do whatever you want with your brand new installation!
@locutus_of_borg - I re-installed LAMP and it still seems to be in php.ini, but you are right it is also in mysql.ini. I am not sure it if makes a difference though.
@mihai331 - I think I might edit the guide to explain more the purpose of what people are doing. Like what they are downloading, and why they would edit this and that. Also maybe a few pictures for extra clarification.
First off, thanks a ton for the awesome how-to. My only question is:
Do I have to be connected to the internet to get all of this started? I ask because I plan to set this up on a separate machine & I haven't picked up a router/nat yet. So I just want to make sure if I need that in place for everything to work properly w/out having to re-do it again if I start w/out internet connectivity.
@DJ_Maiko - Nope you do not need an internet connection to get LAMP to work.
My first go with linux and it worked great hope it is all as easy as this now I am off to netbeans
Excelent How-to, very usefull, very simple and efficent. Thanks a lot.
Don't follow this guide, just run
sudo tasksel install lamp-server
Tada
Hi Great howto - thanks! A newbie would not know to type 'exit' after step 3(MySQL section)to get to step 4. Cheers
Hi cargoship. I had problems, I'm afraid, and did not manage to get lamp operational. I've posted my questions on the forum, as requested by the admin. I'm new to Linux so I suspect I'm the problem, not your procedure.
one can also add the desktop GUI to the server installation by following this guide on zaphu.com Enjoy your new LAMP server!
Thanks very much for the howto. i installed on Oct 5 and the php.ini you refered to near the end has no ;extension=mysql.so line to uncomment. Not able to log in using the root and password set earlier but i haven't spent any time troubleshooting yet.
Thanks! This worked very well, with one minor glitch for my particular case. After installing mysql, I needed to start mysql with:
sudo /etc/init.d mysql start
Then everything else worked.
First: Excellent work dude!
Second: I had to copy phpmyadmin into my document root directory to work http://localhost/phpmyadmin, with this command in shell:
sudo ln -s /usr/share/phpmyadmin/ /var/www/phpmyadmin
# /usr/share/phpmyadmin/ is the directory where phpmyadmin installed
# /var/www/ is your document root directory
Thank you for this tutorial.
It's very good and it's help me to solve all my problems...
Hélio Évora
Thanks for the wonderful guide.
I also didn't need to edit php.ini for it was already edited but I couldn't restarting web server apache2.
it says: Unable to resolve host ... and fails !
I'm totally a newbie and I'd appreciate it if you tell me if there is anything wrong.
Thanks in advance
Thanks a lot, this was really helpful. However, I encountered some problems on Ubuntu 7.04 which may be related to previous Apache installations, configurations and deinstallations.
1. Apache complained: "Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName"
Solution: Add a directive "ServerName myserver" to apache2.conf and add "127.0.1.1 myserver" to /etc/hosts.
2. http://localhost did not work.
Solution: Apache is listening on port 8081. See ports.conf.
3. Apache did not execute the php testscript but simply served the file.
Solution: I had to activate the php module manually by creating a symbolic link:
$ cd /etc/apache2
$ sudo ln -s ../mods-available/php5.load mods-enabled/php5.load
Wonderful article. It helped me a lot! Thank you.
Everything worked perfectly fist time, thank you very much for a great tutorial.
This actually worked for me. no hitch at all. Veru good tutorial. The problem is, when I accessed my www ( root folder ) folder i don't have permission to add, paste, delete or create folder. The ownership is on root. Is there a way I can modify this so I can add new files therein? Thanks
On the desktop, right-click, create launcher. Then application in terminal, then type in "sudo nautilus /var/www". Then just run the launcher from the desktop and you should be fine.
@Tutorial Writer
Worked great, thanks for the post :)
TOP 10
TKS
I am very thankful to this. I have installed lamp without any error.
Straightforward and fast, an excellent guide for getting LAMP up quickly on *buntu. Many thanks and kudos!
very good guide, all done well!!!
I'm new to Ubuntu. I've just installed 8.10 as experiment since I normally run PCLOS.
As with everything I've tried to do under Ubuntu, I've found nearly everything I've tried to do more complicated than it needs to be!
Having said that-- I found your first effort to write a howto very clear and concise.
Thank you.
Jim
God i wish all guides were like this! I am so thankful for this, Its so easy and straight to the point. Thanks a Million. really.
Great Tutorial writing.
Easy to follow.
My problems are here:-
Option (2)INSTALLING MYSQL.... tell us how to find our IP address please!
Then:-
mysql -u root
gives:-
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('yourpassword');
gives:-
bash: syntax error near unexpected token `('
Wonder whether you can help..?
Thanks
Daf
Did you perhaps loose one of the ' marks when you changed the password?
a bit late?
anyways,
root@ubuntu:/# mysql -uroot -p
press enter and the shell will ask you for the password.
new mysql versions require the option -p (for password) when you login in.
Rabie.
When I follow your instruction on my Ubuntu Jaunty rootserver, I get this error message:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
any Ideas? is there a clearer tutorial anywhere?
This really helped, i was used to windows xamp & wamp managers, having some files of their own and management ghizmos of their own.
I just set up my first Ubuntu Studio, (i have had previous linux installs, lurking quasi unused on my computer), now i permanently deleted windows and deffected from the ranks of windows users.
This guide was straight forward enough and simple enough to actually be done in 5 minutes.
Thanks!
Muchisimas gracias por el tutorial...excelente
It worked for me perfectly.. Thanks a lot
Thx !
hello
I also had the problem with " mysql -u root " as it had already prometed for a password when installing. mysql -u root -p got me in and "exit" got me out again.
Finaly came to a halt with "Couldn't find package phpmyadmin "
Now trying to fix repositories........
No trouble at all for this raw Linux newbie. Thanks a bunch.
Wish there were more tutorials out there like yours... Awesome!
In fact (I hope I'm allowed to post this part...) I was following your directions (but I was installing onto a fresh Kubuntu setup) and I had no problems. Only difference (in case anyone uses KDE) was replacing which commands to run (SIMPLE, though):
- Instead of typing gksudo I just typed sudo and
- Instead of typing gedit I typed kate (although kwrite would have worked just as well...)
Either way, thanks VERY much for your help.
--Jeremywell just want to tell you that your tutorial works really great i tried it with ubuntu 8.10 intrepid, and i encounter no problems whatsover, thank you for taking the time to make such a great tutorial. thanks again.
Your how to guide for installing lamp on Ubuntu was great. Everything worked just like the instructions. The way it always should be.
I did find that the password for mysql was automatically set in the script so I did not need to use the mysql command line to set the password.
Great Job. Thanks
ur tutorial is great. but i hav a little prob with php.ini. actually i am new to ubuntu. in my php.ini the line was not like ";extension=mysql.so". it was like this ";extension=mssql.so". what should i do? please advice
Worked just fine! Only had to add the servername. Thanks mate!
[sudo] password for ck:
sudo: nautilus/var/www: command not found
ck@freekbox:~/Desktop$
?????
wadoidonow?
ck
There is a simply way
type
sudo nautilus, input password and go to /var/www
more easy can't be !
Works fine with ubuntu 9.04 (now i'm downloading mysql)+
sorry for my poor english
chepe263
I have not used Linux since 2001 and now I have a LAMP system running on my desktop. Tutorial is good.
But what do I do now. How do I start a web page for the world to see.
If anyone can point me to another great tutorial, thanks in advance.
Stay Cool.
Thanks.
put any web page (a file built with html andending with .html) in the directory '/var/www'
Great tutorial! Was able to install all without any issues.
Thanks
Hi I m configuring SIT, but i am facing some problems:
1) We couldn't find configuration defaults, this probably means your include_path is wrong. Your current include path is .:/php/includes:/var/www/sit/includes
SiT! Requires its libraries to be in the include path which is specified in your php.ini file, modify your php.ini and set the new include path to be .:/php/includes:/var/www/sit/includes:/opt/lampp/htdocs/xampp/sit/includes
2) DB connection problem
Configuration Problem: Could not find database connection information (db_connect.inc.php), the php include path is probably wrong
How to create and connect to the data base.
Please Help
Thanks in advance
Great tutorial, worked through it ok with just one or two things which I was able to figure out myself (MySQL Password, and Selecting to install for Apache 2).
Perhaps it is time that you ran through the process again yourself and made the appropriate changes.
Otherwise great job.
One thing which did come up at the end when I restarted Apache2 was the message
Could not reliably determine the server's fully qualified domain name using (IP Address) for ServerName.
Any pointers as to what is happening and how I can fix this if it's a real problem?
Steve
Good job. It helped a lot!
Thank you very much, it is very clear and help full article.
The step by step instructions were very helpful. Thank You
Dear Sir,
Happy to inform you your How-to works with Ubuntu 9.04.
A good and easy to follow how-to. Tanks a lot.
Wouter
Very useful tutorial, thanks for writing it.
SUPERB! THANKS SO MUCH FOR THE HELP!
Thanks for the guide, I used it to manualy install LAMP on Ubuntu 9.04 Jaunty Server. If anyone is reading this and wants to install manualy as I have done simply follow the guide as written above replacing all references that contain
sudo gedit <command here>
or
gksudo gedit <command here>
with
sudo pico <command here>
Hey, this article has been great to me and I have really loved that straight to point idea.
We are new users of UBUTU and very excited to be part of the family.
cheers
great and simple tutorial, does exactly what it does on the tin, worked fine and made me feel like I'm getting somewhere with this Linux jazz! Thanks for the help!
great article!
Thanks for such an easy step by step tutorial. Installing LAMP this way was even easier than installing WAMP on my XP machine.
very useful article..though had got stuck in between while using "mysql -u root", but made do with "mysql -p". Thanks a ton...:-)
Thanks for the clear tutorial, I had no trouble when installing LAMP in Ubuntu9.04 following the instructions.
Great guide, was really looking for a good one and just checked this out. Thanks a lot!
Thanks, this was great! Worked on the latest Ubuntu.
Simple and at object. It was very helpfully for me.Thank you
ya i installed successfully thanks man.but i was confused slightly in middle and in last.anyone i manage it. thanks a lot.
Thank you very much. This is a great tutorial on installing LAMP on Ubuntu.
Thanks, this LAMP instruction really help. Great help.
It was one of the best guides I've ever read! Works perfectly in Ubuntu 9.04. Thanks a lot! Good luck!
thanks dear.this guide became v usefull to me.thanks a lot.
Thank you very much for this guide!
Works like a charm!
Great guide, thanks!
I was very new to the ubuntu and i was always afraid of using linux commands but after reading your steps to install LAMP on ubuntu, i tried installing it and i did it successfully. I can say that i cannnot find any thing better then the steps you have given to install LAMP on ubuntu. Thanks for such Precise and clean steps.
Excelent tutorial :)
It works on Ubuntu Netbook Remix.
Great guide!
Keep it up!
Thanks a lot!
It's very helpful tutorial!!
That was the easiest setup that I have gone through. Now I just have to setup a page.
Thanks
Thanks this is one of the simplest tutorial I found. Thank you very much. Worked on Ubuntu 9.04
Followed the guide completely but as soon as i restart mysql will not start again unless reinstalled completely.
Whats the deal?
1st problem
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
2nd problem
[Thu Jul 09 13:05:17 2009] [warn] NameVirtualHost *:0 has no VirtualHosts
... waiting [Thu Jul 09 13:05:19 2009] [warn] NameVirtualHost *:0 has no VirtualHosts
it is ok?
3rd problem
mysql> SET PASSWORD FOR root@'localhost'=PASSWORD('abc123');
ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement
then i read explainaition in http://bugs.mysql.com/bug.php?id=22077
but still i can't understand
pls..help me
zackgigz(malaysia)
I am not familiar with your third problem, but your first problem is that his tutorial does not include the specifying of the mysql password that you previously set. So if that password was say "linuxrules" then you would run mysql with
mysql -u root -p linuxrules
I believe your second problem is no big deal, and just telling you you don't have any entries in the Virtual Host file.
Hope that helps.
Jeff
Your guide was an excellent source to walk me through what I thought would be a difficult exercise for this newbie! I just used this guide to install AMP and PHPMYSQL on a new install of Ubuntu 9.0.4.
Many thanks.
Jonathan Kramer
Kramer Telecom Law Firm, PC
Los Angeles, CA
These instructions are fantastic. You have a real knack for breaking complex instructions down to their basic form.
Thanks
Best tutorial ever...
Thank you.
This worked perfectly on Mint 6 and I could install Apache, PHP, MySQL with phpMyAdmin.
During installation of MySQL, it asked to set root password. After setting root password MySQL password setup step was not required.
During installation of phpMyAdmin, it asked for default web server, and after selecting apache2, it configured phpMyAdmin.
Thanks again.
Thanks for this good clear post. It made my install very straight forward. I have one request though... are there any tests that could be added to confirm that the install is doing all the things it should be doing?
thanks
Deepak
installing phpmyadmin requires a little more instruction to point the phpmyadmin folder from /var/www to /var/www/phpmyadmin
you would need to:
sudo ln -s /usr/share/phpmyadmin /var/www/phpmyadmin
I'm a newbie and i was trying to figure out what/where i went wrong with you instructions.
thanks by the way to the instructions above! :)
Nice one. Sorted.
BTW Life is easier when you use a password with MySQL (PHPMyAdmin doesn't like root user without passwords it seems)
Great instructions, thanks. I also had to add the above.
easy and helpful,thanks
This article is accurate and helpful. It is this type of articles that makes the Internet a worthy place to search for answers. Thanks!
Worked like a charm, thanks
Thanks for a great LAMP tutorial worked fine for me on Ubuntu 9.10
Setting up passwords where completed via the intall process so had to by-pass that point in your tutorial.
Thanks
Hello
Many thanks for the greate tutor you made how to setup a LAMP configuration in Ubuntu.
It helps me a lot to locally test Joomla packages
Thanks again
Best regards Ronald
Thanks a lot.. I have been trying to configure my lamp server and succeeded now.. Nice explanation..
Cheers:-)VIKRAM
I had that same problem and found out that I had not restarted apache. Once I... sudo /etc/init.d/apache2 restart it worked great
I had no trouble following this guide it was well written and very helpful.
Thanks for the guide !
minus the instruction on how to get phpmyadmin to work, this is A GREAT how-to! Thank you so much!
Nice post ..very clear explanations... thanks man..
Great tutorial and lots of good tips in the posts.
Thanks
It's Better then i've seen.
thanks you
I'd looking for just this one
Good luck to you for more
Nice Tutorial, but please try considering need to execute this command below for changing phpMyadmin folder to var/www
sudo ln -s /usr/share/phpmyadmin/ /var/www/phpmyadmin
Thanks
Thanks! This works great!
Thanks for the awesome tutorial, I come here all the time! :)
that was reaaly help full thnq for tht
Thank you very much.It has been a very helpful article.
Superb Tutorial i have ever seen to install LAMP
Thank you dude
jus now i installed LAMP in my new ubuntu 9.10(Karmic Koala)
Installed finely except that restarting Apache 2 server
but atlast i edited Apche2.confg
vinopavit, what did you edit in the apache2.conf file? I'm having the same problem restarting apache.
Thanks in advance!
I followed the install as noted and it was fine up to the mysql install. The install now asks for information not covered in the guide, overall the guide is good but it needs to be updated.
Michael
P.S. A nice little test Schema would be a nice touch to verify the mysql is working properly :)
Had a few problems with restarting the apache server: "
“Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName”
But I found a solution to this issue here:
Thanks again!
Instructions were very easy to follow. Anybody taking the time to thoroughly read the instructions will have no problem with the setup. Congrats on publishing these most helpful instructions. Great site!
Thanks much. This was a big help.
tU, Happy New Year and more guides like this one, plz. Very well done.
Thanks for this tutorial. Everything is running smoothly now. My only suggestion is to somehow improve search rank as I found this after three days of trolling. Would have been great to find on day one.
Despite minor details your guide really helps, solid gold!
Thanks 1,000!
extremely useful. thanks
Hey!!
Bro that was smoooth sailing for me!! Thanks a lot.
For your first tutorial it was really good!
This was by far simple and easy to follow. thanks you are the real boss.
Great tutorial. I followed your instructions and sucessfully installed on Ubuntu 9.10
I used "sm1one" suggestion to add
ServerName localhost
to the httpd.conf file and it worked fine. The installation asked me for the MySQL password so I had no problems there also.
Smooth installation - thanks!!
Thanks for the tutorial for installation...
Now I want to know how to run the php file in it?
Any one can guide me on that?
Everything seemed to work like a charm!
Very clear instructions.
Now all I need to do is figure out how to get into mysql with some admin app.
My first try an any sort of installation was avg antivirus. I downloaded and installed the file, but I cannot figure out how to launch the app.
I will appreciate any tips on tutorials which will in crease my skills in installing and using apps in Ubuntu.
I suppose you could supplement this tutorial with a part 2 which then walks someone through the launching of these apps and creation of some simply application with table.
I have the same problem(using Ubuntu Jaunty 64bit).
No solution in sight?
and it has nothing to do with missing ' as there are no ' in mysql -uroot -p
Can anyone help?
My php.ini file doesn't have the ";extension..." line...
What should I do?
I sorted this out just adding it (extension=mysql.so)
Thanks to the autohor for this outstanding step by step guide !!!!
Thanks, phpMyAdmin refuses to work without that!
Hi - have just worked through this tutorial and apart from one place where I misread the request (setting up phpmyadmin), and the requirement to provide the IP address - everything went smoothly. Am not sure yet however whether I have actually succeeded in installing all. It would have been nice at the end to have had some kind of test to do which would have shown unarguably that it was done (plus reinforce my efforts!)
I guess I will find out soon enought whether things have installed properly and will now work. If they haven't I'll be looking for help!!
Cheers R
Outstanding job! Up and running in no time. Thanks!
PHPMyAdmin did not work until the following was added to /etc/apache2/apache2.conf :
Include /etc/phpmyadmin/apache.conf
So thanks to the guy who posted that one too :)
To fix that problem, you need to edit the httpd.conf file. Open the terminal and type,
Now, simply add the follwing line to the httpd.conf file.
Save the file and exit from gEdit.
Finally restart the server.
Hard work, but a well paced guide.
Thanks for making the first effort.
Great tutorial. Thanks a lot! Just one thing... please move the note about passwords from the end of the tutorial to the place where password should be changed ;)
ivan@805-room:~/Documents/jmonitor$ sudo /etc/init.d/apache2 restart
* Restarting web server apache2
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName ...
waiting apache2:
Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName [ OK ]
Hello, I have a problem.
I think that it isn't clear... What I should do?
P.S.: I have an Ubuntu 9.10
the best guide i've ever read!! Thank you sooo much!
This is the quickest that I've ever setup a LAMP server thanks to your guide. You da man! :)
Excellent overview. Helped me a lot. However, I think you may have overlooked the need to add the following to apache2.config:
Include /etc/phpmyadmin/apache.conf
Fabulous instructions!!!!
I followed each instruction and was able to successfully setup this correctly for the first time.
Thank you for the tutorial. I have set up LAMP before, this is about as easy as I have ever had it.
The simplest way I know of installing a LAMP server in Ubuntu or Debian is to let Tasksel do it:
sudo tasksel
- select 'LAMP Server' and then follow the prompts. You can make adjustments to the configuration as needed after the install but you will have a working LAMP server right out of the box!
Cheers!
This tutorial has really been of great help to me. It was straight and forward for a newbie in Ubuntu.
Thanks again.
This is a tutorial, how tutorials should be!!!
while testing for php, the browser asks me to download that file...
Is my installation for php is correct?
It does not show the content shown in your tutorial... It directly asks me to download the file... :(
Thanks a lot for this tutorial, I followed it and it did exactly what I expected it to do (installing LAMP on Ubuntu 9.04 Desktop on a G4 Apple Mac).
Cheers!
Steffen
Thanks a lot !!!!!!!!!!
It is the simplest and easiest tutorial I've ever had...........is a terrific help for the beginners....
thanx again n keep helping us!!
Hi
an excellent article. everything worked well all the way through.
I have encountered one last problem, on the last step of restarting apache
after i typed sudo /etc/init.d/apache2 restart
i get the following error:
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
i have changed that ip address to my computer's ip address as shown in your article
many thanks
Thank you so much. This makes installing LAMP easy, especially since I am fairly new to linux. I am no longer a windows user, thank god, and this takes minutes compared to hours trying to set up on a windows box. There were a few extra steps, but most of it was prompt based. But I'm up and running and excited to learn VIM.
Thanks for the guide, It has been very usefull to me. Thinks like this guide and people like you make great Internet!
Thank you for the simple to follow article. I was able to get a web server, database, and admin tools up and running in under an hour. Amazing!
Had to add LAMP via a remote system and it worked just fine with a few differences:
1) MySQL version 5.1.37-1ubuntu5 prompted for the root password thus eliminating the tricky part.
2) Didn't find the ;extension=mysql.so entry in php.ini, so I didn't make that change and as of yet, I am not experiencing any issues.
Very helpful post
Thanks
Dave
Great job! This is the first one I found that worked!!
quick and easy kungfu for ubuntu.. thank you
excellent job.thank u....
well,thx helped me a lot...
i had project to make and it was kind of impossible to make under windows.and now ,after rethinking some stuff,i would love to permanently change my os to linux...
u should make more tutorials for newbs...there are a lot of us out here:))
I followed your instructions and it all worked perfectly first time. The only difference was that the MySQL and PHPMyAdmin both prompted for passwords and usernames etc so there was no need to tinker with configuration files.
Nicely presented HowTo.
Thanks..
hi sir
after completion of Lamp installation on my system and when i am trying to open the following url i.e http://localhost/phpmyadmin it says phpmyadmin was not found on this server.So please do reply
Thanks and Regards
Sunil Jadhav
Dont worry, your tutor was really helpful and easy to follow, 5 stars!!! ;-)
Had installed all the packages but was stuck with trying to figure out how to run the test scripts i was writing for the tutorials. All of them just said to post it to the web server document root and while i knew what that was, dint know where the local root was for apache! Anyway thanks again... i was getting desperate enough to consider just wamp and learning php.
It was great help.
Thanks,
Bilal
Needed a quick and dirty way of getting a LAMP environment going (I haven't touched *nix in ages) and your guide was a Godsend!
Nice job - thank you! :)
Great blog, and the author is surely cool! Pretty good, man!
I am new to Linux and definitely appreciate the easy walk-through on this process. Thanks!
Hi I installed the lamp on my ubuntu server and everyhitng is almost perfect just one problem.
I finished all but when i try to get into my /ipaddress/phpmydmin it is not working yet.
Can you tell me pleae how i can browse in my phpmyadmin page.
Thanks a lot.
Many thanks, the LAMP installation was smooth
THE BEST!
This was much easier than the xampp on Ubuntu install I did a couple months ago, which involved searching to solve "after install" problems. But your nice simple straight forward guide?... No problems at all. Everything works. Beauty!
And now I have a bonafide real deal lamp install :) - Sweeeeet!
great tutorial thank you
Thanks for the guide. Made installing everything easy for a course I am taking that requires I create a database and front end website in php for it.
Many thanks for your Lamp Install guide. As a newbie I found it very easy to follow. It worked perfectly without a hitch.
Thankyou!
This was perfect for a newbie like me. Please, write more guides just like this.
I have used php-mysql in windows already...
but i was totally unknown to Linux or Ubuntu..
then the guidelines provided by you helped me..
i found it very easy to install php in ubuntu..
Thanx man..!
Simply thank you!
good great post
Your tutorial is excellent.
Thanx!
this was quick and easy not hard at all the pasword thing throw me off cause it just pushed me into making a password i didnt need to go through the password step but not hard at all
Great post...
You said it was newbies...that wasn't the case since my installations took some turns that newbies might not logically put 1 and 1 together, ya know?
But you surely made it easy for me... Thanks again!
you also need to include the following line in /etc/apache2/apache2.conf
first type the following command to open up this file:gksudo gedit /etc/apache2/apache2.conf
Add the following line of code inside apache2.conf:
Include /etc/phpmyadmin/apache.conf
save it and restart apache:
sudo /etc/init.d/apache2 restart
Thanks dude, its really help me.out to phpmyadmin work correctly..
When trying to save the php test file to /var/www i get the "you don't have permission to save file here" error. should i change the permission of the folder or not? Actually i'm a noob in ubuntu and i read somewhere that it is better to not change the permission of the var folder. so what shall i do now?
Did you use
sudo gedit /var/www/testphp.php
for editing the file?
The "sudo" is important to temporarily get root privileges.
In phpMyAdmin I get "No Privileges" under the area to create a new database.
I get this on my account (MPG) and root...
Thank you very much. This guice is useful, just for the new PHPer.
great instructions ! -- thanks
Thanks man!
I installed everything very smoothly with your help.
Can you please tell me a good manual for mysql.
Thanks in advance for your help
Many Many Many big THANKS!!!
I'm newbie to this and it not just helped, I installed everything almost w/o any troublems... Well one of the comments helped me with one problem but it was nothing big.
Installed it, now to learn how to use all this crap! LOL
THANKS A LOT again!
Hey Cargoship,
Your instructions were absolutely brilliant for me as a newbie in linux. Love the easy understandable instruction, though I wasn't quiet sure about one thing. I had to change the bind-address to my ip. Does that mean I have to change it to the IP address to the one assigned by my LAN or are you refering with that to the WAN address? As I said, these are my first steps in web-server doings. But otherwise awesome site ! Well done !
regards andiluvslinux
Nice guide. Brief but all the right info in the right places.
Cheers!
Awesome newbie instruction. Thanks!!
This was unbelievably helpful. THANKS
I really appreciate this how-to!
I'm building a website for a club at school, and I needed a LAMP server to create it on. I've looked at several tutorials, and this was the only one that even steered me anywhere near the right direction. Thanks to this, I can finally get to work on the site!
But one more question about phpmyadmin:
I got it to the point where http://localhost/phpmyadmin says 403 Forbidden. Any suggestions?
(If it's relevant, I'm using Ubuntu Hardy Heron, and my webpages are in /usr/local/apache/htdocs)
Thanks, that was painless.
thank you..
you made it easy to configure.
thanx a lot
thank you for your guide given... i've learned so many things... thank you again...
Thank you so much for providing this excellent tutorial on LAMP configuration
a lot
I didn't realize how relatively painless this could be on ubuntu. my thanks
how i uninstall all that i installed.
everything was woking but after a restart i tried to change data base password now i get error in phpMyAdmin
Error
#2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)
so it thinking just unstall the whole thing and try again.
I decided to cut off microsoft and all it's products and was really stuck with using mysql on ubuntu but u came to the rescue .. God bless you
Great Guide, very simple and to the point.
Hello there
Instruction given for installing LAMP is very useful for beginners. Saved time and my health by providing simple step by step procedure. Great work. Thankyou so much for posting.
Thank you
I'm new user
Great work buddy Really useful for me each time I'm upgrading my system
Bookmarked!!!
Excellent! I was able to set it up in no time. Many Thanks!
Your guide was so easy & helpful, just please add to them MysqlPasswordReset in details. Thank you!
This is by far the best, most effective and friendly and easy to use guide I have ever read or used. I read the whole thing. It was so good and rich with usefulness that I didn't want to skim through it, I wanted to savor it. If only the endless man pages and example scripts and online documentation I went through could have been half as perfect and helpful. I am extremely impressed and grateful. If I wasn't already in a committed relationship I would ask you to marry me :) Thanks again. If you ever need anything, like my first born or what not, just say the word. Wow, I mean, seriously, please do more. If you don't mind. Maybe configuring drupal, or cake_PHP (I don't know if I'm even into cake...if you do more guides do what ever you like. I'm sure it will be great and I will find it useful no matter what the subject matter.) You know what? For all I know, you may have done lots more already. I'm going to look. But not while I'm writing this. So, see you around, or you handiwork at least, I hope.
Thanx buddy i'm writing this without even completing my installation of mysql.
Thanks a lot for your details help and assistance. Worked very well.
excellent tutorial, simple, valid, easy to follow.
I seem to recall there was a way to install all the components in one go, as "lamp" but I was unable to find a reference for the apt-get install command to do that.
There is a way from the synaptic package manager that allows you to install the lamp server as follows:
open synaptic > edit > Mark package by task > on the new windows scroll down to "LAMP Server" and apply.
hats off to you sir.. very helping guide..
Hi, I found your tutorial to be very clear and helpful. However, I believe it is now dated. I followed your directions to a T, I have Ubuntu Lucid Lynx 10.04 and upon installing mysql a semi graphical interface popped up asking for the root password. The same type of graphical interface happened with phpmyadmin when I was installing that as well. I am unable to view phpmyadmin at http://localhost/phpmyadmin/. I apologize, I am very new to linux/ubuntu but I definitely enjoyed your guide up until I encountered discrepancies with the tutorial.
Everything I was looking for and nothing more, everything worked within minutes on Ubuntu 10.04. Thanks!
An easy drive thru, for Ubuntu newbies. Thanks, and keep such posts coming :)
Thanks!!! clear and useful tutorial. it woked with no problems in ubuntu 10.4.
very clear and simple tut.
it worked perfectly.
to the point love it
Great tutorial.
This is the simplest tutorial i ever met on the internet about installing LAMP. Believe me users it's the gud one.
One more thing don't forget to run this command after installing phpmyadmin
sudo ln -s /usr/share/phpmyadmin/ /var/www/phpmyadmin
otherwise u will get a 404 not found error. Actually this command let the browser know the phpmyadmin folder to be in var folder, thought not actually. just link that virtually..rest is much fine..have great development guys.take care.
raju aryan
Hei All,
Raju's final "ln" command is crucial.
Ubuntu 10.04 usually by default installs LAMP already
Was scratching me head where to invoke phpmyadmin..
Cheers.
Really perfect guide; everything worked just as described. But this phpmyadmin issue should be included in the initial tutorial, just to make it more perfect. Regardless, thanks a lot and keep it up!
I added below lines in apache.conf, file
# Include phpmyadmin configuration
Include /etc/phpmyadmin/apache.conf
# Remove the useless apache warning while startup
404 error fixed.. now I can access http://localhost/phpmyadmin
Thank U.
Thank you so much for the great instructions. Everything is working now :)
Thanks for the information.
Fantastic! Thanx a lot!
You should also add there may be a misspelling in the php.ini file:
Initially it shows:
; extension=msql.so
But it should be corrected to show:
; extension=mysql.so
I also added another line :
; extension=mysqli.so
Thanks for the tutorial!
I thank you for all your help, you did a great job for those of us that have no experience with LAMP servers. this was great. Thank you again in Jesus Name
Linear, clear and simple! You did an excellent job. You are fine man with great karma. Bravo. Laurel garland and glory.
Thanks man! You're the best!!
was really helpful.
just one thing: in the php.ini, it seems like the 'extension=mysql.co' changed to 'extension=msql.co' for some reason O_o
This is an excellent help page and guide. Thank you.
Given PHP in your instructions does not include PHP with GD support (security issues so I am told) I was wondering if you could give the user the option to install PHP with GD support with the command line:
sudo apt-get install php5-gd
Which ever way, thanks for the excellent support.
Nice info and run perfectly....!! thanks....
Good tutorial. I want to note that changing the bind address is a rather terrible idea. MySQL should only be available from the local machine. There is generally no need to access if from other hosts, and it is a bad idea to make this change without addressing the security concerns.
Hi,
The best and simplest post. Works perfect!!! Always find working in linux better than windows. LAMP is yet another instance 2 prove it :)
This is really valuable post on installing and configuring LAMP on ubuntu environment.I would like to add one more thing that i have faced in my ubuntu 10.04 installation(also on 9.10).
when i was trying to restart apache server soon after i installed it i got the following error:
* Restarting web server apache2
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
... waiting apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
this might be happened due to missing statement in your httpd.conf file. (default configuration file for apache server)
this can be solved as follows =>
1) open your httpd.conf file :
sudo gedit /etc/apache2/httpd.conf
2) then insert this entry into your httpd.conf file and save it.
ServerName localhost
3) restart apache server :
sudo /etc/init.d/apache2 restart
I hope this might be helpful to those who have this problem.
Again thanks a lot for these instructions on LAMP installation
Regards,
Ruwan Wickramarachchi.
Ruwan,
I do not know if this is the case, but you might have gotten the error you had because you were using the IP address "127.0.1.1" That is not the "loop-back" address, the correct IP address for working on "localhost" is "127.0.0.1". I believe the reason that editing your config file worked was because the "localhost" setting uses 127.0.0.1 as its IP address.
As the expression goes, "the devil is in the details". Hopefully this will also help any others who might have had an issue like this.
Regards,
j
Excellent guide for newbies! Followed instructions as mentioned and voila... its working! Thanks a lot
Very good, thank you! Also great comments, people! Reading the latest 50 or so really helped.
Hey,
1. if the command not works mysql -u root just use this one mysql -u root -p
2. similarlly for sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin use sudo apt-get install libapache2-mod-auth-mysql php5-mysql
this is good advice. post should be updated
Hello
Really it is a very good helping guide for newbie of Lamp.
by using this i did my full installation in ubuntu.
once again a lot of thanks for writing this article. and hoping the same for others . Please keep it up.
Arvind
This is a very good tutorial but i failed to find ';extension=mysql.so' in the php.ini file instead i found ';extension=msql.so' and changed it to extension=mysql.so by adding 'y'.
The name is extension=msql.so
just take out the ; infront of extention=msql.so to make it look like this
extension=mysql.so
then restart the server.
Genial, Genius............
Worksssssssssssssssssssssssssssssssssssssssssss Great!
Thanks
i am a newbie and your TUT help me to enjoy the Ubuntu 10.04. now i want to now that how can i start the apache sever automatically? i have created a luncher in my desktop and set this command: sudo /etc/init.d/apache2 start i don't know how can i make it all automatically. Best Regards, Mohammad
Thanks for taking the time to write your article on installing lamp. I'm new to Ubuntu and know next to nothing about it. Your article helped me walk through the process with ease.
Most possibly the simplest Howto.....Thanks a lot.
Seriously...awesome tutorial, thank you very much! I am a complete Linux newbie and I am now up and running with LAMP.
Excellent.. thank you
Thanks. followed the guide to step 3 w/o any problems, but at step 3 I get the following message in the terminal: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
I got the same, but realized it was because I already set up the root user and password on install. Just use
>mysql u- root -p
to get in and set up any other users for your new database.
:-)
thanx man.... it is great....
This is an excellent working guide. I installed on an Ubuntu 10. This is what users look for. Congratulations and thank you.
The tutorial is excellent. I would like to install PHP5 with FTP and Socket. Pl tell me the command to do this. Thanks in advance.
Great Tutorial! More to come I hope? Thanks a lot.
This is a really well written tutorial I would like to see it go just a little bit farther and explain how to get a page set up that says something more than "it works".
Thank you for this great article!
It works, thanks!
Thanks! It was a great help in getting LAMP installed on my ubuntu machine..
Thanks, gr8 and on the target work..
Thanks for taking the time to write this tutorial. I just installed Ubuntu 10.04 -- my first new Linux since Slackware. I found a few of the details were slightly different from your post, but it got the job done painlessly.
it's just great!!!
i'm new to ubuntu and this tutorial helpt me a lot!
just btw: if u install the latest mysql you can set the password at installation
Thanks a lot! It works perfectly! I tried to make it work on Windows for forever but it never worked, now on Linux with your tutorial I tried it for the first time and it instantly worked! Thank you!
Wow finally somebody that knows what they are doing but is clear and concise. I literally have visited like 10-20 other sites trying to get this working and they all have gotten me confused or haven't been thorough and complete.
Thanks!
Keep it up.
this is an excellent tutorial i found it very easy. Just remember to use mysql -u root -p if u have used a password for sql root. thanks
Installations are perfect . Php runs with apache2 web server but Mysql is constantly giving access denied .How to get Mysqlworking as a database and php is also unable to connect to database .
I tried a few other help me pages for LAMP. I ended up blowing up my system twice and trying again. Then I found your document and it worked like a breeze.
The "extension=msql.so" really needing to be "extension=mysql.so" should be added but luckily a fellow poster had it covered.
Again excellent assist here. Thanks!
This is an amazingly accurate step by step tutorial. It was very clear and accurate!! I just follow the instructions here and everything worked fine (apache and php). During the install, I was prompted with few additional y/n prompts and different prompts for passwords not mentioned in the tutorial. But I am very familiar with WAMP (Windows rather than Linux) setup, so slight differences didn't throw me off though.
I am a bit confused about the reference to "extension=msql.so" though. My php.ini file contains that, but one of the comments says it should be "...mysql.so". ???
You have a talent for this, please keep doing it!
This is an excellent tutorial. I totally messed up my Ubuntu 9.04 installation by getting it all wrong and I can see where I went wrong now. I now have a fresh clean install of 10.04 and the correct way of installing LAMP. Fantastic...thank you.
Andy
Thanks a lot.
After been wasting a lot of my time on windows platforms I've migrated on Ubuntu, especially for production environments.
Fantastic guide, really well written, informative and useful. Bookmarked for future builds :D
You, in a single tutorial, have enabled me to finally make the transition overnight. Going to a real server platform has always been an overwhelming nemesis that I have deferred due to my lack of know-how and intelligence. I am now migrating as we speak to Ubuntu.
I thank you
I thank you
I thank you!
-John
After 3 years it still can be used. I miss only 2 little things which would make it complete for the real newbies.
- How to exit the MySql Shell (by typing 'exit' or 'quit').
- How to start PhpMyAdmin (http://localhost/phpmyadmin), although you could argue that this belongs in a PhpMytAdmin tutorial.
Hi:
I installed ubuntu one today as a plan to shift from windows to a linux system for my development purpose and was looking to setup AMP on it.
I can safely tell you that the article is neat. Serves its purpose. Easy to understand. keep up the good work and keep me posted.
thanks and regards (no hard words here ;)
Orijit
2 :thumbsup:
http://localhost/testphp.php
when i type it in my browser i dont get the page which you said. Can you please help me.
excellent guide.
Thank you.
Hi,
Great how-to!
As of 10.04 mysql.ini can be found at "/etc/php5/apache2/conf.d/mysql.ini".
New to Ubuntu and after trying other ways to load php/apache just gave up. Your tutorial took 2 minutes and everything is up and running, bless you, well done.
George
Really useful tutorial. Thanks very much!
The tutorial is just perfect for the needs and is too simple for understanding.
Thanks alot.
i tried to follow every step but seems to be prob somewhere.. while installing apache installation of 'start' command failed don know y n so wen i m trying to configure it with sql and php i need to restart apache its not starting but giving ab error msg.. pls somebody help here is the error msg * Restarting web server apache2 (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down Unable to open logs Action 'start' failed. The Apache error log may have more information.
Thanks a lot !!
I am new with LAMP server and It is the shortest and easiest way to install and configure LAMP.
Thanks
Gulshan
Thanks a lot once again
Thanks for the brilliant tutorial, I would not have gotten this installed without it.
just a small note, step 3 was not needed in the version of Ubuntu I'm using ( I think it's maverick meerkat?) there was a prompt to get through step three that popped up at the end of step two.
--------------------------------------
After all steps where done (successfully) the landing page was throwing an error, this was needed to fix it.
gksudo gedit /etc/apache2/apache2.conf
Add the following line of code inside apache2.conf:
Include /etc/phpmyadmin/apache.conf
---------------------------
from this website
http://www.blog.highub.com/linux/install-and-configure-phpmyadmin-on-ubuntu-lamp/
thanks again, would not be looking at some cool databases without you!
Good job.
very helpfull, thanks
Perfect...... Hats off to you
Wonderful and easy to follow. Thanks!
superbly easy setup instructions. Worked exactly the way you say.
Thanks a bunch!
Thanks, It is really very easy to set up LAMP by using this guide!
Very, very helpful.
Thanks a lot!
I only had to find the information regarding to create a symlink otherwise:
sudo ln -s /usr/share/phpmyadmin /var/www/phpmyadmin
Then it worked perfect.
I did this, which got rid of the 404 for http://localhost/phpmyadmin but I now have a 403 Forbidden in it's place. Any ideas?
Those with the GKSUDO command simply replace this line:
gksudo gedit ....
with this one: sudo gedit ....
this works great. thank you so much. write more guides :)
Wonderful instructions. Followed them with no difficulties whatsoever. One question: The date on this is 2007. Does it retrieve all the latest versions, or do I have to worry about that now?
I am Joe from China, Beijing.Thanks for your guide! its great!!! I am new to LAMP. I wish to know you. You can be my teacher.
Great walk-through, but I got stuck in the end.
Where I'm supposed to remove the semicolon.. Can't seem to find that special line ;extension=mysql.so ....
Then when I try to restart Apache, nothing happens.
Thanks in advance!
Thank you SO much... I'm a new user....and had some issues figuring this out...... gone through many forums and none helped.... until I got to yours!
Once again THANK YOU!!!!!!!!
thanq dear , am also a new user and am very happy now
thank you thank you thank you, what has taken me hours just took minutes you should be a tech writer way better than UBUNTU docs
atp
Thanks for the steps! :)
I am looking for a guide how to install a LAMP.. I spend how many hours just to look for the right site...that's why I'm very thankful that I've found this one!.. thank you... may our GOD blesses you in all aspects of your light.... GBU..
This is an awesome guide; good work, I would like know about security and maybe how to link my data base with freeradius, and to a login portal page to authenticate wi-fi users.. would you happen to have a guide that you would like to share...
Very good guide! Thank you!
works like a charm!. Great !
Work Great! Thanks!
Excellent guide! Thank you for taking the time to make it!
recently i switched over to linux mint 10 julia and am facing lot of problem with LAMP INSTALLATION.thati followed up the instructions given in the link https://www.howtoforge.com/ubuntu_lamp_for_newbies
and followed each step as mentioned but i skipped the following section
-----------------------------------------Step 2 (optional). In order for other computers on your network to view the server you have created, you must first edit the "Bind Address". Begin by opening up Terminal to edit the my.cnf file.
gksudo gedit /etc/mysql/my.cnf
Change the line
bind-address = 127.0.0.1
And change the 127.0.0.1 to your IP address. -----------------------------------------------
as i am working only in my laptop computer and i don't have ip too;
MOREOVER
DIALOGUE BOX ASKED ME IF I WANTED TO SET UP A DATABASE NAMED some conf.....(i don't remember clearly)
which i said no to;;as i d installed my sql earlier itself;;
it showed a couple of dialogue boxes asking to enter your password-which i did;;then
the rest of commands;;showed the following errors in the terminal
COMMAND-mysql -u root
ERROR-ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
COMMAND:mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('yourpassword');
ERROR:mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('yourpassword');
now that i have restartted the server and server is running;;;
it shows the proper:IT WORKS message for::::http://localhost/
and it does show the proper configuration for
http://localhost/testph.php
but for http://localhost/phpmyadmin
its showing
----Not Found
The requested URL /phpmyadmin was not found on this server.
Apache/2.2.16 (Ubuntu) Server at localhost Port 80----------
SOMEBODY PLEASE HELP
You have to follow the next instructions:
To set up under Apache all you need to do is include the following
line in /etc/apache2/apache2.conf, first type the following command to
open up this file:
gksudo gedit /etc/apache2/apache2.conf
Add the following line of code inside apache2.conf:
Include /etc/phpmyadmin/apache.conf
Now restart Apache:
sudo /etc/init.d/apache2 restart
Man, 10x for your post... I had the same problem but now the problem is solved and everything looks fine :)
Regards,
George
Thanks a million... never knew how easy it was, thanks.
Thanks, had the same problem.
This should be added to the guide, I wouldn't have found out about it if I didn't check the comments section.
brilliant! this was the only thing missing from the above tutorial, thanks!
This was a great help
well, i had the same problem and, i solved it with:
use the command like this:
mysql -u root -p
after that you have to type your password, that is already exist if you add one before.
its worked to me fine.
From fresh ubuntu installation to running phpmyadmin in about 10 minutes!
Thanks
This guide was invaluable, my mother in law sponsors a student where I live, and the student needs a machine as she can't afford one*. I have resurrected a 7 year old laptop with XUbuntu into a reasonably decent dev environment, so your altruism has helped people helping others, good karma :-).
Went as smoothly as ice, I'm a .net dev by day and I love Linux, but my job
keeps me pretty tied to MS operating systems. I only use Linux under VMs
to keep my hand in. When my wife buys herself a new lappie, I have
plans for the old one :evil grin:
* This is why I've remained anonymous.
thanks a lot !!!
This guide is right at the point and tells you exactly what you need to do. Keep up the good work.
It was very helpful. Thanks a lot for this wonderful information. You made my day. :)
Excellent! Thank you so much. You're tutorial is straightforward and so easy to follow. After quite a number of years using WAMP on windows I migrated to Linux using Ubuntu. I was very concerned about using/configuring my development environment. I had searched around for a way to use LAMP. I found you! Everything was/is up and running within half hour just by pasting your commands.
Once again thank you very much. More tutorials like this from you please!
Ges Scott
wat a site !!!!!!
superb!!!!
thnx a lot
neat elegant. very well done indeed!
very easy yet very useful thanks a lot :)
Great job! Very easy to follow, and straight to the point! Thanks!
thank you, it was totally no pain ;) (in ubuntu 11.04 no need for last steps with mysql extension ... anyway works like a charm)
Very good post. It worked for me. Thank you.
Great walk-through, works great!
Thanks
Brilliant!
just wanted to say this is one of the best, most concise and easy to follow guides for doing something incredibly complex, kudos to you folks! thank you!!!
wow, just wow. amazing!!!!!!!!!!!!!!!!
easiest guide ever
It is really helpful.
It's a great tutorial , help alot
I really must say that you are very good what you teach. Thank you for your time and knowledge.
I install this to my Ubuntu desktop, but i want to know if it possible to use any controller to access them as one interface (like a control panel).
I also will like to know if you can guide me through the ftp setup or openssh
Although i would have love to communicate with my Ubuntu Server 11 directly with a webmin, but i am having problem installing it.
it shows this error message any time i type
~$ sudo apt-get install ethtool
[sudo] password for mklaw: 'i typed password'
THEN error
Reading package lists.... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package ethtool
ANOTHER error
~$ sudo /etc/apt/sources.list
[sudo] password for mklaw: 'i typed password'
THEN error
sudo: /etc/apt/sources.list command not found
I am not sure if it is referring me to the CDROM instead of the internet to download.
Please offer your warmest support.
thanks a lot man.
i had a problem with mysql and i saw the link after i solved it!!!
Excellent tutorial
Thank you for the excellent step-by-step procedure.
I just wanna thank you for this great tutorial! :)
Great guide! The only issue I ran into was step 3. I even tried it with sudo, didn't work. Found out that I already have MySQL installed, I believe that that may have been the issue. I am running on 10.10 and LAMP work beautifully. Thanks for the guide.
Thank you, very easy and clear tutorial !
All done in a jiffy... loads of thanks.... :)
Help me a lot. Thanks Again!
You are the man. This tutorial was great. You got me up and running. Thanks a million.
Very clear man.. and it work crystal clear.. Thanks!
thanxxxxxxxxxxxxx a lot
Thanks!
Worked great!
Great Doc thanks so much for your post it worked wonderfully. love the way you present step by step commands. I'm new in the ubuntu world and very scare some times with this of terminals buy with docs like this soon it all be conquered.
Thank you alot for this guide.. i don't know how long this is on the net, but i used it today on ubuntu natty and works perfectly... thank you
Very easy to follow and works great ... excellent writeup.
Thank you
THanks a ton for this article, the only problem i had was in the step to get php and mysql to work together, i couldnt find the specified line to edit =/
am vry glad to convey my regards to u..i am beginner to linux...this tutorial helped mi a lot to learn more abt installin things in linux...hope every beginner try this tutorial lik mi ..thank u so much :)
It works great! BUT indicate explicitly that with the command
sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin
you also install mysql extensions for PHP and Apache!
Cristal clear! You made it extremely simple. Many thanks to the authors of this article.
Crystal clear and works a treat - thank you.
Tutorial went great until editing the php.ini file.
There is no ;extension=mysql.so entry in the php.ini file.
Ubuntu 11.04
You find the ;extension = mysql.so by using the "extension" keyword in your search. just next,next,...
If you just searched the file for ";extension=mysql.so" you wouldn't have found it. There is a tab between the semi-colon and the word extension
I also have same problem in php.ini.edit
now its found,ok...
This tutorial helped me figure out what I did wrong with my LAMP installation. Thanks for a great, very helpful tutorial!
Great job for a first timer. Appreciate it much. All the best.
Very clear and useful - thx !
thanks you!!!!!!
It worked with no hitches!
please add 'mysql -u root -p' with the "-p" into this tutorial. When using the command 'mysql -u root' I get an access denied, you must use the '-p' so that the system prompts you for the root password in order to continue with the rest of the tutorial. Thanks.
Hi. I also have the same problem of mysql-u root giving me "ERROR 1045 (28000): Access denied for user 'root-p'@'localhost' (using password: NO)" even after I tried your suggestion of using "-p" it still gives me the same error". Help please
If you use
mysql -u root
and get an error regarding password then you probably already have a password set in which instance you should use
mysql -u root -p
which will then prompt for the password which you have already written down ;)
great, easy to follow. thanks
This appears to have worked perfectly. Thanks so much
Thanks man! Worked perfectly.
Very good guide, worked pretty well.
Sometimes I've completed with other sources for subjects like extension=mysql.so which was msql.so in my file.
And I had a little problem with phpmyadmin. The simlink was not created, just create it manually or copy the folder into /var/www.
Otherwise, it was excellent and very useful!
Followed instruction with full success! Thanks.
I preferred using Synaptic rather than apt-get.... so the mysql password has been asked me by a friendly setup window....
Great guide ! I Just followed the steps and everything worked immediately. Thanks taking the time to make this guide and for saving me a lot of time ;-)
In the past running windows and apache after installing phpmyadmin all i did was go to http://localhost/phpmyadmin, not this doesnt work in this case and am wondering how I can access phpmyadmin to make changes.
I am running ubuntu 11.10 if that is of any help.
Thanks Gavin,
Gavin,
Add
to the bottom of your
/etc/apache2/apache2.conf
file and restart the apache server
you will now be able to use
localhost/phpmyadmin
to access the program.
-Patrick
Thanks for the info Patrick!
I was having the same problem that Gavin was.
Thanks Patrick, that helps a great bunch.
also, after adding that line to the bottom of that file, apache needs to be restarted in order for phpmyadmin to show up in 'http://localhost/phpmyadmin'
for those who don't know, do the following
sudo /etc/init.d/apache2 restart
The following happens:
(gedit:3714): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.LBQG9V': No such file or directory
(gedit:3714): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory
(gedit:3714): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.EXJE9V': No such file or directory
(gedit:3714): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory
(gedit:3714): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.DLTS9V': No such file or directory
(gedit:3714): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory
I am a complete novice, so any answer please in easy speak just like the great instructions. I was able to follow easily but have this
could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for server name.
I have change the bind address to the ip addy i found on the network settings for this computer, what have I done wrong??
Thanks in advance
Des
you have made nothing wrong...this say that there is no dns server in your host.
You have no http://example.com adress..
That s not a problem, because you access to your site via http://localhost
AWesome tutorial. thanks alot !
install ubuntu server with lamp server then just add phpmyadmin package..
xampp like would be yours
Well it seems I got it all to work, thanks for the write-up.
Thanks a lot! Really easy guide to understand, this one goes right down to the hard drive archive.
Perfect! Thanks
Thanks for making a guide that is easy to understand and doesn't have unnecessary information riddled throughout! That is so hard to find. Keep up the good work!
In step 4, in the browser, when I type http://localhost/testphp.php, it shows me that it can't connect to the server, and it doesn't show the page of php.
Then, when installing mysql, in step 3, I have this error: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
I don know what to do, I followed the instructions one by one...
Thanks in advance.
Javier.
This error message means that you already set up a password for MySQL.
When you install MySQL in Ubuntu, it asks you to enter a password.(MySQL in the terminal window) If you entered a MySQL password at install, then you need to type this to log into MySQL:
mysql -u root -p
It will then ask you for the current MySQL password for the user "root"
If you entered a MySQL password at time of install, you can skip the step in this tutorial where it tells you to create a password.
After that is installed our next task is to get PHP to work with MySQL. To do this we will need to open a file entitled php.ini. To open it type the following:
gksudo gedit /etc/php5/apache2/php.ini
an easy way to lamp on ubuntu on a video
https://www.youtube.com/watch?v=YbdYXe-cTdY
I won't mind if anybody would like to explain to me how the following line leads to something that can't be configured and secured as adequately as stepping it all out as above here.
sudo apt-get install apache2 php5 libapache2-mod-php5 mysql-server libapache2-mod-auth-mysql php5-mysql
was just checking if much had changed since the last LAMP I set up....
$ sudo gedit /var/www/testphp.php
[sudo] password for kelly:
(gedit:4824): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.OIV7AW': No such file or directory
(gedit:4824): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory
gksudo gedit /etc/apache2/apache2.conf
(gksudo:4889): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",
$ sudo /etc/init.d/apache2 restart
apache2: Syntax error on line 232 of /etc/apache2/apache2.conf: Could not open configuration file /etc/phpmyadmin/apache.conf: No such file or directory
Action 'configtest' failed.
The Apache error log may have more information.
...fail!
I have no clue where to start! And the first two PHP and Apache installations are supposed to be easy! Oh no, I am scared! I must be an EXTREME newbie! Any help greatly appreciated!
Thanks!
Excellent guide .. was able to install LAMP on my Ubuntu 11.10 in 30 mins..
Gr8 Job..
Best Regards,
Shijesh
thanks for your guide - I could installed everything alright
I think it would be even more helpfull if you explain how to reach phpmyadmin
I used it before and after some thinking got to the configuration to be able to use it - I mean,
coping the content of /etc/phpmyadmin/apache.conf to /etc/apache2/httpd.conf
You could also say you get to phpmyadmin, not as an application but through the browser - I tried finding phpmyadmin application icon to run it! ;-(
Extraordinary.
I learned a lot from this tutorial.
thank you very much
Thanks a Lot ..!
The lamp-server set up now has the ;extension=mysql.so in the /etc/php5/apache2/conf.d/mysql.ini .
Wonderful tutorial
It was very helpful, 100% functional
Easy to understand, and I learn a lot with this
Thank you very much!!
Fantastic aide, have done this a fair few times now, always years apart and I always forget the coding, very simple and straightforward, keep up the good work...if you fancy doing a how to install j2ee on eclipse for linux anytime, let me know, I can never get it right! ;-)
http://ubuntuforums.org/showthread.php?t=859338
Don't forget to start with:
sudo apt-get update
Thanks for the tutorial!
If you get error when doing mysql -u root, do mysql -u root -p instead, it'll work.
The steps you put here worked flawlessly, except that the file in your instructions "mysql.so" is "msql.so" in php.ini . Perhaps it changed recently.
please say how to test the phpmyadmin that I have installed....
In order to phpmyadmin works, you need to copy it to www:
sudo cp -R /usr/share/phpmyadmin /var/www
so, you can use it typing: http://localhost/phpmyadmin at your prefered browser.
This really worked to get phpmyadmin working
Its really easy to install LAMP with ONE single command in ubuntu:
sudo apt-get install lamp-server^ phpmyadmin
Copy past, and you are set. All you need to do to get started is add
extension=mysql.so
to your /etc/php5/apache2/php.ini file
Yo
excellent thanks very much
I am trying to install LAMP on Ubuntu desktop 12.10 but when i go to follow your list using terminal its not finding anything in the locations to install, any help would be appreciated..
Did you run "sudo apt-get update"?
Your tutorial was the fastest, most comprehensive lesson I have ever seen and best of all...it actually worked FLAWLESSLY! You are the man!!! Thanks
I just have it done on Linux Mint Debian Testing,it also worked perfectly well
after adding the "cp" line suggested by Mauricio on 2012.10.08.
One difference was that "extension=mysql" was present in the .conf file as "extension=msql" .
Only details changed, as the presence of menus to edit the mysql password or to choose between apache and another server. Maybe because it seems this tuto was writen in 2007 and then these menus didn't exist yet.
Very useful, thanks a lot!
Thank you, very helpful. Everything came up and is working.
Thank You !!!!! You saved a lot of my time.....
Thank you for the exelent, simple and working guide
I have followed your instructions on installing LAMP. I did not follow
Install MySQL Nr 2 (Optional).
Now just restart Apache and you are all set!...........I got the following:
alex@alex-PC:~$ sudo /etc/init.d/apache2 restart
[sudo] password for alex:
* Restarting web server apache2 apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
... waiting apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
[ OK ]
alex@alex-PC:~$
Is this correct?
Kind Regards
Alex
Thank you very much for the excellent guide. It is my first look at Linux and LAMP and I will use its resources to publish my own (historical) information with the goodwill and free of charge that you have done.
Try adding -p at the end of it so it'll look like "mysql -u root -p", it will ask you for a password hopefully you remember it.
when I installed everything worked good but now when I want to login into phpmyadmin I get message like this #2002 Cannot log in to the MySQL server
please help
Nowdays to configure mysql you need just to type:
sudo apt-get install php5-mysql
and restart:sudo service apache2 restart
Don't know if you are allowed to link to other guides here or not but this one seemed to help as it had alot of screenshots, http://draalin.com/installing-lamp-on-ubuntu/
They had two different installation methods there too which was nice.
Awesome guide, easy to follow, very well done. Thank you very much!
straight forward guide, thanks.
I would like to mention thought that the line to link php to mysql is a little different. mine said extention=msql.so instead of extension.mysql=so. I am using ubuntu 13.04.
It works all the same.
thanks again. :)
This is a nice guide to install lamp, I have look @ this to recall all the process of the installation for lamp. THANKS!
I highly recommend
This guide is very easy to follow
Worked perfectly. Thanks for the tutorial!
Thank you so much. 2 thumbs up.
If this doesn't work
Try this:
$ mysql --user=root -p
Worked Great !!! Thanks!
Thanks for taking the time to create this for us. :)
thanks for this great job
Thank you, Sir (or Madam!). Far more helpful than some of the other guides I have used!
Thanx .... Best one yet i hav seen
Thank you. Very helpful.
I just found this on Google, it was one of the first pages, but it was a great guide, and helped a lot, it deserved to be one of the first pages. Thanks!
Awesome tutorial. Thank you! I would recommend including that after you run the set password on mysql that you have to either exit mysql in the terminal or restart the terminal. Other than that, flawless.
Thanks! But just change you're
to your
. This guide really helped!
* Restarting web server apache2 apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
... waiting apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
I got this to and resolved it by adding my local hostname to /etc/hosts. My hostname is qbuild1.somewhere.com and my ip address is 192.168.5.67, so I added this line:
192.168.5.67 qbuild1.somewhere.com qbuild1
Hi,
I thought this guide was terrific !! I use it every time I need to install LAMP. I also use the link to RESET PASSWORD page, which is also a good resource !
Thanks very much !!!
this is a process that i have gone through a hundred times but its always nice to have a well made walkthru to reference. a webserver in 30 minutes or less. thanks for the easy to follow step by step, it makes me look awesome in my bosses eyes. :)
Totally a stupid question. When you say "add your IP address" in the MySQL installation section, do you mean my local or public IP?
Wonderful tutorial,thumbs up
You say uncomment the line:
;extension=mysql.so
But when I went to edit the file, the line said
;extension=msql.so
So I couldn't find "mysql.so" I can't imagine why my installation had "msql.so" but I just uncommented it and changed it to "mysql.so"
Yea, It says the same here too. Instead of mysql.so, I have msql.so. So, I changed it to mysql.so, saved and exited.
I have just installed XAMPP as per your very clear instruction on UBUNTU 12.04
(The clearest instructions I have found so far)
After installing PHP and doing the RESTART I got the message; ... Waiting apache2: Could not reliably determine the server's fully qualified domain name, assuming 127.0.1.1 as server name.
I carried on and installed MySql and phpmyadmin as per the instructions, much the same
THEN when I wanted to test localhost/phpmyadmin I got :
NOT FOUND
The required URL /phpmyadmin was not found on the server
---------------------------------
APACHE/2.2.22(Ubuntu) Server at localhost Port 80
Please what must I do to get things working so that I can use my database
Are there settings I need to make to MySql?
and Where do I create a directory where I can place my PHP and HTML code so I can test via localhost.
Many thanks
Sib
I believe you made a typo. 127.0.0.1 is local host.
The localhost address on 127.n.n.n uses the netmask 255.0.0.0 so all addresses under 127 work. I often use 127.0.13.37 just for fun, works fine.
Thanks
Thanks ! it was usefull
Thank you! This was really easy and clear to follow. The only thing I can think of that might improve the instructions is a step to SAVE after changing extension=mysql.so
Nice guide. Is there a guide on how this can be used? I'm trying to get BugZilla working with LAMPP.
Thanks very much for this guide.
For step 3 of the mysql setup:
Instead of the command 'mysql -u root' it should be 'mysql -u root -p'
It will ask for the password, so just put in your password. If you dont' know it, try using your linux user account password or..
sudo -i
passwd
and punch in your new UNIX password
This is my first time installing LAMP on my ubuntu 12.04 (desktop) system so I couldn't think of anything that would alter step 3.
Hope this helps everyone.
Thanks. Was stuck there for a while :)
How would I be able to test and see if everything is working properly if I am using Ubuntu Server? I know that I can't open a web browser so how could I test this and see if everything is working properly?
An even quicker alternative is on the commandline: php -i
How do i check phpMyAdmin for managing the mySql db?
Can you please add below steps for phpmyadmin, as I had to do these in order to run phpmyadmin from browser
sudo gedit /etc/apache2/apache2.conf
add this line somewhere
Include /etc/phpmyadmin/apache.conf
and finally restart apache.
sudo /etc/init.d/apache2 restart
Hi,
I was unable to install the lampp. I followed all the steps but really i din know what was happening.. don know nothing is working. i don have any idea about what are the files have been installed. how i can remove all those files? I would like to reinstall once agian by following your steps.. Need help.......:-(
I just needed to put up a LAMP and this guide was the first I found.
Simple and good instructions! two problems I encountered, the () around the password did not work for resetting the sql database, and the reset for apache2 in the last string did not work. other than that, worked really good! Thank you!
I tried the tutorial and probably due to updated versions I have these corrections
The mysql apt-get will prompt me for a root password, thus you do not need that step.
Also, the "mysql -u root" cannot log you in, you must replace it with "mysql -u root -p" and then enter your pwd upon request.
Great post... I found it very easy to follow.
Hi,
firstly I would like to appreciate for a great step-by-step instruction on installing/setting up Apache, PHP and MySQL
thus, I had problem with PHP installation. after installing the PHP, I did exactly as said. made testphp.php and placed it in /var/www folder.
tried accessing it from http://localhost/testphp.php
BUT I got 404 Not Found !!!!
don't know what's wrong....
Wow, man. That was great a great article (and still would be if it was your hundredth). Great work!
now if I can only get mysql-server working...
Thanks for great work
It would be easier to:sudo apt-get install lamp-server^
The caret is important, this is a virtual package that includes Apache, Mysql and Php. Nonetheless, your testing instructions are very useful.
Hello
other tutos were unsuccesfull for me, yours is great and clear.
Thanks
I have this error ```The page isn't redirecting properly Firefox has detected that the server is redirecting the request for this address in a way that will never complete.``` when accessing to http://localhost/folder/
I have read the all instruction and succesfully instaled the lamp thanks for sharing these helpful tips.
usless men
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
Hello Folks,
I tried to get some solution for my error which is
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1.
Set the 'ServerName' directive globally to suppress this message.
the solution I got is edit some files like httpd.conf or fqdn & many more in /apache2 directory but NONE of these are presents.
can anyone provide me with full proof solution?
how can i solve this problem...
sudo: unable to change to sudoers gid: Operation not permitted
sudo: setresuid() [0, 0, 0] -> [119, -1, -1]: Operation not permitted
At the first step of installing PHP with the command sudo apt-get install php5 libapache2-mod-php5 it says:
E: Package 'php5' has no installation candidate
E: Package 'libapache2-mod-php5' has no installation candidate
Can anyone help me please?
Are you sure that you use Ubuntu 12 or older? If not, then use the tutorial version for the newer Ubuntu versions which can be found here: https://www.howtoforge.com/tutorial/install-apache-with-php-and-mysql-on-ubuntu-lamp/