Set up a Laravel developement environment in Ubuntu 17.10
One of the things I've always wanted to improve was my knowledge of Unix/Linux. I've been using Apple laptops over the last years but I never really dived deep into it as OS X is very easy to use. I recently bought a new PC and learnt to dislike Windows10 (Cortana, system updates that takes ages, random applications installed...) day after day for some weeks before I decided to make a partition and install Ubuntu.
The installation is very simple. I just had to resize my partitions in Windows and make a new one for Ubuntu. Then, download Ubuntu from the official website and create a bootable USB drive. Once booted into Ubuntu you can install it following a very simple wizard (next, next next...).
In my case I had to fix a couple of small issues with my laptop (Razer Blade Stealth) but luckily for me I found a Github project where a user had grouped the most common issues with this model and how to fix them (thanks @rolandguelle !).
With a fresh install I followed this guide I found on Hacker Noon by Youssouf El Azizi. It's very accurate, easy to follow and details how to install GIT, Apache, PHP, MySQL and Composer, basically all you need to run Laravel. I'd just add a couple of things:
Install Laravel globally in the system and add it to your PATH:
$composer global require "laravel/installer" $export PATH="$PATH:$HOME/.composer/vendor/bin"
Once installed globally you can use the command "laravel new myApp" to create a new application from any directory. To run your application you can start a server from the application directory with "php artisan serve" and then access to in in your browser opening
To code I installed Atom and VSCode. Both of them have extensions for Laravel and Emmet which has snippets to write HTML code a lot faster. To manage my code I use GIT and upload my repositories in GitHub or GitLab.
To manage databases, I installed DBeaver Community Edition. You can download it here. It has a nice interface and allows you to import and export both your databases and the data, which is pretty useful when deploying to production or doing migrations.
If I need to upload any files to my servers via FTP, I use FileZilla. You can install it from the Ubuntu official software repository or download from its website. You can find a step by step guide to deploy Laravel 5 applications in this article.
And that's it. These are the basic programs I use on a daily basis. I've been using (and enjoying) this setup for the last couple of weeks with zero problems. I'll try to keep this article updated with new programs and tips.
If you enjoyed this article consider sharing it on social media or buying me a coffee ✌️
Oh! and don't forget to follow me on Twitter where I share tons of dev tips 🤙
Other articles that might help you
Apart from writing articles in this blog, I spent most of my time working on my personal projects.
Quicktalks is a place where indie hackers, makers, creators and entrepreneurs share their knowledge, ideas, lessons learned, failures and tactics they use to build successfull online products and businesses. It'll contain recorded short interviews with indie makers.Message me to be part of it