Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save vickyRathee/b8e035047e55716688aa8ec7cf71a2f5 to your computer and use it in GitHub Desktop.
Save vickyRathee/b8e035047e55716688aa8ec7cf71a2f5 to your computer and use it in GitHub Desktop.
install Redis manually in amazon Linux instance using Putty
sudo yum -y install gcc make # install GCC compiler
cd /home/ec2-user
sudo wget http://download.redis.io/redis-stable.tar.gz
sudo tar xvzf redis-stable.tar.gz
sudo rm -f redis-stable.tar.gz
cd redis-stable
sudo make distclean
sudo make
# Run tests
# sudo yum install -y tcl
# sudo make test
# Replace redis.conf with custom settings
sudo sed -i -e "s/daemonize no/daemonize yes/" redis.conf
sudo sed -i -e "s/# maxmemory <bytes>/maxmemory 100MB/" redis.conf
sudo sed -i -e "s/# maxmemory-policy volatile-lru/maxmemory-policy allkeys-lru/" redis.conf
sudo sed -i -e "s/protected-mode yes/protected-mode no/" redis.conf
# Load redis.config
src/redis-server redis.conf
# Go to src
cd src
# Start server
killall -9 redis-server
./redis-server --daemonize yes --protected-mode no
#*** Use ./redis-cli for manual testing ***
# ./redis-cli -p 6379 info server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment