I need to install redis in amazon cloud. I need it as a part of my npm module kue (deployment). Can anyone link me step by step tutorial or explain how to do it, considering the fact that I'm not good to bad with linux and administration.
Asked
Active
Viewed 3.8k times
4 Answers
104
If you enable the Extra Packages for Enterprise Linux (EPEL) repository that's present on Amazon Linux, you can install with yum.
sudo yum-config-manager --enable epel
sudo yum install redis
# Start redis server
sudo redis-server /etc/redis.conf
-
9Once you've run these commands, you can simply `sudo redis-server /etc/redis.conf` to start the server and run `redis-cli ping` to verify the redis server is running and accepting connections. – Hartley Brody Jul 28 '16 at 16:07
-
1This answer was the greatest. Just as an FYI – mcpeterson Apr 27 '17 at 02:34
-
this deserves a separate question: "how to install redis on AMI linux" – FuzzyAmi Aug 15 '17 at 07:42
-
For me `sudo redis-server` is enough – Umair Hamid Sep 27 '18 at 14:48
-
1how to start on init?? – brauliobo Oct 09 '18 at 16:54
-
1Amazon CentOS: `sudo yum-config-manager --enable epel Loaded plugins: amazon-id, rhui-lb sudo yum install redis Loaded plugins: amazon-id, rhui-lb, search-disabled-repos No package redis available. Error: Nothing to do` – Joe Jan 30 '19 at 22:44
-
1To start use `sudo systemctl start redis` and `sudo systemctl enable redis` to start on init – jashk Aug 24 '19 at 05:01
17
Rather than spin up an EC2 instance and install/manage redis there, you could create an Elasticache instance running redis and let AWS manage it all for you.
If you really do want to run your own redis server then you'll want to launch an EC2 instance and then manually install redis onto it. The AWS and redis documentation that I've linked to both provide step by step instructions.

Bruce P
- 19,995
- 8
- 63
- 73
-
I tried the hard way. Will create Elasticache when I'm completely finished. For now I had an AWS AMI instance up and running. I have redis server installed. I managed to ping it on 127.0.0.1:6379. Now how can I use it from another aws instance. Again sorry for stupid questions but I've never done any administration before. I presume I have to make a rule for my aws security group for 6379 port and than I need to do a port forwarding while logged on aws instance, but I'm not sure. – user732456 Dec 30 '14 at 11:50
-
You will need to add a rule to the security group to allow port 6379 through. You don't need to set up any prot forwarding of any sort. – Bruce P Dec 30 '14 at 14:26
-
All is up and running. I chose a separate EC2 instance with manual redis installation. Now I'm returning to Elasticache approach. There is one thing I'm uncertain: As I needed redis for my npm kue module, does it share the sami interface? – user732456 Jan 06 '15 at 15:01
-
7Be warned: TLDR; Elasticache requires more time and $$. I took the advice of this answer and got sucked into the blackhole that is Elasticache. I didn't get it working, wasted many hours all because AWS won't resolve it's node cluster DNS correctly. However you could pay for a $50/month contract to get basic support for them to resolve it... or you could just install on your EC2 instance. – Matt Jensen Oct 01 '15 at 22:27
-
5I agree with you @MattJensen. Install Redis manually on EC2 is no biggie just follow below guide. For a Node.js app I'm making I think going with Amazon Elasticache only adds unnecessary complexity. Would much rather just have Redis running on localhost. https://gist.github.com/FUT/7db4608e4b8ee8423f31 – ChrisRich Nov 11 '15 at 00:32
-
@ChrisRch thanks, I think the real downside worth mentioning is that when you install on EC2 the best practices are 100% on you. Most of the Redis install guides I've seen out there are the "quick and dirty" approach. Take with a grain of salt. – Matt Jensen Nov 11 '15 at 19:56
10
This worked for me on my "Amazon Linux 2" OS (based on RHEL/CENTOS 7)
wget -O /tmp/epel.rpm –nv https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum install -y /tmp/epel.rpm
sudo yum update -y
sudo yum install redis -y
After installation completes, start redis-server
by typing this command
redis-server

Jossef Harush Kadouri
- 32,361
- 10
- 130
- 129
8
On an Amazon Linux you can use the Extras Library on EC2:
sudo amazon-linux-extras install redis6

Sasha Shpota
- 9,436
- 14
- 75
- 148