Sistemas Operacionais -> Ubuntu -> 11.04 -> Install XAMPP 1.7.4 in Ubuntu 11.04

Install XAMPP is a simple way to install Apache, PHP and MySQL. XAMPP is available for multiple operating systems such as Linux, Windows, Mac OS. Here is a simple way to install XAMPP:

  1. Download xampp 1.7.4 from here.
  2. Open a terminal and run the following command:
    sudo tar xvfz xampp-linux-1.7.4.tar.gz -C /opt
  3. After completion means that we have installed XAMPP in the directory / opt, so to run the xampp we can type the following command:
    sudo /opt/lampp/lampp start
    You should now see something like this on your screen:

    Starting XAMPP 1.7.4...
    LAMPP: Starting Apache...
    LAMPP: Starting MySQL...
    LAMPP started.

    Ready. Apache and MySQL are running.

Other command:

Stop XAMPP
sudo /opt/lampp/lampp stop

For additional commands
sudo /opt/lampp/lampp

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

Will go out the window, and type in the window

[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

In this installation, default htdocs located in root/opt, and to change something we must login as root. It’s uncomfortable.
Use this to bypass the login step as root.
Still in Terminal, type:
mkdir ~/public_html

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

now default htdocs is in ~/public_html