php, aws, amazon linux 2,

Install PHP Composer on Amazon Linux 2

May 31, 2022 · 1 min read · Post a comment

Using PHP on Amazon Linux 2 can potentially require a composer installation for some libraries. Installing Composer on Amazon Linux 2 is a quick and easy procedure. Let’s see it.

Prerequisites

  • Amazon Linux 2
  • PHP
  • sudo privileges

Install PHP Composer on Amazon Linux 2

Step 1. Install PHP Composer.

cd ~
sudo curl -sS https://getcomposer.org/installer | sudo php
sudo mv composer.phar /usr/local/bin/composer
sudo ln -s /usr/local/bin/composer /usr/bin/composer

Step 2. Now, test it out.

sudo composer install

Conclusion

Feel free to leave a comment below and if you find this tutorial useful, follow our official channel on Telegram.