- Part 1 LAMP
- Part 2 Users
- Part 3 Upgrade PHP to 7.3
- Part 4 Apache Enable Mod rewrite
- Part 5 Composer
- Part 6 Virtual Hosts
- Part 7 Let's Encrypt
- Part 8 MySQL
- Part 9 Remote MySQL over SSH
- Part 10 Laravel
The following steps are needed for running Laravel on Linode.
Before you install Laravel, decide where you're going to install it. If you are setting up a site that already has a virtual host seup then simply remove the folder from /var/www
sudo rm -rf foldername
This allows you to create the folder as part of the installation.
Installing Laravel
composer create-project --prefer-dist laravel/laravel foldername
If you get the error:
proc_open(): fork failed - Cannot allocate memory_
A swap file is needed run this on the root:
sudo fallocate -l 2G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
cd into the laravel folder and change permissions by running:
sudo chgrp -R www-data storage bootstrap/cache
sudo chmod -R ug+rwx storage bootstrap/cache