Skip to content

Instantly share code, notes, and snippets.

@Artistan
Last active January 26, 2024 01:08
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save Artistan/d9288f8e12c4027096e66bd331d4e4fd to your computer and use it in GitHub Desktop.
Save Artistan/d9288f8e12c4027096e66bd331d4e4fd to your computer and use it in GitHub Desktop.
Install redis-cli on your other machines.
if [[ -d redis ]]
then
cd redis
git pull
else
git clone http://github.com/antirez/redis.git
cd redis && git checkout 4.0
fi
make redis-cli
unlink /usr/bin/redis-cli
echo "created redis-cli"
ln -s "$PWD/src/redis-cli" /usr/bin/redis-cli
cd ~
if [[ -d sources ]]
then
echo "./sources exists"
else
echo "making ./sources"
mkdir sources
fi
cd sources
echo "getting redis script. run `/bin/bash ./redis_cli_install_update.sh` from $PWD directory to update redis in the future."
if [[ -d redis_cli_install_update.sh ]]
then
echo "redis_cli_install_update.sh exists"
else
wget https://gist.githubusercontent.com/Artistan/d9288f8e12c4027096e66bd331d4e4fd/raw/redis_cli_install_update.sh
fi
echo "running redis script to install/update redis-cli"
/bin/bash ./redis_cli_install_update.sh
# GIST https://gist.github.com/Artistan/d9288f8e12c4027096e66bd331d4e4fd
# copy each of these line into your bash terminal in the directory that you would like to install sources
# wget will download the setup.sh script to your current directory
wget https://gist.githubusercontent.com/Artistan/d9288f8e12c4027096e66bd331d4e4fd/raw/setup.sh
# this will create the sources directory, download redis_cli_install_update.sh, and run redis_cli_install_update.sh to install redi-cli
/bin/bash setup.sh
### just redis install, not sources
# download
wget https://gist.githubusercontent.com/Artistan/d9288f8e12c4027096e66bd331d4e4fd/raw/redis_cli_install_update.sh
# install
/bin/bash ./redis_cli_install_update.sh
# !!!! If it is not executable you may need to change the redis_cli_install_update.sh script /usr/bin location based on your path, or add it to your $PATH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment