Laravel
De Hegyd Doc.
(Différences entre les versions)
(→Installation nodejs et npm) |
(→Installation nodejs et npm) |
||
| Ligne 62 : | Ligne 62 : | ||
apt-get install -y nodejs | apt-get install -y nodejs | ||
</pre> | </pre> | ||
| - | |||
| - | |||
Il faudra forcer l'update de npm | Il faudra forcer l'update de npm | ||
Version du 29 juillet 2019 à 09:40
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 6 (Debian 7)
curl -sL https://deb.nodesource.com/setup_6.x | bash - apt-get install -y nodejs
NodeJS 8 (Debian 8 min)
curl -sL https://deb.nodesource.com/setup_8.x | bash - apt-get install -y nodejs
NodeJS 10 (Debian 8 min)
curl -sL https://deb.nodesource.com/setup_10.x | bash - apt-get install -y nodejs
NodeJS 12 (Debian 8 min)
curl -sL https://deb.nodesource.com/setup_12.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 optipng
apt-get remove optipng npm install --global optipng-bin
Source : https://github.com/imagemin/optipng-bin
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>
