In this article we’ll setup Laravel development environment in MX Linux. But why MX Linux? The simple answer is: ‘It works’. If you happen to visit distrowatch.org then you’ll get yet another reason: ‘It tops’ the good ole chart. Believe me I’ve tested and used dozens of Linux distros but MX Linux really shines as a reliable, lightweight and hassle-free OS with all the typical OS aesthetics. So, what’s the catch? MX Linux is meant for general purpose usage – for the people who were comfortable with Windows XP or Windows 7. Therefore, by design it’s not targeted towards developers or server deployments. Thing is that, once you start using MX Linux, you’d desire to retain it as your daily driver. And that’s where you may face some problems as a developer e.g. online forums are riddled with how MySQL can prove to be tricky to install and run on MX Linux.
In this article and in the next one we’ll explore couple of ways how we can setup our MX Linux box as Laravel development environment.
The easy and quick way to setup is to install a bundled server software and the best one is Bitnami LAMP stack installer. Click the given link and you’ll be on following download page:

Scroll down a bit for download links:

The latest one is version 8 which can be downloaded from clicking the link given there. I recommend downloading at least LAMP 7.4 as it contains PHP 7.4 which is the last major iteration of PHP 7 with enterprise grade stability and rock solid support for Laravel 8 based app development.
Before downloading, the site will ask for login; you may use your preferred way of login e.g. using Google account. Then you’ll see the following screen and the installer will start to download;

After the installer is downloaded, open the Terminal and go to the folder (most probably ~/Downloads) where the file is downloaded. Alternatively, open File Manager, right click on the ‘Downloads’ folder and click ‘Open Terminal Here’;
Now run following command to make the downloaded installer executable:
chmod +x bitnami*
Also make sure that you have libncurses5 library installed which is required by MariaDB. If not already installed then run the following command:
sudo apt install libncurses5
Now, execute the following command to start the installer:
./bitnami*
You may uncheck all optional frameworks as pictured below:

Next, mention the directory where LAMP server will be installed; I’d say keep it simple as ‘lamp’ as pictured below:

Next, you must mention root password as pictured below:

Next, uncheck the cloud deployment as pictured below:

Next, let the installation finish:

At the end, uncheck the Launch of LAMP stack:

In order to put PHP and MariaDB executables on system path, run following command at the home directory:
featherpad ~/.bashrc
At the end of the file, insert following line (of course, replace ‘sohail’ with your user directory name):
export PATH="/home/sohail/lamp/mariadb/bin:/home/sohail/lamp/php/bin:$PATH"
Save and close .bashrc file. Exit Terminal and then reopen Terminal. Now, php, mysql, composer commands are available at the command prompt. And you can create Laravel 8 project by entering following command:
composer create-project laravel/laravel myapp
You will have to change .env file in myapp directory as follows in order to use MariaDB in your Laravel 8 app:
DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=root
DB_PASSWORD=the-password-you-set-at-the-time-of-bitnami-lamp-installation
Finally, you will create a database named ‘laravel’ in MariaDB. First enter the following command:
mysql -u root -p
Now, enter the root password you set at the time of Bitnami LAMP installation. Once in mysql client, enter following command to create new database:
create database laravel;
Type exit to quite mysql client. You are set to develop your Laravel app with MariaDB at the backend.
Bonus instructions:
There is a GUI utility for LAMP server management which can be started by entering following command in ‘lamp’ directory:
./manager-linux-x64.run
Down the road, you’ll be needing node.js too. So, install it by using a node version manager like n. To install n along with the latest node.js LTS version enter the following command:
curl -L https://git.io/n-install | bash -s -- -y
This will create n directory in your home directory and install n and latest node.js LTS version there. In order to make executable available system-wide, again change the .bashrc file as follows;
featherpad ~/.bashrc
At the end of the file, insert following line (of course, replace ‘sohail’ with your user directory name):
export PATH="/home/sohail/n/bin:$PATH"
Save and close .bashrc file. Exit Terminal and then reopen Terminal. Now, n, node, npm commands are available at the command prompt.
You can always uninstall n by executing n-uninstall or update it using n-update.
1 thought on “Laravel 8 development setup in MX Linux”