Skip to main content

Install XAMPP on Ubuntu/Linux (Beginners guide)

Hi fellow developers. If you are a web developer you will definitely need a local server in your computer to test and debug your code. There are lot of server applications ever operating systems which provides various features when it comes to server configuration.

Apache is one of the most popular server platform. But only the server is not enough you will need to install a database application, email servers and much more counterparts in order to get started which might be quite frustrating. To resolve this there are pre-packed server applications like XAMMP, WAMP, EasyPHP etc. Mine favorite is XAMPP but no special reason.

So here's how you install XAMPP on linux based OS/Lubuntu in my case.

Step 1: Download XAMPP

You can download the official XAMPP following below link.
https://www.apachefriends.org/download.html


Step 2: Installation

Open the location where the downloaded file is exists by using terminal, if my downloaded file exists in Downloads directory. e.g: cd /$HOME/Downloads

Give permissions to that file using command:
chmod +x xampp-linux-x64-7.0.9-1-installer.run

Run the file using command:
sudo ./xampp-linux-x64-7.0.9-1-installer.run

That's it. Now if you open your browser and navigate to localhost or 127.0.0.1 you may see that xampp has successfully installed.

Additional Info

To stop the XAMPP server use bellow command:
sudo /opt/lampp/lampp stop

To start the server:
sudo /opt/lampp/lampp start

To auto-start XAMPP when computer turns on edit rc.local file using below command:
sudo nano /etc/rc.local

Before the line "exit 0" you may add "/opt/lampp/lampp start" as follows

#! /bin/ bash
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure que the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
/opt/lampp/lampp start
exit 0

To set passwords use below command
sudo /opt/lampp/lampp security


Comments

Popular posts from this blog

Stating off with Git & Bitbucket on Linux (Beginners guide)

Okay! It has been few years since I started on software development. Which I started off with Java. Since most of the projects were only handled by myself there wasn't much of a need in version control system. But since now I have started working on my projects under my tech startup "Eno8" things got bit complicated. So I did a research on version control. All thanks must go to my good colleague Ruwan Ranganath for pointing me where to start. Turns out that Github is one of the best cloud version control platforms available. But there is one major problem. All the codes published in Github are totally public, But they have a payable scheme for free projects which is not the perfect scenario for me as I'm looking to reduce my expenses in all possible ways. Then I found Bitbucket which is a great platform offers to host free private projects with up-to 5 collaborators. This was the best solution for me. They offer both de-centralized version control systems which ...