In that installation guide i will carry you through all dependencies of Lumen 5.5 on a system with Ubuntu 17.04. I will also provide known issues, that come along the installation of Lumen.
Type in the commands beneath the required package and check if you have yet installed them. If not, click the link for installation guide.
php -v | grep -i php
php -i | grep -i openssl
Install OpenSSL Extension for PHP
Depending on your preferences you can choose for example MySQL, MariaDB or NoSQL. All of them provide the needed PHP Data Object (PDO).
php -i | grep -i pdo
If any extension cannot be found, install PDO Extension for PHP.
php -i | grep -i mbstring
If extension cannot be found, install Mbstring Extension for PHP.
php -i | grep -i xml
If extension cannot be found, install XML Extension for PHP.
Composer is used to manage dependencies. It is very common and will help you develope better software. Get to know which packages are popular on Packagist the PHP Package Repository.
You will download the installer file to your current directory, check the hash, install composer and remove that downloaded file. For detailed information please look on Composer's download guide.
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('SHA384', 'composer-setup.php') === '544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"
composer global require "laravel/lumen-installer"
To have lumen
beeing used as command line interface (CLI) you have to put Composer to your PATH
file. In most cases Composer is installed in ~/.composer
.
Open your ~/.bashrc
or ~/.profile
and add:
# Composer
export COMPOSER_HOME="$HOME/.composer"
export PATH="$COMPOSER_HOME/vendor/bin:$PATH"
lumen
Possible output:
Lumen Installer 1.0.2
Usage:
command [options] [arguments]
Options:
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Available commands:
help Displays help for a command
list Lists commands
new Create a new Lumen application.