How to Install Composer on RHEL/CentOS 7, 8
Composer is an application-level package manager for the PHP programming language that provides a standard format for managing dependencies of PHP software and required libraries.
In this article, we’re going to install composer on CentOS 7/8. Let’s start:
Table of Contents
- Installation
- Version Check
- Update Composer
Installation
First, ensure that we’ve installed PHP by this command:
If PHP is not available on your machine, then please install PHP first. Then we need to install dependencies:
Download the Composer installer script:
Run the following command to install Composer in the /usr/bin
directory:
You’ll set the output like this:
All settings are correct for using Composer
Downloading...
Composer (version 1.10.13) successfully installed to: /usr/bin/composer
Use it: php /usr/bin/composer
Verify the installation by typing:
Tags:
Linux