Installing XAMPP on Ubuntu 20.04 And Setup Laravel Development Environment

 

Download the installation package

cd /home/[username]/Downloads

 

Make the installation package executable

sudo chmod 777 xampp-linux-*-installer.run

 

Launch the Setup Wizard

sudo ./[package name]

 

Start xampp control panel

sudo /opt/lampp/manager-linux-x64.run

 

Launch XAMPP through the Terminal

In order to launch XAMPP through your Ubuntu Terminal, enter the following command as root:

sudo /opt/lampp/lampp start

Launch XAMPP

This output shows that XAMPP is started and already running. Please note that you need to manually start XAMPP each time you restart your system.

If you get the following output after starting XAMPP, it means that Net Tools are not installed on your system:

Possible errors when starting XAMPP

In order to install Net Tools, run the following command as root:

sudo apt install net-tools

Installing net tools

After the installation of Net Tools, you will be successfully able to launch and use XAMPP.

 

Verify Installation

After you have installed XAMPP on your Ubuntu system, it is good practice to verify the installation. To do so, enter the following URL in your Firefox browser:

http://localhost
http://localhost/phpmyadmin

Find Installed PHP Version

sudo nano /opt/lampp/htdocs/info.php 
add <?php phpinfo(); ?>

http://localhost/info.php
 

Setup Laravel development environment 

sudo gedit /etc/environment

Now add this in the end of this file.

 :/opt/lamp/bin/php

Now link it by this command:

sudo ln -s /opt/lamp/bin/php /usr/local/bin/php

ln: failed to create symbolic link '/usr/bin/php': File exists

sudo rm /usr/bin/php 

then

ln -s /opt/lampp/bin/php /usr/bin/php 

again

sudo /opt/lampp/lampp start
 
More Info:- 
https://vitux.com/ubuntu-xampp/
https://siddharthshanker.com/blog/programming/setup-laravel-development-environment-in-linux/ 

Comments