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:
- Download xampp 1.7.4 from here.
- Open a terminal and run the following command:
sudo tar xvfz xampp-linux-1.7.4.tar.gz -C /opt
- 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 XAMPPsudo /opt/lampp/lampp stop
For additional commandssudo /opt/lampp/lampp
To make XAMPP control panelgedit ~/.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
Thensudo ln -s ~/public_html /opt/lampp/htdocs/$USER
now default htdocs is in ~/public_html