| OfficeRay 1.2 For Webforms & Web Applications |
Xampp for Linux is a software for installing Apache, Mysql and Php in one location in Linux. Although most linux distros have their own methods for instaling the softwares, many users prefer to use Xampp.
With Xampp, the softwares are installed under "/opt" directory.
Download Xampp from Xampp for Linux homepage. There are many versions to download, to avoid confusion, I suggest to download the version I used for this tutorial which is:
xampp-linux-1.6.8a.tar.gz (59Mb)
![]() |
Place the software in your Home Folder. If you put in other location e.g. Desktop, the following guide might not work. |
![]() |
Open a terminal. |
![]() |
Extract Xampp: |
|
sudo tar xvfz xampp-linux-1.6.8a.tar.gz -C /opt |
|
![]() |
Xampp will be extracted to /opt/lampp directory and it might take a few minutes to complete. Note: the name of the directory is lampp, not xampp |
![]() |
Starting Xampp: sudo /opt/lampp/lampp start |
![]() |
Open Firefox browser and type: http://localhost If you can see the xampp logo like the picture (left) then your installation is successful. |
![]() |
The welcome screen for Xampp for Linux Installation is completed! |
|
Sometimes it is cumbersome to develop php application under "/opt/lampp/htdocs/" because of permission restriction or because of its location. It is a good idea to create a folder on the desktop (i use testweb as example) and link it to htdocs. Whenever you write php codes in testweb, it can be accessed by typing: http://localhost/testweb |
|
![]() |
First, create a folder on the desktop and name it testweb Then, open a terminal and type: |
| sudo ln -s ~/Desktop/testweb /opt/lampp/htdocs/testweb |
|
![]() |
Now whenever you typed: http://localhost/testweb, it will be linked to the testweb folder on the desktop. See left pic. |
|
Note: If you are happy to start Xampp manually everytime Ubuntu starts, then ignore the following steps. |
|
![]() |
Open a terminal and type: |
| sudo ln -s /opt/lampp/lampp /etc/rc2.d/S99lampp |
|
![]() |
Then restart your computer and Xampp will be started whenever ubuntu starts. |
Notes on Security
Most Xampp installation in linux is for development purpose. Usually your PC is already protected behind a NAT firewall of your DSL/Broadband modem or router. Internet users cannot access your PC, hence there is no need to worry about xampp security.
Once your php project is finished, it is usually transferred to a production server via FTP. The production server is usually a webhosting account from a webhosting company.
You might also interested in:-
Comments