Contact

Blogs

Take a look at the things that interest us.

How To Install Composer on CentOS 7

Wesley Wesley 5 years

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:

    yum update

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:

    /usr/local/bin/composer

When composer is installed you see the following

           ______
      / ____/___  ____ ___  ____  ____  ________  _____
     / /   / __ \/ __ `__ \/ __ \/ __ \/ ___/ _ \/ ___/
    / /___/ /_/ / / / / / / /_/ / /_/ (__  )  __/ /
    \____/\____/_/ /_/ /_/ .___/\____/____/\___/_/
                        /_/
    Composer version 1.8.4 2019-02-11 10:52:10
How To Install Composer on CentOS 7 2021-08-27 10:43:09

There are no comments.

4184

Have questions about our services?

Contact our Sales team to get answers.

Contact Us
gomibako@aska-ltd.jp