- — 1 year ago
Before you install Composer on your CentOS, let’s make sure it is fully up to date. To update all your system software to the latest version you need to have root access to the server or at least you have sudo privileges with your system user. Connect to your Linux VPS via SSH and run the following command:
After this install the PHP CLI (command line interface) package and all other dependencies with:
sudo yum install php-cli php-zip wget unzip
Once PHP CLI is installed, download the Composer installer script with:
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
The command above will download the composer-setup.php file in the current working directory.
Run the following command to install Composer in the /usr/local/bin directory
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
When the installation is succesfull you will server
All settings correct for using Composer
Downloading... Composer (version 1.7.2) successfully installed to: /usr/local/bin/composer Use it: php /usr/local/bin/composer
The last step is to verify the installation:
When composer is installed you see the following
______ / ____/___ ____ ___ ____ ____ ________ _____ / / / __ \/ __ `__ \/ __ \/ __ \/ ___/ _ \/ ___/ / /___/ /_/ / / / / / / /_/ / /_/ (__ ) __/ / \____/\____/_/ /_/ /_/ .___/\____/____/\___/_/ /_/ Composer version 1.8.4 2019-02-11 10:52:10
WebdeveloperHow To Install Composer on CentOS 7 How To Install Composer on CentOS 7 2019-05-29 06:01:48