Last active
May 6, 2020 14:25
-
-
Save vickyRathee/6419a4d32084f2d3f98dcc73a6a9821c to your computer and use it in GitHub Desktop.
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
#!/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