Setup Linode - Part 10 Laravel

David Carr

Development VPS Tutorials Linode

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:
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
Laravel Modules Your Logo Your Logo Your Logo

Become a sponsor

Help support the blog so that I can continue creating new content!

Sponsor

My Latest Book

Modular Laravel Book - Laravel: The Modular way

Learn how to build modular applications with Laravel Find out more

Subscribe to my newsletter

Subscribe and get my books and product announcements.

Fathom Analytics $10 discount on your first invoice using this link

© 2006 - 2024 DC Blog. All code MIT license. All rights reserved.