Last active
January 26, 2024 01:08
-
-
Save Artistan/d9288f8e12c4027096e66bd331d4e4fd to your computer and use it in GitHub Desktop.
Install redis-cli on your other machines.
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
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 |
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
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 |
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
# 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
https://stackoverflow.com/questions/21795340/linux-install-redis-cli-only/21810930#21810930