How to install XAMPP on Ubuntu 18.04




In this post we will see How to install XAMPP in Ubuntu 18.04 LTS.

Step 1 :
Open the link https://www.apachefriends.org/download.html in your favorite browser and download the latest version of LAMPP software that you want for Ubuntu Linux.

download apache Xampp file

download file

STEP 2. Open your Terminal and Change directory to the Downloads folder (by default it downloads into the Downloads folder)

$ cd Downloads

STEP 3. Change the execution rights if the installation file, So we can run it as executable file. Execute this command

sudo chmod +x xampp-linux-x64-7.2.3-0-installer.run

Note : The version of XAMPP you’ll download might be different, so change the version in this command accordingly.

For above command to run you have to provide your system’s password

STEP4 .

Run the installer, but don’t close the Terminal.

$ sudo ./xampp-linux-x64-7.2.3-0-installer.run

A installation set up dialog box will open. In the dialog box, click next(for each step) and move through the process of installation. Once XAMPP is installed, click finish.

xampp install 1

Click Next !

xampp install 2

Click Next !

xampp install 3

Click Next !

xampp install 4

Click Next !

xampp install 5

Click Finish!

xampp install finish

This will launch the Xampp control panel like shown below. Here Click “Manage servers“.

xampp control panel

Now start all three services by pressing start all button.

start all services

You can also use the commands below to run the Xampp control panel.

  • If you use a 64-bit system:
    sudo /opt/lampp/manager-linux-x64.run

Once all Apache server is running .  You can use the URL http://localhost/dashboard to open the Dashboard.

apache dashboard

You can also verify if phpmyadmin is running by opening the URL http://localhost/phpmyadmin.

apache phpmyadmin

Now Lets try to run some PHP code using our Apache server. For that you need to create a php file in the htdocs directory of Xampp. htdocs is generally located in /opt/lampp/htdocs/. Create a php file with the name myphp.php with the following code:

<?php
echo "Hello world!";
?>

Now we will change the permission of the files in htdocs using the following command

sudo chmod +x -R /opt/lampp/htdocs/

Now open the URL http://localhost/myphp.php. You will see Hello World printed on your browser.

php hello world

Thats it.

Some More helpful commands

  1. To set a password, type
    ./lampp security
    

    Press y + Enter. Then enter a new password and re-enter this password again to confirm.

  2. Start XAMPP
    ./xampp start
    
    

    Type exit(Enter) to exit the SuperUser

  3. To start XAMPP, execute this command
    sudo /opt/lampp/lampp start
    
    
  4. To stop XAMPP, execute this command
    sudo /opt/lampp/lampp stop
    
    

     

Video Instructions


Partner Sites

VideoToGifs.com

EasyOnlineConverter.com

SqliteTutorials.com





1 Comment

  1. Could you please finish the tutorial? I got a GUI installer, then I clicked on “Finish” and got a GUI program. Then I booted up the next day and couldn’t find an icon anywhere. None of the instructions I find help, since my system can’t install gksu or gksudo. If me being frustrated about this is a problem, then take it out on the makers of XAMPP. Its becoming a fad to not include launch icons for GUI programs with GUI installers. Frickin ridiculous.

Leave a Reply

Your email address will not be published.


*