Setting Up Composer for PHP 8.1 on Ubuntu 22 04

Published: 16 February 2023
on channel: MivoCloud
474
58

PHP is a popular server scripting language known for creating dynamic and interactive web pages. Getting up and running with your language of choice is the first step in learning to program.

Earlier we installed php on the server and now we setting up a local programming environment via the command line. You will also install a dependency manager, Composer, and test your installation by running a script.

Commands Used
curl -sS https://getcomposer.org/installer -o /tmp/composer-setup.php
HASH=`curl -sS https://composer.github.io/installer.sig`
echo $HASH

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;"

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

composer
cd ~
mkdir example-project
cd example-project
composer init
nano hello.php
php hello.php

Useful Links
VPS/VDS - https://www.mivocloud.com/


Watch video Setting Up Composer for PHP 8.1 on Ubuntu 22 04 online without registration, duration hours minute second in high quality. This video was added by user MivoCloud 16 February 2023, don't forget to share it with your friends and acquaintances, it has been viewed on our site 474 once and liked it 58 people.