How to Install Composer on Debian 10

Install Composer on Debian 10

In this article, we will have explained the necessary steps to install and configure Composer on Debian 10. Before continuing with this tutorial, make sure you are logged in as a user with sudo privileges. All the commands in this tutorial should be run as a non-root user.

Composer is a best dependency manager for PHP. Composer can install, update and pull in all the required PHP packages to your project directory. At the time of installing package, composer will check for dependencies of package and if dependent package are there then it will also install dependencies.

Install Composer on Debian

Step 1. The first command will update the package lists to ensure you get the latest version and dependencies.

Step 2. Install Composer.

First, download and install Composer by executing the following command:

Copy composer.phar file under bin directory to make available anywhere in the system. Also, set the execute permission on file. I have changed the filename from composer.phar to composer to easy use:

This will provide you composer version details along with options available with composer command:

The above command will print details as following:

To learn more about Composer and find out how to get started with using this package manager, our recommendation is to read the official documentation at https://getcomposer.org/doc/.

Congratulation, you have learned how to install and configure Composer on Debian 10 Buster. If you have any question, please leave a comment below.