Last active
May 31, 2017 06:59
-
-
Save simkimsia/0c218cadbb3055d53417 to your computer and use it in GitHub Desktop.
Inspired by http://askubuntu.com/a/165241/10591 this gist shows the bash commands required to have a global installation of composer and also available for all users to access
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
#!/bin/bash | |
### | |
# | |
# | |
# Run this by executing the following: | |
# | |
# bash -c "$(curl -fsSL https://gist.githubusercontent.com/simkimsia/0c218cadbb3055d53417/raw/download_composer.sh)" | |
# | |
# Also, run this as root, unless you enjoy failing. | |
######################################## | |
## Download composer.phar and make it global | |
######################################## | |
## Download composer.phar | |
curl -sS https://getcomposer.org/installer | php | |
## move it to /usr/share | |
mv composer.phar /usr/share/composer | |
## change the permissions to 777 so everyone can use | |
chmod 777 /usr/share/composer | |
## create an alias as shortcut command | |
alias composer='/usr/share/composer' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You should never use chmod 77 giving access to the owner, group and OTHERS. It is a security risk.