How to Install Composer in Ubuntu Server?

By Hardik Savani December 29, 2021 Category : Ubuntu Server

Hi,

This simple article demonstrates of how to install composer in ubuntu 20.04. it's simple example of install composer in ubuntu 20.04. you can understand a concept of install composer ubuntu 20.04 command line. step by step explain install laravel composer ubuntu. Here, Creating a basic example of ubuntu install composer 2.

Composer is a popular dependency management tool for PHP, created mainly to facilitate installation and updates for project dependencies. In this post i will give you list of command how to install composer in ubuntu 21.10, ubuntu 21.04, ubuntu 20.04, ubuntu 18.04 and ubuntu 16.04 server.

you must need to install PHP before install composer, so you can follow bellow link for install PHP in ubuntu: How to Install PHP in Ubuntu Server?.

Let's see bellow two ways to install composer in ubuntu.

Way 1: Install Composer

Update Local Package:

sudo apt update

Install Composer Package:

sudo apt-get install composer

you have to choose from list as bellow:

Composer Command:

composer

you have to choose from list as bellow:

Way 2: Install Composer

Download Composer:

curl -sS https://getcomposer.org/installer -o /tmp/composer-setup.php

Move Composer:

sudo php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer

Composer Command:

composer

you have to choose from list as bellow:

I hope it can help you...

Tags :