Perform the following steps to quickly install Composer on your CentOS 8 system:

Install PHP CLI and Zip:
$ sudo dnf install php-cli php-json php-zip curl unzipCopy
Download Composer with curl:
$ curl -sS https://getcomposer.org/installer |php
Move the Composer file to
/usr/local/bin
directory:$ sudo mv composer.phar /usr/local/bin/composer