Ansible Playbook for Laravel on Ubuntu to install a couple applications and dependencies that you may need to start development with Laravel.
Install ansible
and make
in your system.
sudo apt -y install ansible make
Then run the make command to set up the machine.
make setup # Provision laravel development environemnt.
Install vagrant
and virtualbox
in your system.
sudo apt -y install vagrant virtualbox
To configure a ubuntu virtual machine with vagrant use the commands below.
make copy # Copy vagrant environment variables template.
make install # Install vagrant plugins.
make up # Create vagrant ubuntu virtual machine for testing.
make provision # Provision vagrant ubuntu virtual machine.
make ssh # SSH into vagrant ubuntu virtual machine.
make destroy # Destroy vagrant ubuntu virtual machine.
- Open settings on vscode (ctrl+,), then add MesloLGS NF to the
editor font family
list and save. - Open settings on vscode (ctrl+,), then search for
terminal integrated font family
and change to MesloLGS NF and save.
To install and uninstall WSL use the commands below. Open PowerShell with elevated credentials.
dism /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
wsl --install
wsl --update
wsl --set-default-version 2
To install a wsl distribution use the commands below. Open PowerShell with elevated credentials.
wsl -l -o # List all wsl distro availables.
wsl --install ubuntu-22.04 # Install wsl ubuntu 22.04.
wsl --unregister ubuntu-22.04 # Uninstall wsl ubuntu 22.04.
You may use the aliases www
, phpunit
, and artisan
.
- www -
cd ~/www
- phpunit -
php ./vendor/phpunit/phpunit/phpunit
- artisan -
php artisan
Linux assumes that the time is stored in UTC and Windows uses the local timezone, because the timezone is stored in the BIOS settings happens that when the computer boots on windows or linux it messes up the timezone settings.
# Enable local RTC.
timedatectl set-local-rtc 1 --adjust-system-clock
# Check current settings.
timedatectl
If RTC is enable it's setup