LAMP stands for Linux, Apache, MySQL and PHP, all-in-one single package or bundle. LAMP is perfect for less experienced users and also for those who want to install everything in one go rather than install each component separately.
Since I’ve had experience using the WAMP package (in Windows) provided by ApacheFriends, here I will explain how to install their LAMP package in Ubuntu.
First you need to download their latest LAMP package from here. Make sure you keep the downloaded file on your desktop. Then open a new Terminal window (Applications -> Accessories -> Terminal) and enter the following commands. (The text in red should be changed to the exact name of the file you downloaded)
cd Desktop
sudo tar xvfz xampp-linux-1.6.8a.tar.gz -C /opt
Tha’s all. LAMP is now installed on your computer. All you need to do now is to start LAMP (this is to start the Apache server and MySQL). To do that execute the following command in Terminal:
sudo /opt/lampp/lampp start
You can test your installation by pointing your browser to http://localhost
Once you see the homepage, select English as your language and then you can check the installation status, phpInfo and documentations, etc.
Notes:
- Your root (admin) password for MySQL is left blank. It’s better if you set a password.
- Your php files and projects should be put inside the directory /opt/lampp/htdocs
- Login to phpMyAdmin from here: http://localhost/phpmyadmin/index.php
UPDATE (13-11-2008)
In order to make sure LAMP starts automatically everytime you start your computer, follow these steps.
First, execute this command in Termina:
sudo gedit /etc/init.d/rc.local
When Gedit opens, add the following line right at the bottom of the file (below the word “esac”)
sudo /opt/lampp/lampp start
Save the file and close it. Now you don’t have to start LAMP manually each time your start your computer.
[Reference: ApacheFriends]
Hey there,
I hit a snag with the setup, when I typed in the command to start the server I got a “command not found”.
I’m using the exact same distro of LAMP as you also running 8.10.
I restarted to see if it would start automatically, to no avail.
Have any idea what the problem may be?
Is there a way to get it to start when the machine turns on?
@Nick
You will get “command not found” if you typed like this:
sudo opt/lampp/lampp start
You forgot to put the slash before ‘opt’
Try: sudo /opt/lampp/lampp start
As for starting lampp when you start your computer, try this in Terminal:
sudo gedit /etc/init.d/rc.local
When Gedit opens, add the following line right at the bottom of the file (below the word “esac”)
sudo /opt/lampp/lampp start
Save the file and close it. Restart your computer and check if it works.
I hope that helped.
Cheers 🙂
@ nass
hey, thanks for the reply.
I did include the slash, I even tried without the slash just to see if it changed anything. Still, command not found.
I’ll try the auto start when I get to the machine later today.
Thanks for the awesome tutorial, it makes life a whole lot easier!
@nick
Did you extract the tar file to the /opt/ directory or a different one?
Go to MyComputer -> Filesystem -> Opt -> Lampp, and see if there’s a file called ‘lampp’ inside it.
Hey again, sorry it’s been a while.
The folder is there but there is no file named ‘lampp’ inside of it. There are many folders including modules, etc, phpmyadmin and so on…
I followed the instructions you gave exactly.
@nick
If you still have the tar.gz file you downloaded, repeat the process again. It will overwrite the existing files inside the Lampp folder.
Or you can extract the contents of the tar file to a temporary folder, and if the file ‘lampp’ is there, you can copy it to /opt/lampp/ and try again.
If the file is still not there, I think you have to download the tar file again. ( http://www.apachefriends.org/download.php?xampp-linux-1.6.8a.tar.gz )
Aha, just tried to do it again, noticed the following errors in the terminal :
gzip : stdin: unexpected end of file
tar : Unexpected EOF in archive
tar : error is not recoverable: exiting now
I’m re-downloading now…
And…… YOU ARE THE MAN!!
This tutorial is great. I installed LAMP (manually) on the previous version of ubuntu.. what a nightmare.
Thanks for the good work!
@nick
You’re welcome. I’m glad you finally managed to get it to work.
Oh boy 🙂
Yet another problem.
I am able to view the default files in the /opt/lampp/htdocs/ folder just fine.
At first I couldn’t paste any files in this folder so I did this in the terminal :
sudo chown -R myuser /opt/lampp/htdocs/
Then I could past files with no problem.
Now when I got to http://localhost/test_folder in my browser it simply says that it cannot find the files… they do not exist.
Am I placing the files in the correct folder? Have you any idea what I am doing wrong?
haha.. thanks for all the help man!
Great! Works like a charm.
All the info is now at localhost.
After playing with LAMP for 3+ years and having
zero success it now works.
Thank you for pointing me to XAMPP.
/°_°
Hi,
after downloading and tar i will test it.
start firefox and run http://localhost
i get a page with
It works!
nothing more
i think it is the index.html in /var/www
if i try
http://localhost/phpmyadmin/index.php
i get a
Not Found
The requested URL /test_folder was not found on this server.
Apache/2.2.9 (Ubuntu) PHP/5.2.6-2ubuntu4 with Suhosin-Patch Server at localhost Port 80
can you help ?
thanks a lot
Robert
oh sorry, not the test folder message
but this text
The requested URL /phpmyadmin/index.php was not found on this server.
Robert
yes, i have rename the /var/www/ to /var/wwwsav, restart my ubuntu and get :
The requested URL / was not found on this server.
Robert
ummmmmmmmm, i get this
XAMPP: Another web server daemon is already running.
XAMPP: Starting MySQL…
XAMPP: Starting ProFTPD…
XAMPP for Linux started.
still cant access the phpadmin though
@Nick Lewis
Put the files inside the following directory:
/opt/lampp/htdocs/xampp/
@Robert
You don’t have to rename that directory.
After you restarted did you start LAMP? If you didn’t, the page won’t load. I have updated the article shortly after your comment (see above), it will help you to automatically start LAMP when you start your computer.
Hope this helps.
Thanks! its working for me
Hi, I was wondering if anyone knew why I would get the error below, I ran sudo tar xvfz xampp-linux-1.6.8a.tar.gz -C /opt
and it looked like it was running fine until here:
lampp/var/mysql/test/testac.MYD
lampp/var/mysql/test/testac.frm
gzip: stdin: unexpected end of file
lampp/var/mysql/test/testai.frm
lampp/var/mysql/test/testag.frm
lampp/var/mysql/test/testag.MYI
lampp/var/mysql/test/testag.MYD
lampp/var/proftpd/
lampp/var/proftpd/proftpd.delay
lampp/var/run/
lampp/RELEASENOTES
tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now
When I try the command to start lampp:
tim@tim-desktop:~/Desktop$ sudo /opt/lampp/lampp start
sudo: /opt/lampp/lampp: command not found
I tried this with two versions of lampp. Can anyone point me in the right direction to getting this error fixed? Thanks,
Tim
… be carefull when securing your server…. as I have just found out it is extreamly easy to lock your self out of the admin
@tim
when you downloaded the file did you archive it by opening it? as this caused me problems in the past if so, re download and dont open the file just run it though terminal
Thanks for the tut… very clear and concise… worked like a charm!
NOTE: Beware of the instructions on the apache friends site, where it instructs you to log in as root.. use the sudo command as instructed in this tutorial, and in place of su in any other tutorial, else play at your own risk.
Thanks again!
I Installed the Xampp, and while i try to start the service it shows all the service asworking where as i try to load http://localhost/ it showing not found why?
Sorry,it get worked….the problem was iset mozilla firefox to work offline….
When i try to paste a folder in /opt/lampp/htdocs/xampp/ it cant able to copy why this is happening???please replay fast…..
I am confused about this install, I have used apache2 before and ran my own web server on this computer, but when I install this “xampp” install I cant’ find where the “apache2” file is or where I need to be able to host my own web page….what am I not understanding or where do I need to go look to get back up? thanks….by the way the install went as advertised and am happy with that, but am confused about getting my web site back up? thanks again
That was awesome. So very very easy.
Many thanks.
Hey when I try to type localhost/phpmyadmin/index.php it become a downloadable file Y? HElP
I installed Successfully! But I can’t access phpmyadmin.. What i’m gonna do noW??
Wat Just Clear your Browser Cache!! THANKS
short and fine!
good tutorial, helped me a lot!
Thx
sudo tasksel install lamp-server
is easier than this
[…] [Note: In this post I'll be showing how to install Apache, php, MySQL and phpMyAdmin (one by one) on Ubuntu 8.10 using Terminal. If you want to install them all at the same time with minimal fuss, I recommend you to read my post on installing LAMP.] […]
Things you mentioned made . Yet, consider this, let’s say you integrated a little bit more? I am talking about, I do not want to tell you how you can write ur blog, however what if you actually added more stuff which can easily get people’s attention? Just simply as a video clip or simply a image or few to have viewers interested concerning what youve got to say.
Very quickly this site will be famous among all blogging and site-building users, due to
it’s good posts
[…] [Note: In this post I'll be showing how to install Apache, php, MySQL and phpMyAdmin (one by one) on Ubuntu 8.10 using Terminal. If you want to install them all at the same time with minimal fuss, I recommend you to read my post on installing LAMP.] […]
Excellent way of telling, and fastidious piece of writing to take facts regarding my
presentation subject, which i am going to deliver in university.
[…] [Note: In this post I'll be showing how to install Apache, php, MySQL and phpMyAdmin (one by one) on Ubuntu 13.04 using Terminal. If you want to install them all at the same time with minimal fuss, I recommend you to read my post on installing LAMP.] […]
The program guaranteed results with exercise alone.
As the multi-million pound market in weight loss and further help
tone your legs and bottom. You will be minus likely to weight loss 90 cheat on a
lifestyle change in your entire life by staying healthy and fit.
Long term outcome goal A: Lose 50 pounds of fat in their
diets than the, typical proportion.
Wow, amazing blog layout! How long have you been blogging for?
you made blogging look easy. The overall look of your website is fantastic,
as well as the content!
Wonderful site. Plenty of helpful info here. I’m sending it to several friends ans additionally sharing
in delicious. And of course, thanks on your
sweat!
“sudo tar xvfz xampp-linux-1.6.8a.tar.gz -C /opt” in my terminal, it didn’t work out