LINUX SERVER, WINDOWS

How to Install XAMPP on your Ubuntu 18.04 LTS System using terminal (Command Line)

Come on guys, we understand that XAMPP means cross-platform (X), Apache (A) server, MariaDB (M), PHP (P), and Perl (P). It is created by Apache Friends and basically acts as localhost or a local server. Through this local server, you can install this software on your system and test customers or your website before uploading it to a remote web server or computer. XAMPP is most widely known by Windows users, but the best thing here is that these are friends here, it is also the XAMPP package for Ubuntu Linux. In this article, we will describe step by step method to install this application stack on your system. You can then verify the installation using some URL. You can also go through the uninstall process which will help you in uninstalling the software if needed.

The commands and procedures described in this article are run on Ubuntu 18.04 LTS systems.

First of all, we’ll need to login to our Ubuntu 18.04 machine. As we’re going to install XAMPP stack in an Ubuntu 18.04 server, we’ll need to login through SSH which can be done using a terminal or putty if we’re using Windows as a client operating system. In a Linux or Unix machine, we’ll open a terminal and then run the following command to SSH into the Ubuntu server.

$ ec2-18-218-219-216.us-east-2.compute.amazonaws.com

the user and ec2-18-218-219-216.us-east-2.compute.amazonaws.com are respectively the username and IP address of the Ubuntu server that we are trying to access. Please change them according to the configuration of your system. Because we are using Amazon web server here

Once we login to the machine, we set the root password from the user here, then we will switch to sudo or root mode so that we can have full access to our machine and then we can do the further installation

$ su root
$ sudo -i
$passwd

Set new password for root user and again confirm password then login root user

Upgrading the system

Then we’ll now update the local repository index which keeps track of all the packages available for Ubuntu 18.04 LTS. We’ll need to run the following command in sudo or root access

# apt update      Once the package local repository has been updated
# apt upgrade

Downloading Bitnami XAMPP

our system is upgraded to the latest packages, we will now download the latest XAMPP from the official download page. Here, we will download the latest XAMPP stack i.e. version 7.1.1 which includes Apache 2.4, MariaDB 10.1, Perl 5.16, ProFTPD 1.3, PHP 7.1.1, phpMyAdmin 4.7 and its required modules. The download can be done using any web browser and then it can be uploaded to the Ubuntu 16.04 server, but here, we will download from the terminal using the download link that we got from the download page. To download the file, we are using the wget command line file downloader.

# wget https://www.apachefriends.org/xampp-files/8.0.7/xampp-linux-x64-8.0.7-0-installer.run

After the download has completed, we’ll need to make the downloaded file executable so that we can execute it and install the binary of XAMPP

# chmod +x xampp-linux-x64-8.0.7-0-installer.run

Installing XAMPP server

If everything above is done as expected, we’ll now be able to install it by running the executable binary installer. To run the executable .run file, we’ll need to run the following command in terminal

# ./xampp-linux-x64-8.0.7-0-installer.run

Not

Here we can tell you that I have CUI Interface. If you have X11forwarding enabled in the ssh server, you can welcome with the Bitnami GUI installer, but as it is disabled in our server, here We’ll just move forward with the CUI installer. Here, we are asked with some questions about how we want to set up our stack, we will just hit the entry to proceed with the default options.

Managing the services

Now, as you have successfully installed the XAMPP server here, now we will learn how we can manage all the services of the server.

Starting

In order to start all the xampp services, we need to run the following command in the terminal

# /opt/lampp/xampp start
# /opt/lampp/xampp startapache

Start Proftpd FTP server only

# /opt/lampp/xampp startftp

Not :- Star All Service Only On command

# /opt/lampp/lampp start

Stopping

To stop all the xampp services, we need to run the following command

# /opt/lampp/xampp stop

To stop Apache only

# /opt/lampp/xampp stopapache

To stop Proftpd FTP server only

# /opt/lampp/xampp stopftp

To stop MySQL Database server only

# /opt/lampp/xampp stopmysql

Restarting

And in order to restart all the lampp services, we need to run the following command in our terminal

# /opt/lampp/lampp restart

Uninstalling XAMPP SERVER

if we’re done with the xampp server and wanna uninstall it, we’ll need to run the following command in sudo or root mode

# /opt/lampp/uninstall

Once the above command is executed, we will be asked if we want to uninstall XAMPP from all its modules where we will press y and enter to uninstall it. Then xampp server will be removed from our system

Leave a Reply

Your email address will not be published. Required fields are marked *