How to make a raspberry pi 2 laravel 5.1 server

I want to build a laravel 5.1 server on raspberry pi 2. But I cannot find any information on how to do this. Any suggestions to be really appreciated.

+3


source to share


4 answers


OK, I'm in the process. I found a few things worth noting:

1) Composer is not on Debian and is not extensible on Raspbian. You will need to download and install it manually.

I followed this guide: http://www.bravo-kernel.com/2014/08/how-to-install-composer-on-debian/ However, it tells you to install in / usr / bin which is bad. Install to / user / local / bin / instead (still in your default path.

2) Debian Wheezy, the Raspbian distribution that comes with the Pi does not support PHP> = 5.5.9, so the attempt to run artisan failed. To do this, you need to upgrade to Jessie.



To do this, I opened my /etc/apt/sources.list and changed all Wheezy occurrences to Jessie. Then:

apt-get update
apt-get dist-upgrade
apt-get autoremove

      

Or google - any guide on how to update wheezy for Jessie for Raspbian

I still don't successfully start the Laravel dev server, but I really liked it.

+3


source


Here's what I did (on RASPBIAN JESSIE):

Installed apache / php5.6 / mysql (from: https://www.howtoforge.com/tutorial/install-apache-with-php-and-mysql-lamp-on-debian-jessie/ ) - * install mysql-server mysql-client *

Got composer

sudo curl -sS https://getcomposer.org/installer | sudo php5

      



follow regular steps like moving composer to bin ... add to $ PATH ...

composer create-project laravel/laravel --prefer-dist projectName

      

And finally, the ownership of / var / www / to the Apache user (www-data) and the permissions of the application folder have changed

sudo chown -R www-data:www-data /var/www/
sudo chmod -R 775 projectName

      

+2


source


Install the raspbian distribution and then just follow any webserver's guide for debian (just make sure you install and enable all the required PHP extensions listed in the install part of the laravel doc) If there is no compositing package for pi you will have to prepare the project on your main PC and then download it to pi

+1


source


I was able to get Lumen running on a Raspberry Pi B +, so I assume Laravel will be possible too.

As athenin mentioned, you need to update your sources.list to jessie by running the update and update commands to bring everything up to speed.

Then I used this command:

apt-get install mysql-server mysql-client apache2 php5 php5-cli libapache2-mod-php5 php5-mysql php5-curl php5-gd php-pear php5-imagick php5-mcrypt php5-memcache php5-mhash php5-sqlite php5-xmlrpc php5-xsl php5-json php5-dev libpcre3-dev

      

to install the LAMP stack.

Credit to this site: http://snippets.khromov.se/debian-lamp-stack-in-one-command/

You can't use composer right now, so all your development must be on another computer and move it to a Raspberry Pi FTP server (e.g. (S)).

0


source







All Articles