in Code name: Ant-man, Laravel, Software Development

Setup Laravel 5.6 Development Environment on Xubuntu 18.04

There are quite a number of components needed to setup a proper Laravel development environment on Xubuntu. And, I am tired of Googling around for each and every components. Hence, the birth of this article for my own reference. Use it at your own risk although your computer won’t explode 🙂

First, install the fundamental components, such as git and curl

$ sudo apt install git curl

Then, install the mighty package management system for PHP – composer. Initially, I was planning to install PHP CLI manually then install composer as per the instructions from the website. But then this is not necessary anymore! Just simply type in the following commands will do:-

$ sudo apt install composer

* The above will install PHP CLI 7.2.7 automatically as well

Still need a few more items to complement PHP for composer.

$ sudo apt install php-mbstring php-xml php-zip php-intl php-soap php-xdebug php-mysql
$ sudo apt install php7.2-mbstring php7.2-xml php7.2-zip php7.2-intl php7.2-soap

Next, install XAMPP by going to to download the latest XAMPP for Linux 7.2.7 (64-bit).

$ chmod 755
$ sudo ./

And then, just click “Next” on the screens pop-up and your XAMPP will be installed into /opt/lampp.

There are 2 ways to start/stop the XAMPP services:-

  1. Via command line
    $ sudo /opt/lampp/lampp start
    $ sudo /opt/lampp/lampp stop
  2. Via graphical tool
    $ cd /opt/lampp/
    $ sudo ./

You should be able to see the following page by now when you launch your favorite browser.

Next, I will install PhpStorm because I need a full IDE

$ sudo snap install phpstorm --classic

Finally, we arrived at the Laravel portion.

But, we will face permission issue when we try to deploy Laravel projects into the /opt/lampp/htdocs folder/directory.

We need to change the ownership for /opt/lampp/htdocs folder/directory

$ sudo chown -R [Username]:[Group Name] /opt/lampp/htdocs

Replace the [Username] and [Group Name] with your own account.

Then, edit the Apache configuration file at /opt/lampp/etc/httpd.conf and look for the “User daemon” line

Again, replace the [Username] and [Group Name] with your own account.

Restart all XAMPP services and you are done!

* Local wildcard DNS resolution


Write a Comment


This site uses Akismet to reduce spam. Learn how your comment data is processed.