Laravel

De Hegyd Doc.

Sommaire

Pré-requis Serveur PHP

Pour fonctionner correctement Laravel a besoin de PHP :

Version >= 5.5.9
Extension PDO
Extension Mbstring
Extension OpenSSL
Extension Tokenizer
Extension Zip

NB: ces extensions sont par défaut dans PHP 5.6 sous Debian 8

Sous PHP 7 :

apt-get install php7.0-zip php7.0-mbstring

Installation du driver natif mysql :

apt-get install php5-mysqlnd

Installation de composer

http://www.johnstyle.fr/composer-installation-sur-debian-7

Télécharger composer

apt-get update && apt-get install curl
curl -s https://getcomposer.org/installer | php

Déplacer composer dans le dossier /usr/local/bin/

mv composer.phar /usr/local/bin/composer

Composer est installé

composer --version

Installation nodejs et npm

Site de référence : https://github.com/nodesource/distributions

NodeJS 0.10

curl -sL https://deb.nodesource.com/setup | bash -
apt-get install -y nodejs
apt-get install npm


NodeJS 4

curl -sL https://deb.nodesource.com/setup_4.x | bash -
apt-get install -y nodejs

Il faudra forcer l'update de npm

npm -g install npm@latest

Installation bower et tig

npm install -g bower
apt-get install tig

Installation Mailcatcher

Réf : https://mailcatcher.me/

voir procédure sur serveur de fichier DRI

Installation d'un certificat auto-signé pour la preprod (si besoin)

openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout preprod.redlink.hegyd.net.key -out preprod.redlink.hegyd.net.crt

Ajout du vhost dans le fichier de conf apache :

<VirtualHost *:443>
        DocumentRoot /var/projects/redlink/preprod/public
        ServerName preprod.redlink.hegyd.net
        ServerAlias *.preprod.redlink.hegyd.net
        SetEnv APPLICATION_ENV preproduction
        SSLENgine On
        SSLCertificateFile  /etc/ssl/preprod.redlink.hegyd.net/preprod.redlink.hegyd.net.crt
        SSLCertificateKeyFile /etc/ssl/preprod.redlink.hegyd.net/preprod.redlink.hegyd.net.key

        Alias /media /var/projects/redlink/preprod/storage
        <directory /var/projects/redlink/preprod/storage>
            options indexes followsymlinks
            order allow,deny
            allow from all
        </directory>
</VirtualHost>