HOWTO: Setup XAMPP in Ubuntu? Very easy !!
Just Two steps:
- Download the most recent version of XAMPP: (at time of writing 1.5.3a)
http://prdownloads.sourceforge.net/x...ar.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)
Code:
sudo tar xvfz xampp-linux-1.5.3a.tar.gz -C /opt
Start XAMPPTo start it up, open a terminal and type this:
Code:
sudo /opt/lampp/lampp start
Stop XAMPPTo stop it, open a terminal and type this:
Code:
sudo /opt/lampp/lampp stop
Additional XAMPP commandsTo see additional commands, open a terminal and type this:
Code:
sudo /opt/lampp/lampp
Sweet XAMPP Control Panel
To use the sweet gtk/python control panel:
Run in a terminal:
Code:
gedit ~/.local/share/applications/xampp-control-panel.desktop
Paste the following into the open file and save and exit.
Code:
[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 runningOnce XAMPP is up and running open firefox and go to:
http://localhost/You should see the XAMPP test page:
Location of files and uploadingXAMPP 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:
Code:
mkdir ~/public_html
- Link to /opt/lampp/htdocs
Code:
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 - SECURITYhttp://www.apachefriends.org/en/xampp-linux.html#381Open 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:
Code:
sudo /opt/lampp/lampp security