How to install Redis server in EC2

Redis is an in-memory data structure project implementing a distributed, in-memory key-value database with optional durability. Redis supports different kinds of abstract data structures, such as strings, lists, maps, sets, sorted sets, HyperLogLogs, bitmaps, streams, and spatial indexes.

This article explains the steps to install Redis server in EC2 instance.

Step1: Login to EC2 instance as root through ssh.

Step2: Install the dependencies if not installed already.

#yum install gcc make

Step3: Download Redis package.

#cd /usr/local/src
#wget http://download.redis.io/redis-stable.tar.gz

Step4: Extract the downloaded package.

#tar xvzf redis-stable.tar.gz

Step5: Change the location to extracted folder.

#cd redis-stable

Step5: Compile and install the package.

#make distclean
#make

Step6: Verify the installation

#make test

Step7: Copy Redis binaries to system binary folder.

#cp src/redis-server /usr/local/bin/
#cp src/redis-cli /usr/local/bin/

Step8: Start Redis server.

#redis-server

That's all…

Leave a Reply

Your email address will not be published. Required fields are marked *