Loading...

Setup Linode - Part 10 Laravel

David Carr

1 min read - 3rd Nov, 2019

Table of Contents


 

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:
procopen(): 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
0 comments
Add a comment