Install Laravel
Environment
- Debian 9.7 x64
- PHP 7.1.29-1+0~20190503101539.18+stretch~1.gbp946c98 (built: May 3 2019 10:15:39)
- Composer 1.8.5
- Laravel Framework 5.8.17
Excerpt https://laravel.com/docs/5.5#installing-laravel
Pre-requisite
Log 2019 / 05
1. Install laravel
root@athos:~# apt-get update && apt-get -y upgrade && apt-get -y dist-upgrade
apt-get -y --no-install-recommends install unzip \
php7.1-zip php7.1-mbstring php7.1-xml
root@athos:~# apt-get -y --no-install-recommends install unzip \
> php7.1-zip php7.1-mbstring php7.1-xml
root@athos:~# composer global require "laravel/installer"
Changed current directory to /root/.config/composer
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Using version ^2.1 for laravel/installer
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 12 installs, 0 updates, 0 removals
- Installing symfony/process (v4.2.8): Downloading (100%)
- Installing symfony/polyfill-ctype (v1.11.0): Downloading (100%)
- Installing symfony/filesystem (v4.2.8): Downloading (100%)
- Installing symfony/polyfill-mbstring (v1.11.0): Downloading (100%)
- Installing symfony/contracts (v1.1.0): Downloading (100%)
- Installing symfony/console (v4.2.8): Downloading (100%)
- Installing guzzlehttp/promises (v1.3.1): Downloading (100%)
- Installing ralouphie/getallheaders (2.0.5): Downloading (100%)
- Installing psr/http-message (1.0.1): Downloading (100%)
- Installing guzzlehttp/psr7 (1.5.2): Downloading (100%)
- Installing guzzlehttp/guzzle (6.3.3): Downloading (100%)
- Installing laravel/installer (v2.1.0): Downloading (100%)
symfony/polyfill-mbstring suggests installing ext-mbstring (For best performance)
symfony/contracts suggests installing psr/cache (When using the Cache contracts)
symfony/contracts suggests installing psr/container (When using the Service contracts)
symfony/contracts suggests installing symfony/cache-contracts-implementation
symfony/contracts suggests installing symfony/event-dispatcher-implementation
symfony/contracts suggests installing symfony/http-client-contracts-implementation
symfony/contracts suggests installing symfony/service-contracts-implementation
symfony/contracts suggests installing symfony/translation-contracts-implementation
symfony/console suggests installing symfony/event-dispatcher
symfony/console suggests installing symfony/lock
symfony/console suggests installing psr/log (For using the console logger)
guzzlehttp/guzzle suggests installing psr/log (Required for using the Log middleware)
Writing lock file
Generating autoload files
root@athos:~# ls -lF .config/composer/vendor/bin
total 0
lrwxrwxrwx 1 root root 28 May 21 11:13 laravel -> ../laravel/installer/laravel*
root@athos:~# $HOME/.config/composer/vendor/bin/laravel --version
Laravel Installer 2.1.0
2. Configure Path
root@athos:~# echo export PATH="$PATH:$HOME/.config/composer/vendor/bin" >> ~/.bashrc
root@athos:~# source ~/.bashrc
3. Crafting
root@athos:~# laravel new alpha
Crafting application...
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Package operations: 76 installs, 0 updates, 0 removals
- Installing doctrine/inflector (v1.3.0): Downloading (100%)
- Installing doctrine/lexer (v1.0.1): Downloading (100%)
- Installing dragonmantank/cron-expression (v2.3.0): Downloading (100%)
- Installing erusev/parsedown (1.7.3): Downloading (100%)
(truncated)
root@athos:~# cd alpha/
root@athos:~/alpha# php artisan --version
Laravel Framework 5.8.17
root@athos:~/alpha# php artisan serve --host=0.0.0.0
Laravel development server started: <http://0.0.0.0:8000>