PDA

View Full Version : HOWTO: Setup easy web development environment (XAMPP)



Pages : 1 [2]

PaulWhipp
April 20th, 2009, 02:14 AM
Hi billyg,

AFAIK apache2triad is a windows product that does much the same thing as XAMPP so you can't install it in Linux.

Perhaps you could try XAMPP instead.

ReyPeste
April 25th, 2009, 05:31 AM
I am having this problem with permissions (I create the symlinks but when I point the browser to http://localhost/mysite I get a 403 error).

I was using XAMPP on since Intrepid without problems (I did change the permissions to enable "others" to read the folders and files as explained).

But now I just did a clean install of Jaunty. I reinstalled XAMPP the same as before, but it won't read anything that is not directly saved on /opt/lampp/htdocs and owned by root... any ideas?? has anything changed?
Any suggestions will be dearly appreciated.

PaulWhipp
April 25th, 2009, 06:25 AM
Check and if necessary change the ownder of /opt/lampp/htdocs to be 'nobody' and ensure that any links in that folder or subfolders are readable and executable by anyone.

That's my best guess - I'm still on 8.10 Intrepid and wont be upgrading to 9.04 Jaunty for a few weeks yet.

ReyPeste
April 25th, 2009, 05:40 PM
Yes thanks for you reply, I checked both things. I am not sure the problem is in the files permissions anymore. If I write the full path to the files, using the symlink 'mysite' to point to the folder with my web pages, it works:

file:///opt/lampp/htdocs/mysite/index.html
But if I try to use localhost

http://localhost/mysite/index.html
it gives me the 403 forbidden access message.

I checked /opt/lampp/etc/httpd.conf and I have these settings


<Directory "/opt/lampp/htdocs">
Options Indexes FollowSymLinks ExecCGI Includes
AllowOverride All
Order allow,deny
Allow from all
</Directory>


Permissions of source and target directories
Link in /opt/lampp/htdocs

lrwxrwxrwx 1 root root 47 2009-04-24 23:52 sistemas -> /home/robert/Documents/trabajo/sistem

Target folder /home/robert/Documents/trabajo/sistem

drwxr-xr-x 7 robert robert 4096 2009-04-24 22:54 .
drwx-----x 9 robert robert 4096 2009-04-24 22:57 ..
drwxr-xr-x 12 robert robert 4096 2009-04-14 22:43 biblio_docs
drwxr-xr-x 2 robert robert 4096 2009-04-14 16:18 documentos
-rwxr-xr-x 1 robert robert 1150 2009-03-31 14:47 favicon.ico
drwxr-xr-x 2 robert robert 4096 2009-04-14 18:56 graficos
-rwxr-xr-x 1 robert robert 3003 2009-03-31 16:24 index.html
-rwxr-xr-x 1 robert robert 3092 2009-04-14 17:32 sistem.css

As I am not an expert on any of this, I really don't know where else to look.
Maybe somebody else is having this issue using XAMPP in Jaunty?

RachedTN
April 27th, 2009, 05:14 PM
Really amazing explanation
I think that we should add a thanks button to the forum :)

ReyPeste
April 28th, 2009, 09:26 AM
Ok, after my overly long and meandering explanation, I just wanted to say I finally figured out what was wrong. Obviously it was a very simple and kind of dumb thing, that goes to show I am just starting to understand all this stuff. But maybe my experience can save some wasted hours to other newbies. Basically, if you are having trouble with the apache server accesing files elsewhere on your filesystem (via symlinks), you have to make sure that the whole path (all the directories) can be accessed by others.
In my case, the folder 'Documents' was not readable and my web pages were inside a sub-sub-folder of that one. So even though I changed the permissions of all my webfiles and of the htdocs, and everything, I still got the 403 forbidden access error.
So I simply checked the permissions of my other folders from my home down to my webpages folder by right-clicking, and then selecting
Properties > Permissions [tab] > and changing the third option "Others -
Folder Access" to Access Files.
So you see it is a very basic mistake, but at the moment it was not so evident as it now seems.

PaulWhipp
April 28th, 2009, 10:10 AM
Cool, thanks RayPeste - I should have noticed you weren't using a folder in your home directory. I was starting to feel a little nervous about upgrading to Jaunty because I rely heavily upon LAMPP ;)

FWIW:

Directory permissions are that way in Unix/Linux of necessity - the system has to search down the path its given to find the file and if the process doesn't have the right to read the directory along each step of the way, it can't get to the end of the path whatever permissions have been put there.

Complications with this are generally avoided because its unusual to not give execute and read permissions to others on directories. You would normally only do this if you really need to keep the directory content hidden. If you just want to suppress listing the files then take the read permission away but leave the execute. This tells the process that its allowed to get a file if it knows the name but its not allowed to get a list of the files.

Thus if you have a folder of sensitive files you can protect the individual files appropriately (chmod og-rwx <file>) and prevent anyone from listing the files (chmod og-x <dir>). That still allows an appropriately owned process to access the files. The final step would almost never be required - to keep all processes not owned by you out you could then take the final step of removing the read permission from the directory (chmod og-r <dir>).

I'm considering not using LAMPP any more after I upgrade to Jaunty - In order to bring my development environment one step closer to the systems I deliver on I'm thinking I might install apache, mysql, and php separately (perl is in the standard distro). Has anyone else done this for desktop development?

It has the advantage that all the parts are supported ubuntu packages (which LAMPP is not).

tsdemented
May 7th, 2009, 08:25 AM
Thanks!

This is exactly what I needed!

coolsiva
May 13th, 2009, 05:10 AM
The Sweet XAMPP Control Panel did not work for me - so I got the information from this URL - http://ubuntuforums.org/showthread.php?t=223410&page=13 -- and at the bottom of this page, christom (http://ubuntuforums.org/member.php?u=342439) - has showed me how to do that. Thanks christom (http://ubuntuforums.org/member.php?u=342439).

rrll1977
May 18th, 2009, 04:19 PM
Hi,

Anybody has worked with mod_rewrite and mod_userdir?

mod_rewrite appears to work only for the localhost home pages located on /opt/lampp/htdocs and its subdirectories but not for the users's /home/user/public_html pages and its subdirectories

atariman5000
May 19th, 2009, 04:14 PM
I just wanted to say thank you. I have XAMPP up an running on my system. I did make a change to what version of XAMPP I am installing to the latest version (v1.7.1). The XAMPP Control Panel is great!

TideMan
May 20th, 2009, 03:38 AM
I've just set up XAMPP, or rather lampp, on a Xubuntu machine following the instructions from here and had no trouble at all, especially when I found christom's post here: http://ubuntuforums.org/showthread.php?t=223410&page=13 on how to make the GUI work.

dipaish
May 20th, 2009, 03:51 AM
why do you need to install xamp or wamp in linux? its very simple to setup a complete webserver in ubuntu . With 2 simple commands you can get a perfect lamp setup.

Step 1: sudo apt-get install tasksel
Note : tasksel is already installed in all versions of ubuntu 7.04 and later so far as i remember but you can check it....

Step 2: sudo tasksel install lamp-server

Your root directory is /var/www

The server is started by default whenever you boot your computer but if you wish to enable or disable then you can type the following commands

sudo /etc/init.d/apache2 start
sudo /etc/init.d/apache2 stop
sudo /etc/init.d/apache2 reload

TideMan
May 20th, 2009, 04:14 AM
I have my public_html linked to htdocs and that works fine when I look for it in a browser. But I cannot see it in gFTP from my Ubuntu machine, while from Win XP my ftp program shows a directory with my user name, but I cannot get into it.

What I want to do is to be able to ftp files from wherever in the LAN to public_html on the machine running lampp. How can I set that up?

34m0
June 8th, 2009, 02:57 PM
I was experiencing the same error as below until I realised my /etc/hostname was configured wrongly.


sudo /opt/lampp/lampp start
/opt/lampp/lampp: line 74: arch: command not found
Starting XAMPP for Linux 1.6.4...
/opt/lampp/lampp: line 74: arch: command not found
/opt/lampp/lampp: line 74: arch: command not found
XAMPP: Starting Apache with SSL (and PHP5)...
XAMPP: Error 1! Couldn't start Apache!
XAMPP: Starting diagnose...
XAMPP: Sorry, I've no idea what's going wrong.
XAMPP: Please contact our forum http://www.apachefriends.org/f/
/opt/lampp/lampp: line 74: arch: command not found
XAMPP: Starting MySQL...
/opt/lampp/lampp: line 74: arch: command not found
XAMPP: Starting ProFTPD...
XAMPP: - warning: unable to determine IP address of 'desktop_ubuntu'
- error: no valid servers configured
- Fatal: error processing configuration file '/opt/lampp/etc/proftpd.conf'
XAMPP: Error 1! Couln't start ProFTPD!
XAMPP for Linux started.
keval@desktop ubuntu:~$ test: 361: ubuntu.pid: unexpected operator
test: 361: ubuntu.pid: unexpected operator
test: 361: ubuntu.pid: unexpected operator
test: 361: ubuntu.pid: unexpected operator
test: 361: ubuntu.pid: unexpected operator
test: 361: ubuntu.pid: unexpected operator
test: 361: ubuntu.pid: unexpected operator
test: 361: ubuntu.pid: unexpected operator
test: 361: ubuntu.pid: unexpected operator
test: 361: ubuntu.pid: unexpected operator

Apache couldn't start.. and gives me this error.. any Idea...??

Pax-Man
June 15th, 2009, 10:25 PM
I simply love the control panel!

patarnoster
June 15th, 2009, 10:38 PM
“Hello Everyone

I have a project I am working on and one thing I need is an opinion/ideas of the wider community. Which is here this is my project;

I have client, she is an amateur photographer and designer. She is looking to expand; she would like to show case her ideas and projects on a website, and eventually hopefully be able to sell these items on her website. So far I have chosen Joomla as my program, and this website will have a database which will contain the photos and index of sort, the website has to be very appealing to viewers any ideas on that would be much appreciated. How could I improve the site? And what things could I add that would make it more appealing?

What I need help in is some ideas for the website, like what kind of php creation program to the actually design and set up of how it would work.

A layman’s explanations would be welcome as I am only a secondary student with moderate computer knowledge.

Thanks in advance
PatarNoster”

soultaker
June 17th, 2009, 07:34 AM
Hello,
I am new to Linux and I installed the XAMPP and everything works fine with the commands lampp start/restart etc but I fail to create the cool control panel.
On the newly popped file: xampp-control-panel.desktop I can't save it after I copy/paste the needed code for the creation of the icon/control panel.
I get error inside the text file :
Could not find the file /home/admin3/.local/shar…mpp-control-panel.desktop.

I am using XAMPP 1.7.1 for Linux under Ububtu 9.04.

Sorry for the newbish question I will apreciate if someone can ghelp.

MadL10n
June 30th, 2009, 08:03 PM
I followed the installation instructions and everything went well until i linked the htdocs directory to $USER. I don't know what I did wrong but when I navigate to http://localhost/username its empty even though I put about four folders in it.

indianinside
July 22nd, 2009, 10:54 PM
very helpful :)

indianinside
July 22nd, 2009, 10:56 PM
Thats a problem with sourceforge, not a problem, if you go here.. you will get the latest version

http://www.apachefriends.org/en/xampp.html

Zsebyagain
August 19th, 2009, 11:40 AM
So far this post has just under 200 views, So great. If you read this and use it could you leave a reply saying if it was useful/useless? I'd like to keep improving this how-to, so feedback would be good.

Thanks for this how-to. I am new in Ubuntu-world, so first I had to figure it out how to navigate to the downloaded file using terminal, but except this I made XAMPP work in some minutes, and I linked my public_html folder succesfully to the htdocs. :) great work.

PaulWhipp
August 19th, 2009, 11:36 PM
I used xampp in 8.04 and 8.10 but after upgrading to 9.04 I switched to the native installation of apache2 making my desktop machine a 'real' server.

Following the ubuntu guide (https://help.ubuntu.com/9.04/serverguide/C/httpd.html) to do this took half an hour. This included setting up php and mysql which was surprisingly straightforward.

This approach has the benefit of getting all the usual updates etc. for the server and of being 'closer' to the likely deployment environment when testing web applications.

As you end up with a 'production quality' server you can also contemplate using it as an intranet or even allowing client access over the internet when demonstrating or testing features. All in all I would not go back to xampp.

sherwinraavi
August 30th, 2009, 10:24 PM
Hi, I tried this but it does not work for me. I'm a Linux noob using Jaunty and have the xampp-linux-1.7.2.tar.gz downloaded to the desktop. I typed the following into the terminal and this is the response i've gotten:


username-laptop:~$ sudo tar xvfz xampp-linux-1.7.2.tar.gz -C /opt
tar: xampp-linux-1.7.2.tar.gz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error exit delayed from previous errors


I don't know what this means or what to do to get it installed from here. Can someone please help? (and yes, this is what I want to do; not to install them separately).

PaulWhipp
August 31st, 2009, 12:03 AM
Hi, I tried this but it does not work for me. I'm a Linux noob using Jaunty...

See my reply earlier in this thread. As Ubuntu progresses every six months, things get better. It is now very easy to use the standard repositories to get your system perfectly set up for web development.

There is no point in using the xampp package for Ubuntu any more. Install apache2 (use synaptic), and follow the guide (https://help.ubuntu.com/9.04/serverguide/C/httpd.html) to add php, mysql and https as necessary for your purposes.

That way you have a good guide, regular security updates as necessary, and canonical support if you need it (although you may need to upgrade to a server support rather than desktop package if you have a lot of queries specific to apache2).

dondad
August 31st, 2009, 12:59 AM
Hi, I tried this but it does not work for me. I'm a Linux noob using Jaunty and have the xampp-linux-1.7.2.tar.gz downloaded to the desktop. I typed the following into the terminal and this is the response i've gotten:



I don't know what this means or what to do to get it installed from here. Can someone please help? (and yes, this is what I want to do; not to install them separately).


You can probably use the repositories easier, but it looks like the reason the tar failed is that you are not on the desktop if the prompt is correct in your example. You have to be in the same directory as the file in order to tar it. (or include the full path.)

Prentice
September 1st, 2009, 06:34 PM
And how do I remove it?

PaulWhipp
September 1st, 2009, 11:30 PM
sudo rm -r /opt/lampp

from memory.

If you are auto starting the server you should remove the relevant start up commands too.

TomBrown2009
September 3rd, 2009, 07:54 PM
Is your XAMPP symbolic link not working?

Thanks to ReyPeste's post in this thread I've got it working for me. I'm posting this because it has taken me 3 days to solve this issue and from reading this entire thread I see others have the same problem. I see some members have even compromised in putting their development files in /opt/lampp/htdocs/ which would mean they would be outside of the /home directory completely and so (in most cases) on the distro files partition rather than the /home partition. Also, I am using 64 bit Jaunty so it does definitely work on this distro. I am no expert but would like to share my solution.

I installed XAMPP and tried to create a symbolic link with the code below (as the tutorial at the start of this thread) which I have used successfully before on another Ubuntu box.

mkdir ~/public_html

sudo ln -s ~/public_html /opt/lampp/htdocs/$USER

However. I get an error message.

"Access forbidden! You don't have permission to access the requested directory. There is either no index document or the directory is read-protected."

The Cure:

When I installed my 64bit Jaunty I read somewhere on this Forum that it would be a good idea to set permissions for better security on my /home directory to 700 (rwx --- ---) . It was this that was preventing XAMPP/apache to allow me to use http://localhost/tom/ and giving me the 403 error. I've now changed to 755 (rwx r-x r-x). Now the thing is I've searched to find what the default Ubuntu /home directory permissions are and I can't find a reference. All I can find is the advice to set it to 700 (which caused my particular problemo). 755 I think is the Ubuntu default setting will mean other users on my pc can see my files but that's not a problem.

Tom

marako
September 3rd, 2009, 10:22 PM
I really like the *AMPP softwares but ive never tried if for linux. I guess its time to move on from windows...

PaulWhipp
September 4th, 2009, 02:55 AM
Is your XAMPP symbolic link not working?

If you bite the bullet and install apache2 normally into Ubuntu, following the instruction link in my earlier post, you will be taken through setting the document path to whatever you like. In my case I have it set to /home/paul/websites because its my personal development machine but you could add multiple virtual hosts on a multi user system so that each person can have their own local collection of websites.

Keeps it simple.

C. M .Hughes
September 16th, 2009, 04:15 AM
Hi y'all,
I followed these instructions on Ubuntu 9.04, but still can't get a test page to work:

http://localhost/

I get, 'Page Load Error'.

Here is the output from the command:

$sudo /opt/lampp/lampp status
Version: XAMPP for Linux 1.5.3a
Apache is not running.
MySQL is running.
ProFTPD is running.

It seems to me that, 'Apache is not running' is the problem- my question is, how do I fix it?

Many thanks.

Marwy
September 17th, 2009, 04:34 PM
Works great on Ubuntu 9.04, thanks a lot! :).

EvolutionFallen
September 19th, 2009, 05:27 AM
Hello,
I tried installing XAMPP via the instructions on the first page of this thread. All was going well, until I tried actually running it:


~/Desktop$ sudo /opt/lampp/lampp start
Starting XAMPP for Linux 1.5.3a...
XAMPP: Starting Apache with SSL (and PHP5)...
XAMPP: Starting MySQL...
/opt/lampp/bin/mysql.server: 84: source: not found
XAMPP: Starting ProFTPD...
XAMPP for Linux started.
~/Desktop$ /opt/lampp/bin/mysql.server: 334: log_success_msg: not foundAt this point I tried going to http://localhost/ and got a "Failed to Connect to Server" error.
I ran the command to stop the server anyway... The command prompt didn't come back up after "log_success_msg: not found" above -- I don't know if that matters:



sudo /opt/lampp/lampp stop
Stopping XAMPP for Linux 1.5.3a...
XAMPP: XAMPP-Apache is not running.
XAMPP: Stopping MySQL...
XAMPP: Stopping ProFTPD...
XAMPP stopped. Anyone have an idea what the problem might be? I also tried going to the directory "~/.local/share/applications/xampp-control-panel.desktop" to set up the GUI interface as mentioned, but there was no "applications" folder in my "share" directory...

Thanks for any help in advance. I'm a bit of a newbie to this, but I'm trying to learn to do things from the command line instead of relying on GUIs.

agilius
September 20th, 2009, 09:18 AM
I seem to have the same problem as EvolutionFallen. Restarting xampp didn't work. Additionally I sometimes get this when restarting:


Stopping XAMPP for Linux 1.5.3a...
XAMPP: XAMPP-Apache is not running.
XAMPP: Stopping MySQL...
XAMPP: Stopping ProFTPD...
XAMPP stopped.
Starting XAMPP for Linux 1.5.3a...
XAMPP: Starting Apache with SSL (and PHP5)...
/opt/lampp/bin/mysql.server: 84: source: not found
XAMPP: Starting MySQL...
XAMPP: Starting ProFTPD...
XAMPP for Linux started.

root@agilius-laptop:~# /opt/lampp/bin/mysql.server: 334: log_success_msg: not found


I installed exactly as this guide described, I saw no error or anything during the installation. Might it be because I used root for this?

Thanks in advance!

seuzo
September 21st, 2009, 02:58 PM
Hi,

i got this error after install xampp and start xampp.

create a folder in home folder and link to /opt/lampp/htdocs/

when access http://localhost/username/drupal-6.14/install.php


Deprecated: Function ereg() is deprecated in /home/aik/public_html/drupal-6.14/includes/file.inc on line 902

Warning: Cannot modify header information - headers already sent by (output started at /home/aik/public_html/drupal-6.14/includes/file.inc:902) in /home/aik/public_html/drupal-6.14/includes/install.inc on line 618

Warning: Cannot modify header information - headers already sent by (output started at /home/aik/public_html/drupal-6.14/includes/file.inc:902) in /home/aik/public_html/drupal-6.14/includes/install.inc on line 619


anyone can advise on this?
i am lost
cannot reach the drupal/install.php

EvolutionFallen
September 21st, 2009, 08:09 PM
Warning: Cannot modify header information - headers already sent by (output started at /home/aik/public_html/drupal-6.14/includes/file.inc:902) in /home/aik/public_html/drupal-6.14/includes/install.inc on line 618

Warning: Cannot modify header information - headers already sent by (output started at /home/aik/public_html/drupal-6.14/includes/file.inc:902) in /home/aik/public_html/drupal-6.14/includes/install.inc on line 619


That warning happens when PHP tries to send header information to the browser after output has already been sent to it. Sometimes it's caused by extra whitespace at the end of a file. Other times it can be that some code was sent to output before whatever header function is being called. Usually you can fix it by finding the whitespace and deleting it, or by using PHP's output buffering fcns, I think.
Alas, I've never used Drupal so I don't know how exactly to solve the problem. But if you know PHP you might be able to figure it out. A search on Google may help too.

seuzo
September 22nd, 2009, 05:29 AM
That warning happens when PHP tries to send header information to the browser after output has already been sent to it. Sometimes it's caused by extra whitespace at the end of a file. Other times it can be that some code was sent to output before whatever header function is being called. Usually you can fix it by finding the whitespace and deleting it, or by using PHP's output buffering fcns, I think.
Alas, I've never used Drupal so I don't know how exactly to solve the problem. But if you know PHP you might be able to figure it out. A search on Google may help too.

But i did not try to edited anything. is a new installation. possible to happen?

RachedTN
September 23rd, 2009, 10:38 AM
Hi,

i got this error after install xampp and start xampp.

create a folder in home folder and link to /opt/lampp/htdocs/

when access http://localhost/username/drupal-6.14/install.php


Deprecated: Function ereg() is deprecated in /home/aik/public_html/drupal-6.14/includes/file.inc on line 902

Warning: Cannot modify header information - headers already sent by (output started at /home/aik/public_html/drupal-6.14/includes/file.inc:902) in /home/aik/public_html/drupal-6.14/includes/install.inc on line 618

Warning: Cannot modify header information - headers already sent by (output started at /home/aik/public_html/drupal-6.14/includes/file.inc:902) in /home/aik/public_html/drupal-6.14/includes/install.inc on line 619


It seems that XAMP 1.7.2 and drupal 6.13 and earlier have this problem, because I tried with XAMP 1.7.1 and drupal 6.12 and all it's OK, but when trying with XAMP 1.7.2 and Drupal 6.13 I encountred the same probleme as you.
I advise you to install LAMP : sudo tasksel
then choose LAMP, hit OK
after the istallation is done you can create a folder in home folder and link to /opt/lampp/www/
Good luck :)

seuzo
September 23rd, 2009, 03:51 PM
oh. What is LAMP?

LAMP is a software ? is will install Apache? (web server)

does it include MySQL?
because i wanted to install drupal CMS to try out.

sorry that i am nob on ubuntu but interested to know all this knowledge.

Any info link i can read up on LAMP?

RachedTN
September 23rd, 2009, 04:18 PM
LAMP : Linux/Apache/MySQL/PHP
as you are a newbie (and me too ;) ) here is a useful link : http://www.howtoforge.com/ubuntu_lamp_for_newbies
Enjoy it :)

aditya.t
October 9th, 2009, 09:05 AM
In trying to activate the desktop panel for XAMPP, i save unable to save the file

Could not find the file /home/aditya/.local/shar…mpp-control-panel.desktop.
Please check that you typed the location correctly and try again.

Amethyst05
October 19th, 2009, 03:03 AM
In trying to activate the desktop panel for XAMPP, i save unable to save the file

Could not find the file /home/aditya/.local/shar…mpp-control-panel.desktop.
Please check that you typed the location correctly and try again.

When I did this on one of my computers I found that I didn't have an applications folder. Check that all your folders are there. If they are not, you will have to create them and then this line will work:



gedit ~/.local/share/applications/xampp-control-panel.desktop

Amethyst05
October 19th, 2009, 03:22 AM
Thank you for these instructions. I am a complete newcomer to Linux so appreciate everything I have learned via this forum and I'm having great fun with Ubuntu. No computer is safe from me installing Ubuntu on it! :)

I now have a problem with my testing server and I cannot seem to find an answer.

The root of my site seems to be /myname/mysite/. Is there anyway to make the root start after /mysite/ the way it would in a live environment on the internet?

I need to do this as many files have include files with links such as /includes/header.php and this does not work in the testing environment.

I would be grateful for any help or pointers in the right direction. Thanks.

By the way, I have edited the DocumentRoot in httpd.conf file but this will only work for one site and I have several sites I need to test. Is there any way to do this?

Amethyst05
October 19th, 2009, 02:51 PM
OK, I've solved my problem by setting up virtual hosts.

In case anyone is interested in this sort of set up, this is what I did.

1. First of all enable virtual hosts by editing httpd.conf:



sudo gedit /opt/lampp/etc/httpd.conf
Find #Include etc/extra/httpd-vhosts.conf and remove the # so it looks like:



Include etc/extra/httpd-vhosts.conf
Save and close.

2. Now add the virtual host:



sudo gedit /opt/lampp/etc/extra/httpd-vhosts.conf
You will find two virtual hosts set up as examples. Remove or edit these with your own details.



<VirtualHost *:80>
ServerAdmin webmaster@mysite.com
DocumentRoot /opt/lampp/htdocs/myname/mysite
ServerName mysite.com
ErrorLog logs/mysite.com-error_log
CustomLog logs/mysite.com-access_log common
</VirtualHost>
Save and close the file.

3. Now tell Xampp where to find this site:



sudo gedit /etc/hosts
Add this:



127.0.0.1 mysite.com
Save and close the file.

4. Restart xampp server



sudo /opt/lampp/lampp restart
5. Now you can point your browser to http://mysite.com and it should fetch your site.


These are my instructions and I am a beginner so please let me know if there is anything not correct in this. Thanks.

johanbove
October 22nd, 2009, 10:33 PM
Response to #280 (http://ubuntuforums.org/showpost.php?p=7892714&postcount=280)

Hello Tom,

I'm having exact the same issue as you have described in this post;

Does you error_log contain the message that symbolic links cannot be used? Do you have your /home on an extra mounted drive ? I have my /home folder mounted through fstab with these options: "defaults,rw,nodev"

I'm kind stuck here...

Regards,
Johan

PaganDruid
November 4th, 2009, 12:29 PM
Hello all, not sure if this is the right place to post...

almost a complete newbie.

For the past few years i have been using wamp for web development.
The only reason i havent got xampp running in ubuntu is because it just damn well doesn't work! I have followed EVERY SINGLE one of the almost identical tedious tutorial(s) which each start with 'simply download and extract',bah!

I have downloaded xampp, following the instructions, extracting the file from the downloads file in terminal, but the terminal returns 'no file or directory', and im looking at the directory that apparently doesn't exist. Is my syntax wrong...help!

Why isnt there a .deb bundled with apache,mysql,php?

I love almost everything about Ubuntu, but i mean, wamp, i double click the installer app, and its done...xampp/ubuntu, well its been almost 4 years and i stil havent managed to get it working properly

any assistance would be very much appreciated

Mickser_52
November 4th, 2009, 02:07 PM
Hi, I just installed xampp in ubuntu 9.10 following instructions from this site http://www.officeray.com/?blog:how-to-install-xampp-on-ubuntu-jaunty-9.04:4ZXD1405V0 and it appears to be working. I haven't had time to test it yet though

PaulWhipp
November 5th, 2009, 12:49 AM
As a professional web application developer, building the lamp stack on ubuntu using xampp seems a waste of effort to me.

I was doing it up until 8.04 but these days Ubuntu is very good at setting up the stack directly. Just do the following:



sudo aptitude install apache2 php5-mysql libapache2-mod-php5 mysql-server


Make sure you remember the password for mysql!

You should then have a working server serving pages from /var/www

From there, there are lots of ways you can go. http://doc.ubuntu.com/ubuntu/serverguide/C/httpd.html has details.

Personally, I develop web sites and web applications using this scheme locally.

I also use ssmtp so that sending mail from the sites under development works well enough for testing (if you are developing something that processes incoming email this wont do though).



sudo rm /etc/ssmtp/ssmtp.conf

Follow the instructions at http://www.nixtutor.com/linux/send-mail-with-gmail-and-ssmtp/ to set this up to send via a gmail account.

If you don't want to open your machine up to the world, you can repeat this on an EC2 Ubuntu instance to for testing or (with appropriate modifications for persistence and security) to deploy the live websites too!

PaganDruid
November 5th, 2009, 08:36 AM
Thank you very much for the assistance :)


I dont suppose you could suggest a nice Linux app to replace dreamweaver?

Once again thanks :)

PaulWhipp
November 5th, 2009, 08:59 AM
off topic a bit but for Dreamweaver just get a second monitor and run with what you've got :)

Really though - You can use just about any decent editor in one window and just save then reload the page in your browser in another window. Its not quite wysiwyg but its accurate and fast.

I use vim for general editing, Zend Studio for php and vim + tidy to keep my html neat and accurate.

Always having the browser looking at your work and reloading frequently to check it is the key to getting stuff done.

PaganDruid
November 6th, 2009, 01:18 AM
Thank you very much for the help!

If i could be a further bother...

Is it entirely necessary to paste my existing HTML/PHP projects into the /www with the command line terminal (root user bs). I am dealing with a lot of imported PHP/AJAX/Java/HTML content from my windows local web development server and i would really like to just copy paste them into my localhost like i do in windows. Security is not an issue to me, I really just want to replace my wamp5/dreamweaver platform for development :( .

Also i must admit i am really confused as to what packages i need to continue from here. What application do i use for viewing my own php projects on the firefox browser,and how do i get them there?

how does one setup mysql and ms access connections (product catalogs etc)

And of course what dreamweaver substitutes are there?

Sorry about the noob questions :P

once again, thank you very very much so far :)

PaulWhipp
November 6th, 2009, 02:14 AM
Is it entirely necessary to paste my existing HTML/PHP projects into the /www with the command line terminal (root user bs). I am dealing with a lot of imported PHP/AJAX/Java/HTML content from my windows local web development server and i would really like to just copy paste them into my localhost like i do in windows. Security is not an issue to me, I really just want to replace my wamp5/dreamweaver platform for development

I am not sure what you mean by this. You can use subfolders under www for each project and just refer to them in the url as http://localhost/project1 etc.

Firefox will work with php from the outset so should be fine. If its not being served php files, try restarting apache (sudo /etc/init.d/apache2 restart).

Mysql should all be there and working as normal. If you are importing existing websites you need to create and populate the matching databases and users so that your configuration matches up. I've no idea about hooking up MS Access because that is in windows.

If you really want a dreamweaver substitute, try bluefish (http://bluefish.openoffice.nl/).

PaganDruid
November 6th, 2009, 05:17 AM
Hi,thanks again

Sorry, i meant to say is there a way to paste php/html projects into the /www WITHOUT using the command line as root. Which is to say is there some way of using the gnome desktop explorer to paste the projects as the root user.

again sorry for the newbie question(s)

PaulWhipp
November 6th, 2009, 06:26 AM
If its your own machine and secure you can change the permissions on the www folder:


sudo chmod go+w /var/www


Alternatively you can put your projects in your home folder eg ~/websites/project1 etc. and either change the apache configuration to point there or put a link to that folder in /var/www.

coldkreap
November 10th, 2009, 10:27 PM
Thank you for this. It worked perfectly for me. I saved my php files to the public_html directory and they showed up on localhost and ran as I expected. THANKS!!

DominaDoom
November 12th, 2009, 02:18 AM
If its your own machine and secure you can change the permissions on the www folder:


sudo chmod go+w /var/www


Alternatively you can put your projects in your home folder eg ~/websites/project1 etc. and either change the apache configuration to point there or put a link to that folder in /var/www.

I think I am getting closer to being on the right track. I get a link at http://localhost/ to the Index.html file found in /var/www which reads "It Works" instead of the XAMPP test page. There is also a strange locked lampp file in my Home folder. I know the issue could involve changing modes of this mystery lampp file and/or linking the appropriate directory to var/www. Any help from anyone would be appreciated. Thank You.

PaulWhipp
November 12th, 2009, 03:49 AM
There is also a strange locked lampp file in my Home folder. I know the issue could involve changing modes of this mystery lampp file and/or linking the appropriate directory to var/www. Any help from anyone would be appreciated.

There are two setups being covered here now (my fault really) - xampp and a real apache2 web server. I think you may be confusing the two. They both ultimately do the same thing. xampp was much better when it used to be a pain configuring your own machine to be a server because it set up the whole lamp stack and gave you a control panel to manage it. These days, setting up a real server is so easy, I recommend you leave xampp alone unless you are working in Windows (where its still very handy).

/var/www is the default location for a real apache2 server. Its started up and stopped by using
sudo /etc/init.d/apache2 restart.

xampp (from memory) uses /opt/lampp/htdocs by default for its web documents. I can't remember how you start and stop it but it will have ..lampp.. in the path to the apache2 command somewhere.

I think, from your note, that you have a real server working and some xampp stuff hanging over. I recommend you clean out the xampp stuff completely to remove the confusion. xampp is a great package for systems that can't easily support the lamp stack but Ubuntu can these days - its used on a lot of professional web servers and can be set up really easily for developers or content creators on local systems too.

rocklee
November 12th, 2009, 02:13 PM
Hey guys, I tried installing XAMPP in Ubuntu 9.10 following some of the instructions here and had somehow got it to work. I used the virtual host to relocate my working web files instead of using Xampp's htdoc directory.

Now my query is trying to access the site on my other PCs on the same network. I can ping my web server IP and can even see the default directory on the server that points to XAMPP index page (using http://192.168.0.4), but I can't seem to connect to my own directories using the host name created (ie. localhost.ajax.com).

I tried to link 192.168.0.4 to a hostname but that doesn't work.

Can anyone advice what I need to setup on the web server or client PCs?

sitex
November 14th, 2009, 05:42 AM
If someone want to help to install Xampp on Ubuntu. You can get help with related screen shots with the site Solutionz click here to go the site (http://solutionz.yolasite.com/)

milos037
November 15th, 2009, 04:00 AM
Hi everybody,
I have copied all my projects from wamp/windows into
~/public_htmland I can list all of them in browser with http://localhost/$user/
project1
project2
...

but in all files (.tpl, .html, .php ...) I used absolute path to link pages and it works fine on windows. But not on Ubuntu.
example:
httpd://localhost/milos/project1/index.php
(critical part of file)
<div id="navigation">
<ul>
<li class="active"><a href="/">HOME</a></li>
<li><a href="/services/">SERVICES</a></li>
<li><a href="/clients/">CLIENTS</a></li>
<li><a href="/prices/">PRICES</a></li>
<li><a href="/about/">ABOUT US</a></li>
<li><a href="/contact/">CONTACT</a></li>
</ul>
</div>
PROBLEM:
my home page link http://localhost/ instead http://localhost/milos/project1/

"/services/" link to http://localhost/services instead http://localhost/milos/project1/sevices/
How can I fix this, without change all my files?
Thanks

Jaysn
January 2nd, 2010, 04:07 AM
omg thats basic html...
well a link using "/something/" withouth "http://www.somedomain.tld/somethingelse/something/" is a relative path, so the link starting with / is relative to the domain root, wich is "localhost/" so href="/" goes to http://www.domain.tld/" and href="/lol/" goes to "http://www.domain.tld/lol/" to fix this relatively you just need to delete the first "/" so it would add the foldername/directoryname to the current one. or you could try href="/milos/project1/" and
href="/milos/project1/service/"
sry for the bad english and description, i hope you know what i mean :D
*edit*
<div id="navigation">
<ul>
<li class="active"><a href="/milos/project1/">HOME</a></li>
<li><a href="/milos/project1/services/">SERVICES</a></li>
<li><a href="/milos/project1/clients/">CLIENTS</a></li>
<li><a href="/milos/project1/prices/">PRICES</a></li>
<li><a href="/milos/project1/about/">ABOUT US</a></li>
<li><a href="/milos/project1/contact/">CONTACT</a></li>
</ul>
</div>
this should help ;)

@topic
i would prefer to create a user folder in htdocs instead of a public_html folder in the user folder and link from the home directory to the htdocs/$USER folder because that way you can administrate the files via FTP otherwise i cant go into my folder remotely :/
again sry for bad en.

The Other Steve
January 7th, 2010, 09:15 AM
XAMPP has a .gif icon in /opt/lampp/htdocs that you could use, or if it has to be .xpm or .png format it should be a snap to convert it in GIMP or some such.
It is.

For my preferences, the icon at 48x48 was a little too large and obtrusive, so I resized it on a transparent background.

http://img509.imageshack.us/img509/7729/xamppsm.png (http://img509.imageshack.us/i/xamppsm.png/)
If you'd like it, it's here:

http://img509.imageshack.us/img509/7729/xamppsm.png

To change the icon in the Applications Menu:
right click on Applications
select Edit Menus
navigate to XAMPP Control Panel and select it
select Properties
click on the existing icon
navigate to the location of the XAMPP icon you downloaded and select it
http://img63.imageshack.us/img63/4873/xamppiconscreen2.th.jpg (http://img63.imageshack.us/i/xamppiconscreen2.jpg/)

To change the icon on the Desktop:
right click on the icon
select Properties
click on the existing icon
navigate to the location of the XAMPP icon you downloaded and select it
http://img63.imageshack.us/img63/2381/xamppiconscreen1.th.jpg (http://img63.imageshack.us/i/xamppiconscreen1.jpg/)

ginost7
January 8th, 2010, 07:26 PM
Hello i followed the above commands as root


sudo mkdir /opt/lampp/htdocs/homefiles/

Then made the equivilant directory in our home directory.

mkdir ~/public_html/

And finally link them together.

sudo ln -S ~/public_html/ /opt/lampp/htdocs/homefiles/

well on mozilla

http://localhost/xampp/homefiles

does not exist. The error is "object not found" All my php files are in public_html directory.

Can anybody help????

Gino

ginost7
January 8th, 2010, 07:32 PM
I was under the impression that all my php files in /home/gino/homefiles will be shown in

/opt/lampp/htdocs/webapps

AND

when i open a browser :

http://localhost/xampp/webapps

USING THE ABOVE COMMANDS

Dragonbite
January 23rd, 2010, 03:43 AM
When trying to start Drupal, I got the following errors (duplicated multipel times)
Deprecated: Function ereg() is deprecated in /opt/lampp/htdocs/includes/file.inc on line 902

Warning: Cannot modify header information - headers already sent by (output started at /opt/lampp/htdocs/includes/file.inc:902) in /opt/lampp/htdocs/includes/install.inc on line 618

The solution I found was found here :
http://drupal.org/node/586416

go to your drupal directory..
you hav to edit drupal\includes\file.inc file a little bit..
open file .inc
search for elseif ($depth >= $min_depth && ereg($mask, $file)) line in that file
edit the above line by
elseif ($depth >= $min_depth && mb_ereg($mask, $file))

your problem is solved..


It worked for me like a charm. It just took me a long time to re-find this solution.

Billsputters
January 28th, 2010, 10:24 AM
I've followed the installation to the letter, trying to setup a server for home use/testing.

PHP is running and security has been set as advised. However, if I try to login the SQL

mysql -u root


I get

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)


I've searched and read for the last two days on and off in attempy to solve it, but alas am getting nowhere. Any ideas?

PaulWhipp
January 28th, 2010, 11:01 AM
Hi Billsputters,

/var/run/mysqld/mysqld.sock is the right socket for the default mysql-server installation. Check mysql server is running as it should be:



~$ sudo /etc/init.d/mysql status
* /usr/bin/mysqladmin Ver 8.41 Distrib 5.0.75, for debian-linux-gnu on i486
Copyright (C) 2000-2006 MySQL AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Server version 5.0.75-0ubuntu10.2
Protocol version 10
Connection Localhost via UNIX socket
UNIX socket /var/run/mysqld/mysqld.sock
Uptime: 11 hours 31 min 3 sec

Threads: 1 Questions: 12068 Slow queries: 0 Opens: 1643 Flush tables: 3 Open tables: 64 Queries per second avg: 0.291


You can start it with "sudo /etc/init.d/mysql start" if its not running although it should start automatically after a normal installation.

Pretty much whatever the problem, it may be easiest to purge and reinstall it since you presumably don't yet have any mysql content.

Billsputters
January 29th, 2010, 07:31 AM
I found part of the problem, as you suspected, mysql was not running, which doesn't help things. So I tried to start it, and it came up with a simple fail.

So, I purged out mysql and then tried to reinstall.

But now I get


Couldn't find package mysql

Think I've done some serious damage here!

Help!

Sorted. It installed OK during the last update

PaulWhipp
January 29th, 2010, 07:57 AM
Try


~ $ sudo aptitude purge php5-mysql libapache2-mod-php5 mysql-server mysql-client
~ $ sudo dpkg -a --configure
~ $ sudo aptitude install php5-mysql libapache2-mod-php5 mysql-server mysql-client


That should have you started back from scratch.

n0v1c3n00b
February 5th, 2010, 07:48 AM
Could not find the file /home/ayyub/.local/share…mpp-control-panel.desktop.

that's the error I'm getting when I attempt to save the copied text to allow the control panel

a_rojilla
February 20th, 2010, 11:48 AM
Could not find the file /home/ayyub/.local/share…mpp-control-panel.desktop.

that's the error I'm getting when I attempt to save the copied text to allow the control panel

Same here.

Months and even years ago I had no problems with this applet with different versions of Ubuntu. In fact, only some days ago I had no problems in a new laptop with Karmic (9.10) but now I'm getting this error in a new PC where I also installed Karmic...

The difference? That this time I installed Ubuntu with a separated /home partition.

I guess that's what's causing the problem because it is, well, the only difference. Any ideas on how to solve this?

Regards.

a_rojilla
February 20th, 2010, 12:21 PM
Ok, it seems that the folder applications (in ~/.local/share/) was not created, so just create it or do the following to get the applet:

1 - Right-click on Ubuntu's logo in the main menu bar.
2 - Select "Edit menus" and a window called "Main Menu" will appear.
3 - In this window, from the list on the left pick the menu where you want the applet to be placed in (I picked "Programming").
4 - Press the "New Item" button on the right.
5 - In the new window (called "Create Launcher"):
- Type: "Application".
- Name: "XAMPP Control Panel" (or whatever you want to call it).
- Command: gksudo "python /opt/lampp/share/xampp-control-panel/xampp-control-panel.py"
- Comment: any comment you wish about the applet or what it is for or it does or just let it blank.
- Now click on the big icon at the left (in this same "Create Launcher" window) and pick an icon.
- Click "OK"
6 - Click "Close" in the "Main Menu" window. Done.

I hope this helps.

Regards.

carpman
March 22nd, 2010, 08:48 PM
Hello, ok set this up and all was working till set security, now under status everything is deactivated?

Tried restarting but still the same?

That said php must be running as i can load myphpadmin fine!

any ideas?

cheers

beachbuggy
April 5th, 2010, 04:04 PM
Hi There,

I have setup LAMP and the test page on localhost works

I have then followed the code but when I go to localhost/bart I get an error saying "Not Found

The requested URL /bart was not found on this server."

I'm not sure what to do next :(

My folders are there in opt/lamp/htdocs and these were put there via my linked folder in home/bart/public_html

This was what the instructions said to do.

Any ideas.. Thanks

Collin

MMosley
April 8th, 2010, 12:05 AM
Hi There,

I have setup LAMP and the test page on localhost works

I have then followed the code but when I go to localhost/bart I get an error saying "Not Found

The requested URL /bart was not found on this server."

I'm not sure what to do next :(

My folders are there in opt/lamp/htdocs and these were put there via my linked folder in home/bart/public_html

This was what the instructions said to do.

Any ideas.. Thanks

Collin

Hi Collin,

I had the same problem. This is what worked for me:

http://localhost/public_html

(instead of http://localhost/user)

Hope that might help you!

damnated
April 10th, 2010, 11:51 AM
Excellent tutorial, worked like a charm.

windphere
April 18th, 2010, 12:55 AM
This is a how-to for setting up a web development environment easily. This guide will install the XAMPP lampp stack into /opt, setup an easy way to start it up and shut it down, and link a folder in your home directory to the webserver.

WARNING
This guide is aimed at a development environment only and should not be used as a public webserver. To setup a public webserver follow the directions on the Ubuntu wiki https://help.ubuntu.com/community/ApacheMySQLPHP

As this is Ubuntu, all the major parts of a typical web server are included (in the main repo, or on the Ubuntu Server CD) and this is a great way to setup a server. The ubuntu developers have prepared a great web server and have made the process as seemless as possible.

But what if even the official way is still to complicated? What if you just want a quick web server for development?

Fortunately there is the XAMPP project: http://www.apachefriends.org/en/xampp.html. The XAMPP project bundles Apache, PHP4 & 5, Perl, mySQL, and a bunch of other utilities/applications into an simple package for Mac OSX, Windows, Solaris, and Linux. Obviously this HOWTO only deals with the linux version.

For those of you with already existing Apache/mySQL/php installations it installs everything into /opt so it doesn't conflict with any other installation, and it is completely setup and ready to run.

Install XAMPP

Two easy steps:

Download the most recent version of XAMPP: (at time of writing 1.5.3a)
http://prdownloads.sourceforge.net/xampp/xampp-linux-1.5.3a.tar.gz?download
(Source URL: http://www.apachefriends.org/en/xampp-linux.html#374)
Extract the archive to /opt using sudo: (make sure you are in the directory that you downloaded the archive to)
sudo tar xvfz xampp-linux-1.5.3a.tar.gz -C /opt


Start XAMPP

To start it up, open a terminal and type this:

sudo /opt/lampp/lampp startStop XAMPP

To stop it, open a terminal and type this:

sudo /opt/lampp/lampp stopAdditional XAMPP commands

To see additional commands, open a terminal and type this:

sudo /opt/lampp/lamppSweet XAMPP Control Panel

http://img108.imageshack.us/img108/5647/screenshotxamppcontrolpanelfj6.png

To use the sweet gtk/python control panel:

Run in a terminal:
sudo gedit ~/.local/share/applications/xampp-control-
panel.desktopPaste the following into the open file and save and exit.

[Desktop Entry]
Comment=Start/Stop XAMPP
Name=XAMPP Control Panel
Exec=gksudo "python /opt/lampp/share/xampp-control-panel/xampp-control-panel.py"
Icon[en_CA]=/usr/share/icons/Tango/scalable/devices/network-wired.svg
Encoding=UTF-8
Terminal=false
Name[en_CA]=XAMPP Control Panel
Comment[en_CA]=Start/Stop XAMPP
Type=Application
Icon=/usr/share/icons/Tango/scalable/devices/network-wired.svg"XAMPP Control Panel" will show up in your applications menu under Internet. Use the Alacarte Menu Editor to move it around.

Test to see if XAMPP is running

Once XAMPP is up and running open firefox and go to: http://localhost/

You should see the XAMPP test page:

http://static.apachefriends.org/images/380.jpg

Location of files and uploading

XAMPP by default uses /opt/lampp/htdocs as the root web directory. The easiest way to start working on files is to link a folder in your home directory into this directory.
My user name is peter so I have /home/peter/public_html linked to /opt/lampp/htdocs/peter. So if I navigate to http://localhost/peter/ I get a listing of all the files/folders in that directory. (As long is there isn't a index.php/html/etc file)
To set this up, run in a terminal:

Make public_html directory in home directory:
mkdir ~/public_html
Link to /opt/lampp/htdocs
sudo ln -s ~/public_html /opt/lampp/htdocs/$USER

Now any files and folders you place in ~/public_html will be published to your personal webserver.

Bookmark http://localhost/username to make this easy to access.

WARNING - SECURITY
http://www.apachefriends.org/en/xampp-linux.html#381
Open holes:

The MySQL administrator (root) has no password.
The MySQL daemon is accessible via network.
ProFTPD uses the password "lampp" for user "nobody".
PhpMyAdmin is accessible via network.
Examples are accessible via network.
MySQL and Apache running under the same user (nobody).

This doesn't leave your whole system wide open, but someone could hack your XAMPP installation, so be wary.
To fix most of the security weaknesses open a terminal and run:
sudo /opt/lampp/lampp securityFeedback
Please read this post (http://www.ubuntuforums.org/showpost.php?p=1310039&postcount=5).

---- EDIT - July 28, 2006 ----
Minor Edits

---- EDIT - August 1, 2006 ----
Re-did xampp control panel shortcut to make it easier.

---- EDIT - August 16, 2006 ----
Added warning for public web servers and edited intro to make it more accurate.

---- EDIT - September 1, 2006 ----
Added sudo to security command.

--- EDIT sudo to
gedit ~/.local/share/applications/xampp-control-panel.desktop

windphere
April 18th, 2010, 12:59 AM
This is a how-to for setting up a web development environment easily. This guide will install the XAMPP lampp stack into /opt, setup an easy way to start it up and shut it down, and link a folder in your home directory to the webserver.

WARNING
This guide is aimed at a development environment only and should not be used as a public webserver. To setup a public webserver follow the directions on the Ubuntu wiki https://help.ubuntu.com/community/ApacheMySQLPHP

As this is Ubuntu, all the major parts of a typical web server are included (in the main repo, or on the Ubuntu Server CD) and this is a great way to setup a server. The ubuntu developers have prepared a great web server and have made the process as seemless as possible.

But what if even the official way is still to complicated? What if you just want a quick web server for development?

Fortunately there is the XAMPP project: http://www.apachefriends.org/en/xampp.html. The XAMPP project bundles Apache, PHP4 & 5, Perl, mySQL, and a bunch of other utilities/applications into an simple package for Mac OSX, Windows, Solaris, and Linux. Obviously this HOWTO only deals with the linux version.

For those of you with already existing Apache/mySQL/php installations it installs everything into /opt so it doesn't conflict with any other installation, and it is completely setup and ready to run.

Install XAMPP

Two easy steps:

Download the most recent version of XAMPP: (at time of writing 1.5.3a)
http://prdownloads.sourceforge.net/xampp/xampp-linux-1.5.3a.tar.gz?download
(Source URL: http://www.apachefriends.org/en/xampp-linux.html#374)
Extract the archive to /opt using sudo: (make sure you are in the directory that you downloaded the archive to)
sudo tar xvfz xampp-linux-1.5.3a.tar.gz -C /opt


Start XAMPP

To start it up, open a terminal and type this:

sudo /opt/lampp/lampp startStop XAMPP

To stop it, open a terminal and type this:

sudo /opt/lampp/lampp stopAdditional XAMPP commands

To see additional commands, open a terminal and type this:

sudo /opt/lampp/lamppSweet XAMPP Control Panel

http://img108.imageshack.us/img108/5647/screenshotxamppcontrolpanelfj6.png

To use the sweet gtk/python control panel:

Run in a terminal:
sudo gedit /usr/share/applications/xampp-control-panel.desktop panel.desktopPaste the following into the open file and save and exit.

[Desktop Entry]
Comment=Start/Stop XAMPP
Name=XAMPP Control Panel
Exec=gksudo "python /opt/lampp/share/xampp-control-panel/xampp-control-panel.py"
Icon[en_CA]=/usr/share/icons/Tango/scalable/devices/network-wired.svg
Encoding=UTF-8
Terminal=false
Name[en_CA]=XAMPP Control Panel
Comment[en_CA]=Start/Stop XAMPP
Type=Application
Icon=/usr/share/icons/Tango/scalable/devices/network-wired.svg"XAMPP Control Panel" will show up in your applications menu under Internet. Use the Alacarte Menu Editor to move it around.

Control Panel will be located under Applications-Other-XAMPP Control Panel

Test to see if XAMPP is running

Once XAMPP is up and running open firefox and go to: http://localhost/

You should see the XAMPP test page:

http://static.apachefriends.org/images/380.jpg

Location of files and uploading

XAMPP by default uses /opt/lampp/htdocs as the root web directory. The easiest way to start working on files is to link a folder in your home directory into this directory.
My user name is peter so I have /home/peter/public_html linked to /opt/lampp/htdocs/peter. So if I navigate to http://localhost/peter/ I get a listing of all the files/folders in that directory. (As long is there isn't a index.php/html/etc file)
To set this up, run in a terminal:

Make public_html directory in home directory:
mkdir ~/public_html
Link to /opt/lampp/htdocs
sudo ln -s ~/public_html /opt/lampp/htdocs/$USER

Now any files and folders you place in ~/public_html will be published to your personal webserver.

Bookmark http://localhost/username to make this easy to access.

WARNING - SECURITY
http://www.apachefriends.org/en/xampp-linux.html#381
Open holes:

The MySQL administrator (root) has no password.
The MySQL daemon is accessible via network.
ProFTPD uses the password "lampp" for user "nobody".
PhpMyAdmin is accessible via network.
Examples are accessible via network.
MySQL and Apache running under the same user (nobody).

This doesn't leave your whole system wide open, but someone could hack your XAMPP installation, so be wary.
To fix most of the security weaknesses open a terminal and run:
sudo /opt/lampp/lampp securityFeedback
Please read this post (http://www.ubuntuforums.org/showpost.php?p=1310039&postcount=5).

---- EDIT - July 28, 2006 ----
Minor Edits

---- EDIT - August 1, 2006 ----
Re-did xampp control panel shortcut to make it easier.

---- EDIT - August 16, 2006 ----
Added warning for public web servers and edited intro to make it more accurate.

---- EDIT - September 1, 2006 ----
Added sudo to security command.

--- Edit - April 17, 2010
Replace code Ubuntu 9.04
sudo gedit /usr/share/applications/xampp-control-panel.desktop

EJI
April 20th, 2010, 12:07 PM
Hi Guys,

I am unable to get apache to start using Xampp Control Panel or cli

1st problem:
mysql stopped
apache stopped

using webmin 1.5 stopped mysql server. stopped apache server.

used xampp control panel.

mysgl RUNNING
apache STOPPED

Start Apache via webmin, still no luck

Here is my installed packages of apache on my sys:

Installed packages for apache:
libapache2-mod-php5, apache2-mpm-prefork,apache2-utils,
apache2.2-bin,apache2.2-common

Am I missing a package?

When I run http://localhost i get message It Works!

Thanks
EJI

bb93
April 20th, 2010, 01:10 PM
I only unknowned Sweet XAMPP Control Panel.

Thanks for the Tuto :)

diabolicalspooz
April 25th, 2010, 06:23 AM
You can not have 2 different instances of Apache running like this it appears as though you install the synaptic package for apache somewhere along the line either through apt-get install apache2 or used the GUI... which has seem to have broken your xampp the reasons why you are able to browse to the http://localhost/ and get a message saying it works is because your ubuntu is directly running apache not XAMPP.... this is why your xampp applet is saying that it is not running. Furthermore Xampp will not work since your xampp install is self contained with the apache,mysql,phpadmin etc... and the instance of apache that is the webserver is on it own.

if you drop down to a shell and type "sudo /opt/lampp/lampp start" if it is not started already or if it is started "sudo /opt/lampp/lampp restart" and watch the screen it will first say the Apache is not running when it goes to shut down the program then once it does it will not allow it to start because another Apache Server is already running. Which is the other install...

Simple fix get rid of the synaptic repo's for Apache and once you do so things should be A ok...


Hi Guys,

I am unable to get apache to start using Xampp Control Panel or cli

1st problem:
mysql stopped
apache stopped

using webmin 1.5 stopped mysql server. stopped apache server.

used xampp control panel.

mysgl RUNNING
apache STOPPED

Start Apache via webmin, still no luck

Here is my installed packages of apache on my sys:

Installed packages for apache:
libapache2-mod-php5, apache2-mpm-prefork,apache2-utils,
apache2.2-bin,apache2.2-common

Am I missing a package?

When I run http://localhost i get message It Works!

Thanks
EJI

honnour
May 3rd, 2010, 08:32 PM
Hello;

First of all thank you for your tutorial.

I installed the xampp just fine and its working. Then I tried to make a shorcut to /applications/internet as you told.

I wrote the code, then i copy and paste the other code to empty page. When i tried to save it I have a problem.
It says;

"Could not find the file /home/onur/.local/share/…mpp-control-panel.desktop."
"Please check that you typed the location correctly and try again."

What should i do to fix this?

Edit: i solved my problem. Dont answer this.

Thank you

zakeen
May 4th, 2010, 01:36 PM
Simple fix get rid of the synaptic repo's for Apache and once you do so things should be A ok...


This is my problem also, if I get this right:

system
admin
synaptic
status
installed
quick search "apache"

then uninstall all ?

avengerxp
May 23rd, 2010, 03:57 PM
when i tried the code (downloaded xampp latest version) the terminal spits back at me saying

tar: you may not specify more than one "-acdtrux" option....

what am i supposed to do?

craig0927
May 26th, 2010, 04:59 AM
Ok, after my overly long and meandering explanation, I just wanted to say I finally figured out what was wrong. Obviously it was a very simple and kind of dumb thing, that goes to show I am just starting to understand all this stuff. But maybe my experience can save some wasted hours to other newbies. Basically, if you are having trouble with the apache server accesing files elsewhere on your filesystem (via symlinks), you have to make sure that the whole path (all the directories) can be accessed by others.
In my case, the folder 'Documents' was not readable and my web pages were inside a sub-sub-folder of that one. So even though I changed the permissions of all my webfiles and of the htdocs, and everything, I still got the 403 forbidden access error.
So I simply checked the permissions of my other folders from my home down to my webpages folder by right-clicking, and then selecting
Properties > Permissions [tab] > and changing the third option "Others -
Folder Access" to Access Files.
So you see it is a very basic mistake, but at the moment it was not so evident as it now seems.

Thank you very much for posting this. I'm just starting out myself, and I got tripped up by this same issue. You probably saved me several hours of frustration. :-)

abedepaul81
May 28th, 2010, 12:21 AM
I got tripped up by this same issue. . :-)

I have the same issue but when I go to the permission tab it wont let me choose anything. I think it has to do with....is that the files for xampp are on my main file system which is a non-writable file and anything on it cant be altered without super user powers.

can someone tell me how to make a file writable in non-writable main file????? I guess single it out somehow

I am running Ubuntu 9......whatever

I was trying to save a file in the XAMPP file and it wont let me!!!!!

thank u

waspinator
June 2nd, 2010, 01:12 PM
Hi,

I'm using Ubuntu 10.04 and XAMPP installed fine, and I can access the sample screen fine, but when I ran sudo
ln -s ~/projects/test /opt/lampp/htdocs/test


and try to access localhost/test I get


Access forbidden!
You don't have permission to access the requested object. It is either read-protected or not readable by the server.

in my error_log I get


[error] [client 127.0.0.1] Symbolic link not allowed or link target not accessible: /opt/lampp/htdocs/test


How do I change permissions so that I can access the link?


SOLVED:

Instead of using the command line to create the link, I right clicked on my test folder, selected "make link", and then copied it to /opt/lampp/htdocs

the command to create the link must be broken

walt11
June 25th, 2010, 07:07 PM
This is a how-to for setting up a web development environment easily. This guide will install the XAMPP lampp stack into /opt, setup an easy way to start it up and shut it down, and link a folder in your home directory to the webserver.
. . .

Location of files and uploading

XAMPP by default uses /opt/lampp/htdocs as the root web directory. The easiest way to start working on files is to link a folder in your home directory into this directory.
My user name is peter so I have /home/peter/public_html linked to /opt/lampp/htdocs/peter. So if I navigate to http://localhost/peter/ I get a listing of all the files/folders in that directory. (As long is there isn't a index.php/html/etc file)
To set this up, run in a terminal:

Make public_html directory in home directory:
mkdir ~/public_html
Link to /opt/lampp/htdocs
sudo ln -s ~/public_html /opt/lampp/htdocs/$USER

Now any files and folders you place in ~/public_html will be published to your personal webserver.

I've done this, and it works, but relative URLs to sub-folders are not working. E.g.,

href="Styles/docStyles4.css"

background-image:url('images/shore.jpg');Styles and images are sub-folders in my public_html folder, and they are evidently not found, since the styles and image are not used.
What must I do to get this to work?

Thanks

Added on 07-03-10:
Problem solved. It was not due to the link. I had some permission issues, and also relative URLs seem to work differently than I've encountered before. Instead of

href="Styles/docStyles4.css" I've had to use an address starting at the server root, htdocs:

href="/walt/Styles/docStyles4.css" where "walt" is my home directory (and the name of the link in htdocs).

syed.rakib.al.hasan
July 16th, 2010, 01:37 AM
this is a great tutorial on how to install XAMPP on Linux.
i have followed the steps mentioned here and XAMPP works fine.

nonetheless, anyone has an idea how to configure the XAMPP for using Joomla CMS.......
copy pasting the Joomla Files into the htdocs folder of XAMPP (like the way it's described for installing jommla on XAMPP in Windows) does not seem to work out.

PaulWhipp
July 16th, 2010, 02:04 AM
syed.rakib.al.hasan, you really don't need XAMPP on Ubuntu these days. It was great when apache, mysql and php needed lots of configuration and fiddling to get working but that has not been the case, at least since 8.04.

I develop using Joomla all the time and I've just installed apache2, mysql etc. straight from the repositories as per the instructions on the Ubuntu help guides (or elsewhere on this thread). It works out of the box and you can have as many joomla sites as you like in subfolders of your web root (either by copying the files, creating the database and user and editing the configuration.php appropriately or by doing the standard joomla installation).

walt11
July 16th, 2010, 04:00 AM
syed.rakib.al.hasan, I did use XAMPP, because it was so easy to install, and before I saw PaulWhipp's forum post. I've finally got Joomla working on it - after considerable effort (and much help from forums). Here's what worked for me.

I had to modify the php.ini file, and it's best to do that to begin with. You can find it in /opt/lampp/etc. I changed the line
error_reporting = E_ALL | E_STRICT to
error_reporting = E_ALL & ~E_STRICTI also changed the line
display_errors = On to
display_errors = Off(You have to call your editor from the command line using sudo to modify this file.)

Next, with the Joomla web install I ran into some serious errors, so I used the manual install. You can find a very good set of instructions for that at http://help.joomla.org/content/view/1944/302/. Be sure to install it WITHOUT filling in the $ftp_ variables in the configuration.php file (except set $ftp_enable = '0'). I tried using the ftp layer, and ran into innumerable problems. It works without it.

Once you complete the installation and have logged in as admin, choose Help > System Info > Directory Permissions. All the directories will probably show their status in red as Unwritable. At command level using sudo, you will need to change the owner of each of those directories to nobody. E.g.,

sudo chown -v nobody directoryname making sure you're located in the proper containing directory when you issue the command. After changing them, reload the current page in your browser, and they should now all show the status Writable in green. In the same way, change the owner of the file configuration.php to nobody. It's located in the directory in which you installed Joomla.

Hope that works for you.

suzenon
August 15th, 2010, 01:23 PM
does anybody know, how to make it psosible to create database? i've just installed xampp on my 10.4
but when i want to login as root in phpmyadmin i get

#1045 - Access denied for user 'root'@'localhost' (using password: YES)i've set up password in config.inc.php file
and if i log in with pma i can't create database, it says i have no privilege

any help please?

UPDATE

ok after struggling with this damn problem i've managed to get privileges to create mysql database
here's what i did

after failures with changing config files and so on i've just reinstalled xampp
just tar xzvf xampp* -C /opt
above replaced all previous files with default ones

after this i've started xamp for first time with lampp start

now what worked out
BEFORE using any "lampp security" script and BEFORE changing any passwords i've opened localhost, and clicked phpmyadmin
by default you can login with root without any password, just open phpmyadmin login page, make sure user is root and click GO without any password
then i went to privileges tab, i've added EVERYTHING to pma user

closed all webpages that had anything to do with xampp including phpmyadmin panel
now started xampp secruity script, wrote passwords
logged in as pma with my previously set password to phpmyadmin
privileges tab
and CREATED NEW user with privileges as pma
it can be done by clicking edit icon for account pma, scrolling down the page and using create new user option and just leave old one

now finally after i log in with new user i can create mysql databases...

what a hell...

LinLou
October 8th, 2010, 04:19 PM
okay.. all this is really good.. especially the first time i used it..

BUT, i cant make it work now.. the only way i have made it work is by running nautilus..

i have tried this "sudo ln -s ~/public_html /opt/lampp/htdocs/$USER" but the link that it creates is broken..

Can some one help me on this?

Thanks in advance.

PS: Once i make the link and i try to see the page ive made on firefox, i get an "Access Forbiden" warning..

what is that?

LinLou
October 8th, 2010, 04:38 PM
okay.. all this is really good.. especially the first time i used it..

BUT, i cant make it work now.. the only way i have made it work is by running nautilus..

i have tried this "sudo ln -s ~/public_html /opt/lampp/htdocs/$USER" but the link that it creates is broken..

Can some one help me on this?

Thanks in advance.

PS: Once i make the link and i try to see the page ive made on firefox, i get an "Access Forbiden" warning..

what is that?


Ok my fault..

If you guys want to link any file, where your html or php files are located, you have to do it like this..

" ln -s /home/$USER/foldername/ /opt/lampp/htdocs/$USER "

it worked prefect for me..

+ you do not have to create a new file.. you simply use the one you already have..

berlinblue
October 25th, 2010, 12:58 AM
If anyone keeps having trouble, maybe this tutorial (http://www.codetorment.com/2009/10/20/guide-install-xampp-on-ubuntu) could help you further.

It worked for me, with the following version code:


tar xvfz xampp-linux-1.7.3a.tar.gz -C /opt

Good luck!

PaulWhipp
October 25th, 2010, 01:11 AM
And remember that xampp is really pretty redundant considering how easily you can now install the stack directly to make a 'real' server (see earlier posts in this thread).

baffodoro
November 14th, 2010, 10:06 AM
So far this post has just under 200 views, So great. If you read this and use it could you leave a reply saying if it was useful/useless? I'd like to keep improving this how-to, so feedback would be good.

Plus, replies bump it up the list.

Hello,
I am just a newbie and I will make a newbie question: to start, how do I make sure i am in the right directory? (this is what you wrote at the veru beginning).
This because I downloaded xampp and entered terminal but the system said it couldn't find any such file in the directory.

Thank you

ps

sorry for my english

killboymota
December 8th, 2010, 09:25 PM
hey, thanks for your tutorial but this is not working for me.


Starting XAMPP for Linux 1.5.3a...
XAMPP: Starting Apache with SSL (and PHP5)...
XAMPP: Starting MySQL...
/opt/lampp/bin/mysql.server: 84: source: not found
XAMPP: Another FTP daemon is already running.
XAMPP for Linux started.
motz@motz-Aspire-5735:~$ /opt/lampp/bin/mysql.server: 334: log_success_msg: not found

cya

Godspell
December 28th, 2010, 05:51 PM
Hi there,

I followed your instructions using Xampp 1.7.3a on two of my laptops.

On one of my laptops, I cannot access the folder (where I keep ALL my html, php files) from Firefox address bar i.e. http://localhost/USER

I've already uninstalled and reinstalled everything but it still doesn't work.
It keeps saying
Access forbidden! You don't have permission to access the requested object. It is either read-protected or not readable by the server.
If you think this is a server error, please contact the webmaster (you@example.com).


It's even more frustrating that on the other laptop, it works straight away after creating the shortcut.

So, any idea on how to get around this???

Thank you.

Regards,
GS

Charlie78
May 22nd, 2011, 11:56 AM
Hello, when i try an install lampp/xampp ii keep getting this error when i try to access phpmyadmin:

#2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)

I've tried, removing it, reinstalling it, a couple of commands but nothing seems to be working! if anyone can help it would be highly appreciated.

fchartier
September 24th, 2011, 12:32 AM
Hi all
I am trying to make xamp work on ubuntu 11 to use joomla ultimately. I installed it, and i could load up the '' ''localhost / xamp '' page. but i could not access a web site locally constructed.
I don t know why, i taught that I had to reinstall apache2, mysql, php etc seperaly. which i did. and i removed them afterwards when i realised that xamp install everything. problem now i can start xamp but it says that everything is run by another application...
see below:

/opt/lampp/lampp start
Starting XAMPP for Linux 1.5.3a...
XAMPP: Another web server daemon is already running.
XAMPP: Another MySQL daemon is already running.
XAMPP: Another FTP daemon is already running.
XAMPP for Linux started.

now i dont know what to do...
thanks
f

davidw1957
October 8th, 2011, 09:52 PM
This is a how-to for setting up a web development environment easily. This guide will install the XAMPP lampp stack into /opt, setup an easy way to start it up and shut it down, and link a folder in your home directory to the webserver.

WARNING
This guide is aimed at a development environment only and should not be used as a public webserver. To setup a public webserver follow the directions on the Ubuntu wiki https://help.ubuntu.com/community/ApacheMySQLPHP

As this is Ubuntu, all the major parts of a typical web server are included (in the main repo, or on the Ubuntu Server CD) and this is a great way to setup a server. The ubuntu developers have prepared a great web server and have made the process as seemless as possible.

But what if even the official way is still to complicated? What if you just want a quick web server for development?

Fortunately there is the XAMPP project: http://www.apachefriends.org/en/xampp.html. The XAMPP project bundles Apache, PHP4 & 5, Perl, mySQL, and a bunch of other utilities/applications into an simple package for Mac OSX, Windows, Solaris, and Linux. Obviously this HOWTO only deals with the linux version.

For those of you with already existing Apache/mySQL/php installations it installs everything into /opt so it doesn't conflict with any other installation, and it is completely setup and ready to run.

Install XAMPP

Two easy steps:

Download the most recent version of XAMPP: (at time of writing 1.5.3a)
http://prdownloads.sourceforge.net/xampp/xampp-linux-1.5.3a.tar.gz?download
(Source URL: http://www.apachefriends.org/en/xampp-linux.html#374)
Extract the archive to /opt using sudo: (make sure you are in the directory that you downloaded the archive to)
sudo tar xvfz xampp-linux-1.5.3a.tar.gz -C /opt


Start XAMPP

To start it up, open a terminal and type this:

sudo /opt/lampp/lampp startStop XAMPP

To stop it, open a terminal and type this:

sudo /opt/lampp/lampp stopAdditional XAMPP commands

To see additional commands, open a terminal and type this:

sudo /opt/lampp/lamppSweet XAMPP Control Panel

http://img108.imageshack.us/img108/5647/screenshotxamppcontrolpanelfj6.png

To use the sweet gtk/python control panel:

Run in a terminal:
gedit ~/.local/share/applications/xampp-control-panel.desktopPaste the following into the open file and save and exit.

[Desktop Entry]
Comment=Start/Stop XAMPP
Name=XAMPP Control Panel
Exec=gksudo "python /opt/lampp/share/xampp-control-panel/xampp-control-panel.py"
Icon[en_CA]=/usr/share/icons/Tango/scalable/devices/network-wired.svg
Encoding=UTF-8
Terminal=false
Name[en_CA]=XAMPP Control Panel
Comment[en_CA]=Start/Stop XAMPP
Type=Application
Icon=/usr/share/icons/Tango/scalable/devices/network-wired.svg"XAMPP Control Panel" will show up in your applications menu under Internet. Use the Alacarte Menu Editor to move it around.

Test to see if XAMPP is running

Once XAMPP is up and running open firefox and go to: http://localhost/

You should see the XAMPP test page:

http://static.apachefriends.org/images/380.jpg

Location of files and uploading

XAMPP by default uses /opt/lampp/htdocs as the root web directory. The easiest way to start working on files is to link a folder in your home directory into this directory.
My user name is peter so I have /home/peter/public_html linked to /opt/lampp/htdocs/peter. So if I navigate to http://localhost/peter/ I get a listing of all the files/folders in that directory. (As long is there isn't a index.php/html/etc file)
To set this up, run in a terminal:

Make public_html directory in home directory:
mkdir ~/public_html
Link to /opt/lampp/htdocs
sudo ln -s ~/public_html /opt/lampp/htdocs/$USER

Now any files and folders you place in ~/public_html will be published to your personal webserver.

Bookmark http://localhost/username to make this easy to access.

WARNING - SECURITY
http://www.apachefriends.org/en/xampp-linux.html#381
Open holes:

The MySQL administrator (root) has no password.
The MySQL daemon is accessible via network.
ProFTPD uses the password "lampp" for user "nobody".
PhpMyAdmin is accessible via network.
Examples are accessible via network.
MySQL and Apache running under the same user (nobody).

This doesn't leave your whole system wide open, but someone could hack your XAMPP installation, so be wary.
To fix most of the security weaknesses open a terminal and run:
sudo /opt/lampp/lampp securityFeedback
Please read this post (http://www.ubuntuforums.org/showpost.php?p=1310039&postcount=5).

--------------------------------------------------------------------------------------------------------------------
Xampp and Ubuntu/Kubuntu/Xubuntu 11.04 have changed... but the Xampp installation is the same.

Make sure your config files are accurately configured

IMPORTANT FILES AND DIRECTORIES
/opt/lampp/bin/ The XAMPP commands home. /opt/lampp/bin/mysql calls for example the MySQL monitor.
/opt/lampp/htdocs/ The Apache DocumentRoot directory.
/opt/lampp/etc/httpd.conf The Apache configuration file.
/opt/lampp/etc/my.cnf The MySQL configuration file.
/opt/lampp/etc/php.ini The PHP configuration file.
/opt/lampp/etc/proftpd.conf The ProFTPD configuration file. (since 0.9.5)
/opt/lampp/phpmyadmin/config.inc.php The phpMyAdmin configuration file.
-------------------------------------------------------------------------------------------
To stop MySql already running
sudo /etc/init.d/mysql stop

To stop Apache already running
sudo /etc/init.d/apache2 stop

To start XAMPP simply call this command:
sudo /opt/lampp/lampp start

To stop XAMPP simply call this command:
sudo /opt/lampp/lampp stop

Download and use Filezilla to upload your web files to localhost

fchartier
October 8th, 2011, 10:03 PM
thanks it worked

brahmfrie
November 19th, 2011, 11:32 PM
I'm a first time participant in this forum. I just installed xampp or lampp since I'm in linux. I wanted to use the xampp control panel but was not able to install it. Is this because of the linux system? Is there a lampp control panel?

mick8985
November 25th, 2011, 01:42 AM
This thread is retarded.

sudo tasksel install lamp-server

Dragonbite
November 25th, 2011, 05:14 AM
This thread is retarded.

sudo tasksel install lamp-server

I'm sure with over 350 posts, some people found benefit in this thread. Not everybody wants to run the full-blown LAMP server directly on their system, and Xampp is a viable alternative.

jasonhotham
January 18th, 2012, 07:47 AM
Hi,

Assuming for personal use only.
I was able to setup using these easy steps:

Put archive on desktop or directory you can get access to.

1. on first line:
username@username:~$ sudo -s
[sudo] password for username:
'enter password'

2. Select desktop:
root@username:~# cd Desktop

3. Extract archive:
root@username:~# sudo tar xvfz xampp-linux-1.7.7.tar.gz -C /opt

4. Start lampp:
root@username:~# /opt/lampp/lampp start

5. Change ownership:
root@username:~# sudo chown -R username:username /opt/lampp

6. Change permissions:
root@username:~# chmod -R 755 /opt/lampp

7. Test file in browser after creating file in htdocs folder:
http://localhost/test/testing.html
(should display file)

8. Test directory to show listed files:
http://localhost/test/

9. Test permissions and default file using 'right click' on file 'rename':
rename file name 'testing.html' to 'index.html'

10. Any issues with the above and there's no other solution uninstall and try again :
root@username:~# rm -rf /opt/lampp

Resources:
* http://ubuntuforums.org/showthread.php?t=223410
* http://zorinlinux.cyacomputerblog.com/2011/01/16/watch-how-to-install-xampp-1-7-2-for-linux-ubuntu-9-04/
* http://kb.liquidweb.com/new-user-tutorial-basic-file-permissions/
* http://hiox.org/1763-stopping-and-uninstalling-xampp.php

Rugby2
March 28th, 2012, 08:19 PM
Excellent tutorial - had xampp up and running in no time! Thanks

dingd0ng
March 29th, 2012, 10:35 PM
Great post! Oddly, I never knew there was a GUI version for XAMPP! Thanks!

calydon
June 19th, 2012, 08:10 PM
update: I figured out I needed to manually create the applications folder. I'm not used to being unable to see hidden folders.

However XAMPP is not showing up under 'internet' in my applications folder. How do I reach the GUI control panel?


*******************]]

I'm trying to install the GUI control panel but when I try to create the .dekstop file I get an error.


To use the sweet gtk/python control panel:

Run in a terminal


gedit ~/.local/share/applications/xampp-control-panel.desktop

The error is: "Could not find the file /home/cal/.local/a...mpp-control-panel.desktop"

It's saying it can't find the file it's trying to save??

grollsta
June 24th, 2012, 07:04 PM
So far this post has just under 200 views, So great. If you read this and use it could you leave a reply saying if it was useful/useless? I'd like to keep improving this how-to, so feedback would be good.

Plus, replies bump it up the list.

This was pretty helpful thanks. I am struggling a bit still tho. I got xampp installed in /opt, but when I run the GUI admin you showed i can't get Mysql or Apache2 to start...

I had another instance of mysql and apache installed but i have stopped both of those manually at the command line...

any idea how to start up the /opt version of mysql and apache?

thanks in advance!

calydon
June 24th, 2012, 09:06 PM
For anyone else struggling to find the GUI panel it is under 'other' in the main app menu.

Thanks for this article.

Suncoaster
July 6th, 2012, 12:52 PM
Great tutorial, up and operational in next to no time. Thanks heaps.:guitar:

ItyImean
July 23rd, 2012, 11:55 PM
Good Tut, I love it. It help me so much.

Lektorvis
October 24th, 2012, 01:02 PM
For those who are having troubles with the Xampp control panel, try to update python-gtk2.
You can use Synaptic.

Dragonbite
October 24th, 2012, 02:49 PM
For those who are having troubles with the Xampp control panel, try to update python-gtk2.
You can use Synaptic.

Does the control panel include any means of handling their closing phpMyAdmin for security reasons?

glenndr15
December 27th, 2012, 05:15 AM
Try manual installation https://glenndr15.wordpress.com/xampp-installation-on-linux-mint-14-and-ubuntu-12-10-32bit64bit install Xampp on Ubuntu 12.10 32bit/64bit or Ubuntu web server 32bit/64bit :D

wanthai
February 12th, 2013, 01:38 PM
I don't think it is possible to create a soft link to a fat32 drive. I'm pretty sure its a ext2/3 only thing and cannot span different filesystems.

What you can do is change the "DocumentRoot" in the httpd.conf file for XAMPP.

Open a terminal:


sudo cp /opt/lampp/etc/httpd.conf /opt/lampp/etc/httpd.conf.backup
sudo gedit /opt/lampp/etc/httpd.conf
Now Scroll down to the line:

DocumentRoot "/opt/lampp/htdocs"and change it to point to your fat32 drive. (? "/media/fat32/" ?)

I'd suggest to point it only to a web subdirectory on the drive as serving up the root of the drive will put all of the files on it onto the webserver and allowing anyone to view them.

Changing this will make the fancy http://localhost/xampp test stuff stop working. (It is installed into /opt/lampp/htdocs/) Everything else should work.

Hope that helps.

Hi Peter ):P
Can use the same command if I as an example want to place my doc-root in / ?

/lamp/WWW/

is hwat I mean, like it is in Wamp under windows

tobiz
February 22nd, 2013, 01:40 PM
Very useful tutorial, got it up and running nearly first time, problems were mostly my fault!

mcondon
February 23rd, 2013, 01:34 AM
Everything seems to go fine until I try to start XAMPP. Then I get:

test-Dimension-8400 Downloads # sudo /opt/lampp/lampp start
Starting XAMPP for Linux 1.8.1...
XAMPP: Another web server daemon is already running.
XAMPP: XAMPP-MySQL is already running.
XAMPP: XAMPP-ProFTPD is already running.
XAMPP for Linux started.
Its seems like there may be another web server running? (I am new to Linux.....since yesterday. Just trying to get a developmental web server up and running.)

I noticed the other posts are a few years old. Is there somewhere else I should go for help on this?

Thanks

Ubucket
March 26th, 2013, 03:33 PM
Hi,

Assuming for personal use only.
I was able to setup using these easy steps:

Put archive on desktop or directory you can get access to.

1. on first line:
username@username:~$ sudo -s
[sudo] password for username:
'enter password'

2. Select desktop:
root@username:~# cd Desktop

3. Extract archive:
root@username:~# sudo tar xvfz xampp-linux-1.7.7.tar.gz -C /opt

4. Start lampp:
root@username:~# /opt/lampp/lampp start

5. Change ownership:
root@username:~# sudo chown -R username:username /opt/lampp

6. Change permissions:
root@username:~# chmod -R 755 /opt/lampp

7. Test file in browser after creating file in htdocs folder:
http://localhost/test/testing.html
(should display file)

8. Test directory to show listed files:
http://localhost/test/

9. Test permissions and default file using 'right click' on file 'rename':
rename file name 'testing.html' to 'index.html'

10. Any issues with the above and there's no other solution uninstall and try again :
root@username:~# rm -rf /opt/lampp

Resources:
* http://ubuntuforums.org/showthread.php?t=223410
* http://zorinlinux.cyacomputerblog.com/2011/01/16/watch-how-to-install-xampp-1-7-2-for-linux-ubuntu-9-04/
* http://kb.liquidweb.com/new-user-tutorial-basic-file-permissions/
* http://hiox.org/1763-stopping-and-uninstalling-xampp.php


Yes!!!

This did it for me!

PeterVK & Jasonhotham, if you were girls....

pragnesh89
April 8th, 2013, 03:15 AM
I am having troubles with the xampp control panel. I am using Ubuntu 12.10. When I go into dash, and click on xampp control panel, it asks me for the root password and then I enter it and nothing happens.

sensama
May 27th, 2013, 08:44 PM
Installing Wampp seems now very easy! Thank you.

Sensama
EeePC Xubuntu Wordpress

nishoba
June 6th, 2013, 05:32 PM
I am having troubles with the xampp control panel. I am using Ubuntu 12.10. When I go into dash, and click on xampp control panel, it asks me for the root password and then I enter it and nothing happens.

Try installing glade python with:

sudo apt-get install python-glade2

anumaz
April 15th, 2014, 02:58 AM
Apache doesn't start. Any clue?