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.
4 Answers
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 runredis-cli ping
to verify the redis server is running and accepting connections. Jul 28, 2016 at 16:07 -
1
-
1
-
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
– JoeJan 30, 2019 at 22:44 -
1To start use
sudo systemctl start redis
andsudo systemctl enable redis
to start on init– jashkAug 24, 2019 at 5:01
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.
-
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. Dec 30, 2014 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 PDec 30, 2014 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? Jan 6, 2015 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. Oct 1, 2015 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. gist.github.com/FUT/7db4608e4b8ee8423f31 Nov 11, 2015 at 0:32
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