Skip to content

Instantly share code, notes, and snippets.

@mistergraphx
Last active December 29, 2017 14:21
Show Gist options
  • Save mistergraphx/8fa71002bb2e7e38a5e8ff104b5f50fa to your computer and use it in GitHub Desktop.
Save mistergraphx/8fa71002bb2e7e38a5e8ff104b5f50fa to your computer and use it in GitHub Desktop.
Installation de rsync, sur un hébergement de type linux advanced chez Amen, pour pouvoir utiliser en ssh ou depuis l'hébergement l'utilitaire rsync en CLI.

Sur les hébergement de type linux avec cpanel chez Amen, rsync n'est pas installé par defaut, ce qui provoque une erreur quand on veut lancer un script de synchro locale vers l'hébergement en ssh.

rsync: command not found
rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
rsync error: remote command not found (code 127) at io.c(453) [receiver=x.x.x]

On installe donc rsync dans le dossier /bin à la racine de l'hébergement.

cd bin/
wget https://download.samba.org/pub/rsync/rsync-3.1.2.tar.gz
tar -xvzf rsync-3.1.2.tar.gz
cd rsync-3.1.2
./configure --prefix=/path_to/home_dir
make

On nettoie et on renome le dossier

rm rsync-3.1.2.tar.gz
mv rsync-3.1.2/ rsync/

Pour que rsync soit executable depuis une connection ssh externe on ajoute rsync au PATH

nano ~/.bashrc
export PATH="$HOME/bin/rsync:$PATH"

!! Sources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment