The Composer is a dependency manager for PHP. It will manage the dependencies that you require in your project. This means that Composer will pull in all the required libraries, dependencies and manage them all in one place. It will help you install and update the libraries. It installs the libraries in the specific project you want to work on.
Installing Composer
It’s really easy to install composer, It doesn’t matter system root user to install composer. but Yes you need command-line access ( SSH access ) to your system or server to install composer.
To set up the composer, login into your server & run following commands :
curl -s https://getcomposer.org/installer | php
This will create a file “composer.phar” file
Now move this to system’s bin folder so that every user can access it
sudo mv composer.phar /usr/local/bin/composer
Note: if you do not have permission than move to local user’s bin directory by
mkdir -p ~/bin ; mv composer.phar ~/bin/composer
now you are ready to use composer
emizentech@devserver:~$ composer
______
/ ____/___ ____ ___ ____ ____ ________ _____
/ / / __ \/ __ `__ \/ __ \/ __ \/ ___/ _ \/ ___/
/ /___/ /_/ / / / / / / /_/ / /_/ (__ ) __/ /
\____/\____/_/ /_/ /_/ .___/\____/____/\___/_/
/_/
Composer version 1.6.3 2018-01-31 16:28:17
Usage:
command [options] [arguments]