Javatpoint Logo
Javatpoint Logo

How to Install Composer on CentOS

Introduction

Composer is an application package manager for PHP. It provides a standard format for dependencies management of PHP software and required libraries. It was developed by Nils Adermann and Jordi Boganiano. It was released on March 1, 2012. In this tutorial, we will learn the installation process of Composer on CentOS.

Prerequisites

  • CentOS
  • PHP
  • Login as an administrator on the terminal

Installation

Installation includes following steps.

1) Download

Execute the following command to download composer-setup on CentOS.

CentOS How to Install Composer on CentOS 1

2) Verify the Installer

The hash file code of composer-setup.php needs to be verified. We can verify it by writing the PHP code as shown below.

CentOS How to Install Composer on CentOS 2

3) Run Composer-Setup

Execute the file named as composer-setup.php to start the installation process of composer on CentOS.

CentOS How to Install Composer on CentOS 3

4) Move Composer.phar to /usr/bin/composer

To access Composer globally on the terminal, we need to copy the binary executable file of composer which is composer.phar into /usr/bin/. Use the following command for this purpose.

CentOS How to Install Composer on CentOS 4

5) Verify Composer

Just type composer on the terminal to check whether Composer is globally installed on the system or not.

CentOS How to Install Composer on CentOS 5

Hence, we have successfully installed and get started with Composer on the terminal.


Next TopicInstall Netbeans





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA