Last active
January 28, 2022 10:27
-
-
Save mortennajbjerg/5789d8b0d423691b38cb to your computer and use it in GitHub Desktop.
Installing Drush on Hetzner managed server
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
# Installing Composer | |
mkdir ~/bin | |
mkdir ~/bin/composer | |
cd ~/bin/composer | |
wget https://getcomposer.org/composer.phar --no-check-certificate | |
php composer.phar init --author "Morten Najbjerg <[email protected]>" | |
# Installing drush and setting up alias | |
echo "export COLUMNS" >> ~/.bashrc | |
echo "alias composer='php -d allow_url_fopen=on ~/bin/composer/composer.phar'" >> ~/.bashrc | |
echo "alias php='/usr/bin/php'" >> ~/.bashrc | |
source ~/.bashrc | |
echo "PATH=$HOME/bin:$PATH" >> ~/.bashrc | |
source ~/.bashrc | |
wget -O $HOME/bin/drush.zip https://github.com/drush-ops/drush/archive/8.4.10.zip | |
# If You want newest Drush version instead - use this line | |
# wget -O $HOME/bin/drush.zip https://github.com/drush-ops/drush/archive/master.zip | |
unzip -d $HOME/bin $HOME/bin/drush.zip | |
mv $HOME/bin/drush-8.4.10 $HOME/bin/drush-src | |
cd $HOME/bin/drush-src | |
composer install | |
ln -s $HOME/bin/drush-src/drush $HOME/bin/drush | |
cd ~ | |
# That's all |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This works beautifully, thanks for sharing!