Last active
June 13, 2019 08:10
-
-
Save fmtarif/c02c3fbdd586012c4f323344ec4282c8 to your computer and use it in GitHub Desktop.
#cli dreamhost stuff
This file contains hidden or 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
#https://help.dreamhost.com/hc/en-us/articles/214202148-How-do-I-change-the-PHP-version-my-shell-uses- | |
#for seeing installed php versions | |
ls -la /usr/local | |
#or any other installed PHP version | |
echo "export PATH=/usr/local/php71/bin:$PATH" >> ~/.bash_profile | |
#or through alias | |
echo "alias php='/usr/local/php71/bin/php'" >> ~/.bash_profile |
This file contains hidden or 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
#!/bin/bash | |
#chmod +x composer-install.sh && ./composer-install.sh | |
#from https://help.dreamhost.com/hc/en-us/articles/214899037-Installing-Composer-overview | |
cd ~ | |
mkdir -p ~/.php/composer | |
cd ~/.php/composer | |
curl -sS https://getcomposer.org/installer | php | |
#try following if above not working | |
#php -r "readfile('https://getcomposer.org/installer');" | php | |
echo "export PATH=$HOME/.php/composer:$PATH" >> ~/.bash_profile | |
mv ~/.php/composer/composer.phar ~/.php/composer/composer | |
. ~/.bash_profile | |
composer -v | |
. ~/.bash_profile #no idea why this is being necessary again | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment