Created
February 13, 2014 03:55
-
-
Save matthewpizza/8969473 to your computer and use it in GitHub Desktop.
Install Composer on Webfaction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd $HOME | |
ln -s `which php54` ~/bin/php | |
export PATH=$HOME/bin:$PATH | |
curl -sS https://getcomposer.org/installer | php54 | |
echo -e "\n# Composer\nalias composer=\"php54 \$HOME/composer.phar\"" >> $HOME/.bash_profile | |
source $HOME/.bash_profile |
A few small updates:
cd $HOME
ln -s `which php56` ~/bin/php
export PATH=$HOME/bin:$PATH
curl -sS https://getcomposer.org/installer | php56
echo -e "\n# Composer\nalias composer=\"php56 \$HOME/bin/composer.phar\"" >> $HOME/.bash_profile
source $HOME/.bash_profile
A few small updates:
cd $HOME
ln -s `which php72` ~/bin/php
export PATH=$HOME/bin:$PATH
curl -sS https://getcomposer.org/installer | php72
echo -e "\n# Composer\nalias composer=\"php72 \$HOME/bin/composer.phar\"" >>
$HOME/.bash_profile
source $HOME/.bash_profile
A few small updates:
cd $HOME ln -s `which php72` ~/bin/php export PATH=$HOME/bin:$PATH curl -sS https://getcomposer.org/installer | php72 echo -e "\n# Composer\nalias composer=\"php72 \$HOME/bin/composer.phar\"" >> $HOME/.bash_profile source $HOME/.bash_profile
Using this I got:
echo -e "\n# Composer\nalias composer=\"php72 \$HOME/bin/composer.phar\"" >>
-bash: syntax error near unexpected token
newline'`
Updated for PHP 7.2:
cd $HOME
ln -s `which php72` ~/bin/php
export PATH=$HOME/bin:$PATH
curl -sS https://getcomposer.org/installer | php72
echo -e "\n# Composer\nalias composer=\"php72 \$HOME/bin/composer.phar\"" >> $HOME/.bash_profile
source $HOME/.bash_profile
Wow! Nice!
If I do composer --version
then
Could not open input file: /home/{username}/bin/composer.phar
Update working fine
I change directory to /bin and then command it is working fine.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@dhigby
Thank you for that comment. I was racking my brain trying to get some php7 dependencies to work. I can verify that replacing instances of php54 with php70 did work.