Why install LAMP on your desktop computer?
Why would I want to install and set up a LAMP (Linux, Apache, MySQL, php) stack on Ubuntu 9.10? It’s useful if you want to set up a private web development environment. Perhaps you want to develop your own WordPress theme. If you are developing websites and experimenting, it’s nice to do it in the privacy of your own computer, rather than out on the public internet.
Install LAMP
The Ubuntu developers have created a very easy way to install a LAMP server on an existing system. It’s all kicked off with this one simple terminal command.
Note: Please make note of the caret (^) in the above command, it’s not a typo, it’s required to make the command work.
The apt package manager will show all the packages that need to be installed. Hit <Enter> to confirm that you want to install them.
You will then be prompted to change the password for the root user on the MySQL database.
Enter the password you want. You’ll be prompted to enter it a second time to confirm.
After you confirm your password, apt will continue to install the rest of the packages.
Congratulations, your LAMP installation is complete! That was the easy part, now you need to get things configured to make the system easy to work with.
Test Apache
Open a web browser and enter the address http://localhost/. You should see a web page that says “It Works!”
Testing php
Now that you know Apache works, it’s time to test the php installation. You’ll need to create a file in /var/www called testing.php. Open a terminal and enter:
Enter the following line into the text editor, save the file and exit.
Next, restart Apache with the following terminal command.
Now go back to your web browser and enter the address http://localhost/testing.php/. You should see a page displaying version information for your php installation.
Configuring MySQL
Since I’m installing LAMP for a web development environment, I want to bind the MySQL database to the localhost IP address. This should be 127.0.0.1 for your system. You can verify it with this terminal command.
You’ll now want to verify that the correct bind address is set up in the my.cnf file.
You should see a line that looks like
bind-address = 127.0.0.1
If the IP address doesn’t match the one for your system, you’ll need to edit the my.cnf file to correct it.
Install phpMyAdmin
You don’t need to install phpMyAdmin, but it’s a much easier way to get in and muck around with things in your MySQL database if you’re not familiar with the MySQL commands. You can install phpMyAdmin from the command line with
The installation will prompt you to select a web server for automatic configuration. Use the space bar on your keyboard to select apache2 and then hit <Enter>.
Another screen will come up asking if you want to configure a new database called dbconfig-common. Since this is a fresh installation, use the <Tab> key to select Yes and hit <Enter>.
You’ll be prompted next to enter the MySQL root password. Enter the MySQL root password that you created earlier, hit <Tab> to select Ok and hit <Enter>.
You’ll then be prompted to enter a MySQL application password for phpmyadmin. You can hit <Enter> and a random password will be generated. I chose to use the same password that I used for the root MySQL password. If you enter your own password, a password confirmation screen will come up. Confirm your password.
The phpMyAdmin installation is now complete.
Testing phpMyAdmin
Open your web browser and enter the address http://localhost/phpmyadmin/. You should see a page like this.
You can log in with the username root and the root password that you created earlier.
Congratulations, you’re now ready to start building your local website. If you’re only working on one site you can put all of the files into /var/www. If you’ll be working on multiple sites you may want to consider some additional Apache configuration to keep things neat and clean on you system.












Thanks for this post. http://localhost/phpmyadmin/. doesn’t get me the right page in the web browser. I think something is missing in my configuration. Is there a way to debug?
Are you getting a 404 error? Here’s the fix for that: http://tuxtweaks.com/2012/05/fixing-common-problems-with-lamp-on-ubuntu/
Does http://localhost/ take you to the right page showing “It works!”? If not, something might be wrong in your /etc/hosts file.
Terrific way to get it all happening. Thank you.
Thanks Sir….Really such a great guideline or totally straight forward. I successfully configure lamp server as well as phpmyadmin into my System and i m successfully able to do php task with this.
Thank you very much.
Have a nice day!
Straight forward and great tutorial
Excellent tutorial
Hi…
I’m a raw recruit in using Ubuntu … but this guidance was very helpful.
It’s written for Ubuntu 9.10 Karmic Koala, but it also works for Ubuntu 10.10 maverick.
Thanks a lot!
Kind regards Matse
Hi I have recently installed ubuntu and wanted to have local host server, I have installed success fully but when i am at this stage for Testing phpMyAdmin, it is displaying “Not Found
The requested URL /phpmyadmin/ was not found on this server.
Apache/2.2.16 (Ubuntu) Server at localhost Port 80”
I am not sure every thing was succesful but displaying errors any help please
The directions in this comment should help: http://tuxtweaks.com/2010/04/installing-lamp-on-ubuntu-10-04-lucid-lynx/comment-page-1/#comment-2952
After fretting 24 hours over having installed LAMP from Ubuntu’s Synaptic PM “by task” selection and installing PhPMyAdmin separately only to find out later that my PMA p/w didn’t work and that I couldn’t uninstall LAMP “by task” from Synaptic (’cause you can’t untick the LAMP checkbox in Synaptic), I came across your page here. To make a long story short, I finally got it all straightened out. Thanks Linerd (luv it)–you rock!
Thanks ,
how to restart total lampp
how to set automatically start lammp when i starting machine.
Many thanks. Thanks to you I’m up and running 🙂
Excellent straight forward tutorial. Now I just need to figure out how to create my website from an existing copy. Tried it with a previous installation and couldn’t access any of the folders on the website.
THAAAAAAAAAAAAAAAAANKS for the tutorials!!!!
My LAMP and myphpadmin works!!
Now I can dump Windows.
Thanks very much for tutorial, but … where (in which folder) I should copy and extract lamp archive …
I have now lamp in a folder in Documents and nothing happend:
lenny@lenny-Ub:~$ sudo apt-get install lamp-server^
[sudo] password for lenny:
Leyendo lista de paquetes… Hecho
Creando árbol de dependencias
Leyendo la información de estado… Hecho
0 actualizados, 0 se instalarán, 0 para eliminar y 0 no actualizados.
E: No se pudo encontrar la tarea lamp-server
Thanks for the great guide, use it on all my developer installs….setup is nice and easy, again thanks alot!!!!!!
I got this error message at the ‘Testing PHP’ phase:
“Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName”
Found a fix for it here:
http://mohamedaslam.com/how-to-fix-apache-could-not-reliably-determine-the-servers-fully-qualified-domain-name-using-127011-for-servername-error-on-ubuntu/
You can also find the solution at the end of this post: http://tuxtweaks.com/2009/07/how-to-configure-apache-linux/
What a great tutorial…I was using xampp and once i got mysql login, several times re-installed. finally i decided to do away with xampp, this tutorial is a big help.I book marked it.
Kudos…
Nice post. but if I want to install php 5.2.10 on my fedora server then whats the way out ?
Thanks, this was a great help.
I struggled with this over a week and only after reading this, did I get my problem solved
Great tutorial…………. was configure lamp in a single go!!
thankx
Thanks. Worked like a charm.
it’s a great tutorial.
Thanks so much, it is a pleasure working with clear and concise tutorials such as this.
Dick
sorry people the above correction worked, just forgot to restart apache!
silly me
Doogie
installed phpmyadmin but get 404 file not found error any help welcome!
Doogie
Nice post,but for getting phpmyadmin to work i need to follow the post give below anyway thanks for the correction nice post dude…its simply superb…
very helpful thanks!! But how can I restart lamp after shut down?
The installation process creates startup scripts in /etc/init.d. LAMP starts automatically when you boot your computer.
thanks!!
This worked for me … except for the phpmyadmin part. I added a line at the end of /etc/apache2/apache2.conf:
Include /etc/phpmyadmin/apache.conf
then everything worked perfectly.
Thank you for a wonderful tutorial. This is the simplest and fastest way to add LAMP and Phpmyadmin.
how to work with lamp?
because newbie
i have project but in win**** and I want to work in ubuntu
thanks to answer
please answer to my email
Thank you great… tutorial.. i could install without any hiccup.. only phymyadmin..gave trouble… anyway it is extra..
I also just installed LAMP using this great guide. Thank you!
However, I also had problem with http://localhost/phpmyadmin/ not working.
I solved this by changing the Apache configuration file slightly. First open it by entering this in a terminal window:
sudo gedit /etc/apache2/apache2.conf
Then add the following line at the end of the file:
Include /etc/phpmyadmin/apache.conf
Then save it, close it, and restart Apache from the terminal window by writing:
sudo /etc/init.d/apache2 restart
Then phpMyAdmin also worked for me.
This information I got from a more detailed installation guide in Danish (http://jesperjarlskov.dk/blog/lamp-linux-apache-mysql-php-pa-dit-ubuntu-desktop/).
thanks for the correction. It works for me after i read ur correction and applied it.
Great tutorial indeed.
I just used it to install LAMP on my notebook running ubuntu 10.04 and i had no problems at all.
Pingback: Installing Apache, PHP and MySQL | Anshu Verma
Thanks for this perfect set of instructions!
It all worked at once. I’m impressed!
John
Thanks! This made it so easy!
Pingback: Install Habari on Ubuntu 9.10 | Openswitch
Thanks for this page! It’s the easiest tutorial I found on LAMP configuration for Ubuntu yet!
everything seemed to work until the PHPmy admin scrren whichnever showed up
How can I install mod_rewrite on this server?
I got this from the Linux Mint support chat.
sudo a2enmode rewrite
sudo /etc/init.d/apache2 restart
apache2ctl -M
last command shows mod_rewrite enabled.
Yipee!!
the first command is sudo a2enmodule rewrite.
Sorry about typo.
Damn, I typed
sudo a2enmod rewrite
in terminal to get it all going.
I ran into a problem when installing on another machine with similar system.
It is running Mint Helena Gnome x64, an Ubuntu clone.
It threw some errors during installation.
Tested Apache and it works, then tested PHP and got this:
Fatal error: Call to undefined function phinfo() in /var/www/testing.php on line 1
Tried to reinstall from command line but that didn’t help.
Before you ask, I did restart apache2, even the whole machine.
So, php did not install correctly, how can I fix, please?
The funny thing is that these instructions worked fine on my netbook which is running Mint Helena Gnome 32-bit.
Sorry, sorry, sorry, I cannot stop flogging me.
There was a typo in the file, the function is phpinfo(), not phinfo().
:-(((
Thanks for sharing your experience. Perhaps your comment will help someone in the future.
Thanks for this – just what I needed! Fairly new to Linux environment (using Ubuntu 9.10 and LOVING it!) so all these terminal commands mean nothing to me – coming from years of Windows/DOS.
All running as hoped – agin thanks for taking the time to make this so easy!!
i am very thankful for this tutorial. i need a tool to develop websites in ubuntu koala. any advice?
Screem HTML Editor
Bluefish
the firefox developer extensions
Code Igniter or Kohana
NetBeans
symfony
Eclipse
Come back in a couple years when you are finished with those.
Pingback: Access Your Web Server From a VirtualBox Guest OS | Tux Tweaks
Excellent tutorial. Very easy to follow and the pics helped alot. Thanks heaps.
Thanks for your tutorial. It really help me.
I want ask you about LAMP:
Can we set the LAMP for accessing the site that we create not only placed at /var/www but also a specific folder that we want (e.g. folder LearningPHP at documents) ?
Yes, you can do that. See my post on How To Configure Apache.
i have an error in the downloading of phpmyadmin, i type sudo apt-get install libapache2-mod-auth-mysql phpmyadmin, and i get “can’t find package phpmyadmin” what can i do? i use 9.10 karmic koala spanish thanks for your help
Thanks for the excellent tutorial. It worked flawlessly.
Pingback: Installing Apache on Ubuntu 9.10 | The Linux Experiment
Felicidades, grande por su aporte
Can you post how to get WordPress and Joomla up and running on this ?
I’d appreciate it very much.
Found the wordpress one, just had to go hunting
If after you install you get a 404 not found error do this;
First type the following command to open up this file:
[term]gksudo gedit /etc/apache2/apache2.conf[/term]
Add the following line of code inside apache2.conf:
[term]Include /etc/phpmyadmin/apache.conf[/term]
Now restart Apache:
[term]sudo /etc/init.d/apache2 restart[/term]
Point your browser to: http://domain/phpmyadmin, you should be able to see the phpMyAdmin landing page now!
This should have been configured during installation. If you are getting the 404 error on phpMyAdmin you should run
[term]sudo dpkg-reconfigure phpmyadmin[/term]
use the space bar to mark the box next to Apache and then hit <Enter> to complete the configuration.
Then run
[term]sudo /etc/init.d/apache2 reload[/term]
You should be able to use phpMyAdmin now.
Sorry but no.
Went through all the steps you mention and still stuck on the 404.
The first method did work.
I had the same problem. Saphid is right. His fix works like a charm.
Hi all,
The first method works pretty. But I had tried all other ways BEFORE i went for that. For the record I first purged the old mysql installation from my machine, then installed a new one, and then reinstalled and and reconfigured the phpmyadmin. even tried reloading the configuration files on apache. But this including the config. file manually really did my job.
Thanks for posts people.
Aniket,
Developer@ View6
Pingback: Phew … « Something …
I’ve seen that using this line gksudo gedit /var/www/testing.php i can creat/access a file from www folder. But how can I delete one? Or how can i get to this folder. I mean in windows it is easy: you click 2-3 times and you are in the www folder of easyphp ans you can do whatever you want there. but in ubuntu it is different.
You can remove a file from the /var/www folder with this command:
[term]sudo rm /var/www/filename[/term]
You can also add and remove files using the file manager, but you’ll need proper permissions for that. The /var/www folder is set up to be writable by the www-data group. To add your userID to that group, use:
[term]sudo adduser yourid www-data[/term]
You might have to log out and log back in to make the group change take effect. You should then be able to manage the files in that folder from the file manager.
Where do I get my id from? 😀
It’s the same that you use to log into the system. Your terminal prompt is probably something like yourid@hostname. You can also find out you ID with the following terminal command:
[term]whoami[/term]
I did it. I added my user to that group. After that, I restarted my PC and when I accesed first time the root folder it let me to get in. So I went to www folder and I tried to delete a few files to create my own website after and it didn’t let me to do it. I went out of the File Browser and when i tried to access root folder again it told me that i do not have permissions to open it.
sorry, i haven’t seen the last comment. i fixed it. it works now. sorry 😀
I’ve followed all steps until “Testing phpMyAdmin”. When I open in browser “http://localhost/phpmyadmin/” it tells me “The requested URL /phpmyadmin/ was not found on this server.”.
Thank you for a great guide. It works perfect for me!
at the last step i got this error
Not Found
The requested URL /phpmyadmin/ was not found on this server.
Apache/2.2.12 (Ubuntu) Server at localhost Port 80
Try the tip shown in this comment: http://tuxtweaks.com/2009/10/install-lamp-on-ubuntu-9-10-karmic-koala/comment-page-1/#comment-1372
i got the 404 not found at the last step
I have a problem with installing the lamp server.
everytime I type: sudo apt-get install lamp-server
I get this response:
[term]Pakketlijsten worden ingelezen… Klaar
Boom van vereisten wordt opgebouwd
De status informatie wordt gelezen… Klaar
0 pakketten opgewaardeerd, 0 pakketten nieuw geïnstalleerd, 0 te verwijderen en 0 niet opgewaardeerd.
E: Kon taak lamp-server niet vinden[/term]
Translated:
[term]Reading packagelist… Done
Tree of neceseryties is build
The status information is being read… Done
0 packages upgrade, 0 package installed, 0 to be deleted and 0 not upgrade.
E:coulden’t find task lamp-server.[/term]
Does anyone know what I did wrong, or went rong?
PS: Sorry for my bad english, I don’t know if the translating is correct, I don’t have the english version my self.
Balco, you forgot to include the carat at the end of the command. The correct command is
[term]sudo apt-get install lamp-server^[/term]
Thanks for this tutorial. Really helped me get going with an early morning project!
This is by far the most well developed tutorial for installing LAMP on Ubuntu 9.10. Thank you for making this process clear for a new Linux convert. Once my sight is up and running I will definitely add your link!
Thanks again.
Thank you, Linerd, for your very much appreciated help!
In my discovery of this entirely world new to me, you are undoubtedly a very bright light in the dark, and one sentence sums it all: it works!!!
This was the best ‘how to’ that i’ve come across in a long time.
Thank you.
Can someone confirm that this guide works with the non-server version of Ubuntu 9.10?
This indeed is a guide for installing LAMP on Ubuntu Desktop. It should work on a server install as well, but I haven’t tried it.
Hey, I got it to work. I used
sudo gedit /etc/apache2/apache2.conf
to insert the below code into apache2.conf – at bottom of page.
Include /etc/phpmyadmin/apache.conf
Tut source: http://tolearnfree.blogspot.com/2009/11/how-to-install-apache2-php5-mysql-and.html
then I used your restart apache command, Linerd
sudo /etc/init.d/apache2 restart
Thanks for a superb tut here and thanks also to Mike Kenzie, collector of vintage computers
http://www.ncf.ca/~ba600
You are real life savers 😀 Are you in Twitter Linerd?
Thanks Leslie. Your advice got me out of a bind configuring phpmyadmin in 9.10.
I started like you mentioned but is one problem
* Starting 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
[fail]
invoke-rc.d: initscript apache2, action “start” failed.
can you help me
Pingback: How To Uninstall LAMP in Ubuntu 9.10 Karmic Koala | Tux Tweaks
That is a great tut – so clear and easy to follow. With my system, everything worked except the last step. http://localhost/phpmyadmin/ which gives 404 Not Found. What did I do wrong?
Leslie – Did you remember to select “apache2” during the phpMyAdmin configuration like in the picture? Use the Tab key to go to that field and use the Space bar to select it. You can re-run the phpMyAdmin configuration with:
Thanks for answering 🙂 Yes, I did do that. I even tried the purge and (re)install (to Kirsten above) in case I had missed something. I still get the same result.
Should I email you? This could go on awhile – I’ve talked to a couple of others on this already and we are getting nowhere! I really hope you can help :S
Honestly, I have no idea what you might have done wrong. The process has gone smoothly for me every time I’ve run it. If you want to start over with the install, I just wrote a post on how to uninstall LAMP in Ubuntu. This will purge all of the web server information from your system so you can start fresh.
Good luck.
Leslie – Take a look at my recent reply to Kirsten. It may provide some help.
Thanks. I got it working, and meant to put my reply here, but instead I have put it as a new comment! Sorry about that. My listing of /etc/apache2/conf.d/ is quite different to yours.
OK, now that I’ve installed it. How do I uninstall or remove this lamp-server? It seems everyone is talking about installing it, but I’m not comfortable if I don’t know what it installed in my system, I think there are 10-20 packages, how do I remove all of them? Is there a command, a GUI, how do you do it?
I’ve written a new tutorial on How To Remove LAMP in Ubuntu.
I, too, am on the lookout for CLI removal of LAMP in Ubuntu 9.10. Any thoughts or suggestions?
(Thanks, btw, for the guide/tutorial!!)
@Greg- You should be able to do i with something like
I’m not sure of the actual package names, I’m away from my Linux box right now. I’ll take a look at it and post an update. After removing the main packages, you can then clean up the rest with
You can also use aptitude instead of apt-get for the first command and the autoremove will be done automatically.
Greg – I figured it out. Take a look at: How To Remove LAMP in Ubuntu.
Hi! I’ve been looking at several guides for installing wordpress in ubuntu and yours is really the most in-depth that I’ve come across, but I’m having some significant problems in configuring phpmyadmin. Yes, I did check the apache2 box with my spacebar, I promise.
I get
error 1045 (28000): Access denied for user ‘root@localhost’
at the completion of the reconfigure. I’m wondering if the error could have it’s roots in mysql name/password or if I’ve done something especially silly.
Also, I have tried this:
Edit /etc/apache2/apache2.conf and add the following lines to the end of the file
#for phpmyadmin
Include /etc/phpmyadmin/apache.conf
and when I do the apache2 restart fails, if this additional info is helpful at all. Any comments at all would be appreciated.
@Kirsten – If the phpmyadmin configuration is successful, then the lines you’ve added to /etc/apache2/apache2.conf are not required and may cause a conflict, so go ahead and undo that change. That may take care of the problem with Apache starting.
I sounds like something may have gone wrong with the phpmyadmin installation. I would try removing it and reinstalling it along with the Apache mod-auth module. Remove it with
and reinstall it with
It should take you through the phpmyadmin configuration again.
If your hunch is correct about your MySQL root password, you can reset it by running
Good Luck!
I was finally able to get through the phpmyadmin install without errors, by following the reinstall steps above. Thank-you. Unfortunately I still don’t get anything at http://localhost/phpmyadmin/ not even a 404. Alas. Still, I appreciate your help.
So you’re able to access the other http://localhost/ sites?
Leslie’s comments below indicate you’re not alone. You might want to try completely removing LAMP and try again from the beginning.
Before you do that, you may want to check your /etc/apache2/apache2.conf file and make sure you didn’t remove too much. the end of my file looks like this:
Also, my listing of /etc/apache2/conf.d/ is this:
This page might be of some help: https://help.ubuntu.com/community/ApacheMySQLPHP
Thank-you Linerd, uninstalling and starting from scratch did it. You’re instructions are incredibly helpful!
Super clear guide, set up with no problems.
Another Question:
How do I copy paste wordpress files or Joomla files to folder www like I was used to do in windows?.
I’m unable to paste the files by using “copy paste click”.
Great guideline. Especially for the first comment :). thx
Thank you for your time in creating this excellent tutorial, I just followed your tutorial and my machine now has LAMP installed successfully. Thank You again.
Thanks for the tutorial, I’m trying to switch over to Ubuntu as a web developer and was a little disappointed there wasn’t a simple solution like MAMP on the mac. However, this tutorial helped out immensely. Unfortunately, I am running into one problem. I’ve gotten to the end of the tutorial, everything seems to work, but when i try to login to phpmyadmin nothing happens. I enter root as the user and my password, the page reloads and nothing. I don’t see the phpmyadmin controls nor do i see any error. Help?? Thanks again.
How to uninstall the LAMP just with one command?
One time I tried to uninstall the LAMP with sudo apt-get remove lamp-server^ and the result is that I lost connecting the VPS Server after restarting it.
this force me to hell?
relaxssl – Check out: How To Remove LAMP in Ubuntu.
thanks for the post, it is very simple and straight forward
great
And of course you are all aware that all of this will *only* work when networking is enabled after you log in to the desktop?
Excellent Tutorial !!
Thanks !!!!!!!!
I also met the same problem with the max, but after I tried the way of solutions that the two finally succeeded. thank you for your help …
Linerd:
As a medical educator and computer hobbiest new to Linux I want you to know this tutorial is SUPERB. It is well documented, straight to the point, but comprehensive enough for a ubuntu newbie to follow. I too, DID NOT, use the spacebar to “tag” apache2 and of course got the dreaded 404 upon trying to start phpmyadmin. I followed your fix to reconfigure phpmyadmin and it worked flawlessly. I am particularly enthused with the command lines as I use them as learning tools to further understand manipulation of ubuntu. I am still struggling with installing wifi and my magicolor 3100 network printer. If I can accomplish those tasks I would only use XP for developement of Adobe Creative Suite programs. Again thank you very much and if you know of any really good methods to install wifi and the network printer I would be eternally grateful.
Dr. Snyder
i am fine now. thanks a lot for the
tutorial… it was great… 🙂
i followed comment #33 above
uninstalled and reinstalled phpmyadmin
but i still got the same 404 error
on my browser.
i thinks i screwed it up somewhere
during LAMP installation followed
by phpmyadmin. i just can not
fix it 🙁
@bobot – If you’re using Firefox, make sure to clear the browser cache. I can’t tell you how many times I’ve chased my tail because of that. Once FF gets a 404 error, it doesn’t really try to load the page again unless you force the issue. Sometimes even clicking “reload” a few times will get a page to load.
The only other thing I can think of is the phpmyadmin configuration. If you do
sudo dpkg-reconfigure phpmyadmin, make sure you mark “apache2” like in this picture.i sure did and after removing the said lines
from /etc/apache2/apache2.conf i got the
following on my terminal as a result:
eufemio@bagnot:~$ sudo /etc/init.d/apache2 restart
* Restarting web server apache2
… waiting [ OK ]
eufemio@bagnot:~$
but when i got back to my browser and type:
http://localhost/phpmyadmin/
i still can not get my phpmyadmin interface going
that is, i got the famous 404 error.
perhaps i will try uninstalling phpmyadmin
and install it again and hope to get it going
by then.
you really are a big help and thanks a lot. 🙂
Thank you.
i think you really got it right. i remember updating
my system the day before. i followed your instructions
and the problem on “fully qualified domain name”
is gone but when trying to restart apache2 again
i got the following:
eufemio@bagnot:~$ sudo /etc/init.d/apache2 restart
* Restarting web oapache2 [Sun Dec 13 11:07:59 2009] [warn] The Alias directive in /etc/phpmyadmin/apache.conf at line 3 will probably never match because it overlaps an earlier Alias.
… waiting [Sun Dec 13 11:08:00 2009] [warn] The Alias directive in /etc/phpmyadmin/apache.conf at line 3 will probably never match because it overlaps an earlier Alias.
[ OK ]
eufemio@bagnot:~$
the line 3 of my /etc/phpmyadmin/apache.conf contains the
following: Alias /phpmyadmin /usr/share/phpmyadmin
i dont know if my problem is trivial. i am quite new
to ubuntu linux.
thanks for your help… 🙂
@bobot – I think I have it figured out. Did you perhaps follow the tip in the comments above to add lines to
/etc/apache2/apache2.conf? (Comment #5 above.) That step is a patch for systems where you forgot to select apache2 during the phpmyadmin configuration. I just added those lines now and restarted Apache and got the same error.Edit /etc/apache2/apache2.conf (
sudo gedit /etc/apache2/apache2.conf) and remove the lines#for phpmyadminInclude /etc/phpmyadmin/apache.conf
Then restart apache with
sudo /etc/init.d/apache2 restartand you should be good to go.
btw, i got my LAMP ok. I suppose because
when i get to my browser and type:
http://localhost/testing.php
it works fine.
it also work just fine with:
http://localhost/
hope you can find a fix to my problem.
i followed the tutorials and the suggestions. For a while, more precisely,
right after the installation, I had phpmyadmin running but when i
got back to it a couple of days after, it fails.
i got the following when trying to restart apache:
eufemio@bagnot:~$ sudo /etc/init.d/apache2 restart * Restarting web server apache2 [Sat Dec 12 17:00:12 2009] [warn] The Alias directive in /etc/phpmyadmin/apache.conf at line 3 will probably never match because it overlaps an earlier Alias.apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
... waiting [Sat Dec 12 17:00:13 2009] [warn] The Alias directive in /etc/phpmyadmin/apache.conf at line 3 will probably never match because it overlaps an earlier Alias.
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
i also had tried:
sudo dpkg-reconfigure phpmyadminbut to no avail.do you think you can help me? thanks
@bobot – Line 3 of my /etc/phpmyadmin/apache.conf is
Alias /phpmyadmin /usr/share/phpmyadminDoes yours match that?
To fix the “fully qualified domain name” error, issue this command:
echo "ServerName localhost" | sudo tee /etc/apache2/conf.d/fqdnthen reload the sites with
/etc/init.d/apache2 reloadOne more thought: perhaps a system update has broken phpmyadmin. Have you tried reinstalling it? I’d try completely removing it first.
sudo apt-get purge phpmyadminthen reinstall with
sudo apt-get install phpmyadminBeautiful! I was working to set up WordPress locally, and was fairly successful at screwing the install up. This was a BIG help, thanks for the effort to post this!
Works nicely thanks.
Excellent tutorial! Thank you!
Up and running. Thanks for this great tutorial.
Thank you for a wonderful tutorial! The comment about symbolic for fixing the phpMyAdmin 404 error was also spot on.
The tutorial on installation of LAMP in Ubuntu 9.10 is excellence. Even a novice can install the LAMP in linux without any hitch.
Thanks a lot.
When I FTP into the server, I cannot copy files to /var/www. How do I put my webpages onto the server without being root (which does not have a password)?
thebigfatgeek – Not sure what you mean. The tutorial is showing how to install a LAMP stack on your own machine. You need root (or sudo) access to perform the installation. If you can do that, then you can certainly FTP in as root as well. One option would be to log in to the server and set up Apache to read files from your home directory. Then you can place your files somewhere inside your $HOME.
I install LAMP on Ubuntu 9.10 and the only issue I had with the above tutorial was wiht PHPmyAdmin that was not working. There is on step missing after the install:
sudo ln -s /usr/share/phpmyadmin/ /var/www/phpmyadmin
that copy your phpMyAdmin file onto your root directory.
Helene – You need to make sure you select apache2 during the phpmyadmin configuration. If you forget to do that during the installation, you can do it afterwards by running
sudo dpkg-reconfigure phpmyadminPhpmyadmin also didn’t work at my first try. I forgot to select apache2 during the setup. I removed purged the two packages that were installed (sudo apt-get remove –purge …) and installed them again. I made sure I selected apache2 by hitting the spacebar and ever that phpmyadmin worked like a charm.
Great guide. Thanks!
Jelle – Glad you got it working. I think you could have avoided the reinstall by just reconfiguring phpmyadmin with
sudo dpkg-reconfigure phpmyadminThanks a ton for the simple installation instructions. 🙂
i think you need to edit aphace.conf first in order to get connect with phpmyadmin:
sudo vi /etc/apache2/apache2.conf
add this line and save:
Include /etc/phpmyadmin/apache.conf
Best. LAMP Setup. Tutorial. Ever.
Thanks
Excellent tutorial. Please make sure that you specify that to start the install from terminal there should be a caret (^) at the end.
I assumed it was a mistake and almost didnt type it in. For newbies like me, it is important to stress that people who write tutorials are doing us a favor. A little more hand holding and we will acquire the confidence to give ms windows the boot…thx
Aveesh – Thanks for the feedback. I’ve updated the post per your comment.
just wanted to say, great post. very helpful and doing a fresh install of “karmic koala” on my laptop after wiping the drive clean and finally getting rid of Windows XP… well, it’s awesome!
so, installing a new incarnation of LAMP was great. now i just need to redirect to my /home/public_html directory and i’m good to go!
randomguru – Thanks for the comment. You should find my post on configuring apache helpful in redirecting to /home/userid/public_html.
Wow, awesome tutorial 🙂 and coment about sybolic link helped a lot 🙂 Thanks!
Thanks for the great guide – worked flawlessly for me
The correct command uses a caret (“^”) at the end of the command. This is allows apt-get to call a task.
So apparently, this should work:
sudo apt-get install lamp-server^
or
sudo tasksel install lamp-server
That is really user-unfriendly. It’s an obscure trivial addition to apt-get, and isn’t even documented in the apt-get man page.
For more information, see Ubuntu Apache, MySQL, php
‘lamp-server’ doesn’t seem to be a valid Ubuntu package. See http://packages.ubuntu.com/search?keywords=lamp-server&searchon=names&suite=karmic§ion=all
The package ‘lamp-server’ doesn’t exist for me at all.
me@hosta:~$ sudo apt-get install lamp-server
[sudo] password for stefanl:
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Couldn’t find package lamp-server
me@hosta:~$ apt-cache search lamp-server
me@hosta:~$
me@hosta:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 9.10
Release: 9.10
Codename: karmic
Thank you for the very useful tutorial. It’s nice to have all the steps to test things after you install them, so there are no surprises later on.
I had the same problem as Max.
The first solution to add a symbolic link worked for me.
First of all, thanks for a wonderful guide.
I’m new to Linux and Ubuntu, and I recently had to purge my HD because of confusedly misfollowing other instructions for installing LAMP. However, your straightforward and easy to follow guide has allowed me to get it going.
Problem is: phpmyadmin won’t work. I installed it as per your instructions and it looked like it was going well and everything, BUT when I try http://localhost/phpmyadmin/ it just gives me a big old “404 Not Found” screen. If you can think of any tips or advice, I would be very grateful.
Edit – See the first comment above.
Max – I did a similar tutorial for installing LAMP in Jaunty. Some of the comments listed on that post have some suggestions for your problem. There have been 2 potential solutions posted.
1. Make a symbolic link from /usr/share/phpmyadmin to /var/www.
sudo ln -s /usr/share/phpmyadmin /var/www
2. Edit /etc/apache2/apache2.conf and add the following lines to the end of the file
#for phpmyadmin
Include /etc/phpmyadmin/apache.conf
Then, restart Apache with
sudo /etc/init.d/apache2 restart
Let me know if one of these solutions works for you.
Pingback: fsdaily.com
This is important!
If you get a 404 Error when testing phpmyadmin, then you probably forgot to select apache2 during the phpmyadmin configuration. Re-run the configuration with
[term]
sudo dpkg-reconfigure phpmyadmin[/term]Make sure to use the Space Bar to select apache2, (it will show a [*] next to it if it’s selected).
Pingback: Installing LAMP on Ubuntu Jaunty (9.04) | Tux Tweaks