Installing Composer on your Server

Composer is an application-level package manager for PHP. It provides dependencies and libraries for your PHP software.

In this article, I will help you to install the composer on CentOS 7/8.

  1. Ensure that PHP and wget is installed on your system
  2. Download the composer installer script using the below command.

sudo wget https://getcomposer.org/installer -O composer-installer.php

     3. Run the following command to install Composer in the /usr/bin directory.

sudo php composer-installer.php --filename=composer --install-dir=/usr/bin

     4. Verify the installation by typing the below command

composer --version

  Note: To upgrade your composer version, use the below command.

composer self-update

Facebook Comments