Skip to content

Instantly share code, notes, and snippets.

@nmngt
Created April 27, 2023 11:27
Show Gist options
  • Save nmngt/6e7fc1df61a5e51609c3c177e1134349 to your computer and use it in GitHub Desktop.
Save nmngt/6e7fc1df61a5e51609c3c177e1134349 to your computer and use it in GitHub Desktop.
add php composer to hetzner webhosting
mkdir ~/bin
mkdir ~/bin/composer
cd ~/bin/composer
wget https://getcomposer.org/composer.phar
echo "# php version" >> ~/.bashrc
echo "export PHPVERSION=8.0 " >> ~/.bashrc
echo "" >> ~/.bashrc
echo "# composer alias" >> ~/.bashrc
echo "alias composer='php -d allow_url_fopen=on ~/bin/composer/composer.phar'" >> ~/.bashrc
source ~/.bashrc
composer -h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment