Install composer in Ubuntu or other Linux OS for PHP

Published: 21 July 2022
on channel: Concept Globination
57
0

How to install composer in Ubuntu or other Linux OS for PHP,

Steps to install by terminal :
--------------------------------------------------------------
Step 1
sudo apt update
--------------------------------------------------------------
Step 2
sudo apt install php-cli unzip
--------------------------------------------------------------
Step 3
cd ~
curl -sS https://getcomposer.org/installer -o /tmp/composer-setup.php
--------------------------------------------------------------
Step 4
HASH=`curl -sS https://composer.github.io/installer.sig`
--------------------------------------------------------------
Step 4
echo $HASH

Output : along hash code
--------------------------------------------------------------
Step 5
php -r "if (hash_file('SHA384', '/tmp/composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"

Output : Installer verified
--------------------------------------------------------------
Step 6
sudo php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer

Output :
All settings correct for using Composer
Downloading...

Composer (version) successfully installed to: /usr/local/bin/composer
Use it: php /usr/local/bin/composer
--------------------------------------------------------------
Final Step to check :
composer enter

Output
______
/ ___/__ ____ ___ ____ ____ ________ _____
/ / / _ \/ __ `_ \/ __ \/ __ \/ ___/ _ \/ ___/
/ /___/ /_/ / / / / / / /_/ / /_/ (__ ) __/ /
\____/\____/_/ /_/ /_/ .___/\____/____/\___/_/
/_/

Related Videos :
Install PHP Environment for Codigniter 4 and Laravel in Ubuntu with help of composer
Video :    • Install PHP Environment for Codignite...  

0:00 - Introduction
0:10 - Check composer install of not on ubuntu system
1:00 - Update Ubuntu System
1:15 - Start Installing Composer
3:50 - Run and test composer in ubuntu


Watch video Install composer in Ubuntu or other Linux OS for PHP online without registration, duration hours minute second in high quality. This video was added by user Concept Globination 21 July 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 5 once and liked it people.