Setup Linode - Part 10 Laravel

Linode | VPS | Tutorials | Development

David Carr

Setup Linode - 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
The Ultimate Managed Hosting Platform

Support my work by donating with PayPal.

Subscribe to my newsletter

Subscribe and get my books and product announcements.

© 2009 - 2022 DC Blog. All code MIT license. All rights reserved.