Skip to content

Instantly share code, notes, and snippets.

@czechboy0
Last active February 16, 2016 02:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save czechboy0/77c97b4ced37b512d1a2 to your computer and use it in GitHub Desktop.
Save czechboy0/77c97b4ced37b512d1a2 to your computer and use it in GitHub Desktop.
#!/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