Created
May 6, 2020 12:58
-
-
Save vickyRathee/b8e035047e55716688aa8ec7cf71a2f5 to your computer and use it in GitHub Desktop.
install Redis manually in amazon Linux instance using Putty
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
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