Skip to content

Instantly share code, notes, and snippets.

@vickyRathee
Last active May 6, 2020 14:25
Show Gist options
  • Save vickyRathee/6419a4d32084f2d3f98dcc73a6a9821c to your computer and use it in GitHub Desktop.
Save vickyRathee/6419a4d32084f2d3f98dcc73a6a9821c to your computer and use it in GitHub Desktop.
#!/bin/bash
yum -y install gcc make # install GCC compiler
cd /home/ec2-user
wget http://download.redis.io/redis-stable.tar.gz
tar xvzf redis-stable.tar.gz
rm -f redis-stable.tar.gz
cd redis-stable
make distclean
make
# Run tests
# yum install -y tcl
# make test
# Replace redis.conf with custom settings
sed -i -e "s/daemonize no/daemonize yes/" redis.conf
sed -i -e "s/# maxmemory <bytes>/maxmemory 100MB/" redis.conf
sed -i -e "s/# maxmemory-policy volatile-lru/maxmemory-policy allkeys-lru/" redis.conf
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