Skip to content

Instantly share code, notes, and snippets.

@hofmannsven
Forked from gthln/gist:8401080
Last active November 2, 2022 14:56
  • Star 8 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save hofmannsven/35d5dc0c837842191d79468803e7a4a2 to your computer and use it in GitHub Desktop.
Install PHP Composer on Managed Hosting at Domainfactory.

Install Composer on Managed Hosting at Domainfactory

Step 1:

Log in to your Managed Hosting Server via SSH. Create your .bashrc:

touch .bashrc

Step 2:

Add these two lines to the .bashrc:

alias php7cli='/usr/local/bin/php7-71LATEST-CLI'
alias composer='php7cli ~/composer.phar'

Step 3:

Reload .bashrc with

$ source .bashrc

Step 4:

Install Composer with

$ curl -sS https://getcomposer.org/installer | php7cli

Step 5:

Done.

Check the installation with

$ composer --version

You should see something like this:

Composer version 1.7.3 2018-11-01 10:05:06

Your version will probably differ.

@trebaxa
Copy link

trebaxa commented Oct 27, 2022

On new 64 Server use this path to PHP

alias php7cli='/usr/bin/php74'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment