Install and configure XAMPP

XAMPP is a set of programs that consists of web server, database, PHP interpreter, Phpmyadmin, and other tools designed for easy application development. Compared to other programs, it’s very easy to install and use. You need to download the installer from the official site, launch it, and after a few minutes your computer will be completely ready to develop web applications.

In this short article we will look at how to install XAMPP in Ubuntu 18.04, and the initial configuration of the program for more convenient work.

Install and configure XAMPP

1. Program download

The program is available for Windows, Linux, and MacOS, and you can download it on the official website. At the time of writing it has released version 7.3 with PHP. We are going to use.

Tab Download, find the version for Linux and download it.

2. XAMPP installation

Next you need to run the newly downloaded installer. By default, it is located in the folder ~/Downloads or ~/Downloads. First you need to add the installer flag enforcement:

chmod u+x ~/Downloads/

Then, run the installer as root:

sudo ~/Downloads/

Then you need to go through several steps of the installer, which is enough only to click Next:

After that, install XAMPP Linux will be completed and all program files will be located in the directory /opt/xampp.

3. Setup XAMPP

To manage installed services available through the terminal or with the graphical tool. To launch the graphical utility, by enabling the checkbox Launch XAMPP in the last window of the installation wizard.

Here, under Manage Servers, you can run a web server, database server and FTP server:

To run just click Start All. When the service is started, its status changes to runningand the icon turns green. Moreover, selecting any of the servers and clicking Config, you can configure it:

Here you can change the port, open the error logs and access, and open the configuration file and change all settings for the selected service:

But be careful here. One mistake in the configuration file and the service may not start. That’s all for the GUI.

4. Management of XAMPP through the terminal

In the terminal you can do the same, plus a few more features. To control utility use xampp:


Here are the main options:

  • start – start all servers;
  • startapache – start apache only;
  • startmysql – start only mysql;
  • startftp – only run ftp;
  • stop – stop everything;
  • stopapache – stop apache only;
  • stopmysql – stop only mysql;
  • stopftp – stop only ftp;
  • reload, reloadapache, reloadmysql, reloadftp – similar restart any of these services;
  • restart – stop and start XAMPP;
  • security – check the security settings of XAMPP;
  • enablessl to enable SSL in Apache;
  • disablessl – disable SSL in Apache;
  • panel to open the graphical configuration panel, with which we have worked in the first paragraph.

I recommend after installing the program, run the command security to change the basic default settings that will be unsafe:

sudo /opt/lampp/xampp security

The utility will disable the access to MySQL from the network, prompts you to set a password for Phpmyadmin, MySQL, and password for FTP. Then you can run all the servers if you haven’t already:

sudo /opt/lampp/xampp start

And to stop, use:

sudo /opt/lampp/xampp stop

To run the graphical panel, with which we have worked in the beginning, you can do:

sudo /opt/lampp/

5. Application deployment

You can check if everything is up and running, opening address http://localhost in your browser:

All the files of the web server are located in the directory /opt/lampp/htdocs/. You can delete everything that is there and the upload the files of your application or, for example WordPress.


In this small article we discussed how to install and configure XAMPP server in Ubuntu and other Linux distributions. Since this program is almost portable, then this manual should work for any distribution and even in some sense for Windows and MacOS. And it is much easier to install compared to the LAMP.


(Visited 108 times, 1 visits today)