Last active
February 16, 2016 02:16
-
-
Save czechboy0/77c97b4ced37b512d1a2 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
# Installs the latest stable Redis version in a local directory | |
if [ -d ~/.redis-stable ]; then | |
echo "redis is already installed, ignoring..." | |
else | |
echo "Installing the latest Redis stable from source" | |
curl -O http://download.redis.io/redis-stable.tar.gz > /dev/null 2>&1 | |
tar xvzf redis-stable.tar.gz > /dev/null 2>&1 | |
mv redis-stable ~/.redis-stable | |
rm redis-stable.tar.gz | |
cd ~/.redis-stable | |
make > /dev/null 2>&1 | |
cd .. | |
echo 'export PATH="~/.redis-stable/src:$PATH"' >> ~/.bash_profile | |
echo "Redis installed" | |
fi | |
source ~/.bash_profile | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment