How to install PHP Composer1.10.5 on Ubuntu 18.04 - Chamrong Tutorials

How to install PHP Composer1.10.5 on Ubuntu 18.04 - Chamrong Tutorials

Table of Contents
What's Composer? Why we should install Composer? PHP Composer is an application used for managing, tracking PHP dependencies depend on the project you work on. For example, if you want to use the Laravel PHP framework, you will use the command below to download a simple Laravel project.

composer create-project laravel/laravel example-app

Now, we have an overview of Composer's role in PHP dependencies. So let's get started with the below instructions to install it on your Ubuntu Linux system.

Prerequisites

  1. A fresh Ubuntu 18.04 Linux System haven't install Composer before
  2. PHP 7.x installed in your Ubuntu (if you don't have it yet. Please read "How to install PHP7.3 on Ubuntu 18.04 - Chamrong Tutorial" before getting started with us more.)
  3. Basic command-line knowledge

Getting Started

Step 1: Update your Ubuntu packages to the latest packages.

Run the command below to update and upgrade your Ubuntu packages.

sudo apt update
sudo apt upgrade

Step 2: Go to the "tmp" directory

Run the command below to change the current directory to "tmp" directory.

cd /tmp

Step 3: Download Composer1.10.5

Run the command below to download Composer1.10.5

wget http://getcomposer.org/download/1.10.5/composer.phar

Step 4: Install Composer1.10.5

Run the command below to install Composer1.10.5

php composer.phar -V
sudo mv composer.phar /usr/bin/composer
sudo chmod 750 /usr/bin/composer

Step 5: Check your installation status

Run the command below, if it shows the composer version. Mean that you have installed it successfully.

composer -v

Now, you have installed it successfully. If you want to know more about this topic of how to uninstall Composer in your Ubuntu 18.04 you should read this article "How to uninstall PHP Composer1.10.5 on Ubuntu 18.04 - Chamrong Tutorials".

Conclusion

Thank you for your time. If you have any errors or issues related to the installation or uninstallation of Composer1.10.5 from Ubuntu 18.04, please feel free to leave the comment below. I will help you as soon as possible.

Post a Comment

Previous Post Next Post