Skip to content

Instantly share code, notes, and snippets.

@todgru
Created June 12, 2014 23:01
Show Gist options
  • Save todgru/14768fb2d8a82ab3f436 to your computer and use it in GitHub Desktop.
Save todgru/14768fb2d8a82ab3f436 to your computer and use it in GitHub Desktop.
AWS redis-cli on EC2
@rameshelamathi
Copy link

rameshelamathi commented Nov 11, 2020

Minor change to @chrisdlangton



wget http://download.redis.io/redis-stable.tar.gz

tar xvzf redis-stable.tar.gz

cd redis-stable

make MALLOC=libc

chmod a+x src/redis-cli

sudo cp src/redis-cli /usr/bin/

@Tabassum-Najneen
Copy link

Run the following commands line by line to install Redis and dependencies.

  1. sudo yum -y install gcc make # install GCC compiler
  2. cd /usr/local/src
  3. sudo wget http://download.redis.io/redis-stable.tar.gz
  4. sudo tar xvzf redis-stable.tar.gz
  5. sudo rm -f redis-stable.tar.gz
  6. cd redis-stable
  7. sudo yum groupinstall "Development Tools"
  8. sudo make distclean
  9. sudo make
  10. sudo yum install -y tcl
  11. sudo make test
  12. sudo cp src/redis-server /usr/local/bin/
  13. sudo cp src/redis-cli /usr/local/bin/
  14. redis-server
  15. redis-cli

@Vibhanshu09
Copy link

Simple way to install

@shqear93
Copy link

Thanks!

@phanimullapudi
Copy link

How to install redis-cli with --tls flag enabled ? By default --tls is not enabled.

@thapabishwa
Copy link

sudo amazon-linux-extras install redis6

@chiemeleakoma
Copy link

thanks, @thapabishwa, worked for me. thanks

@shahzaibiqbal83
Copy link

sudo amazon-linux-extras enable redis6
sudo yum clean metadata
sudo yum update
sudo yum install redis

@kevin1193
Copy link

Thanks

@prajyotpro
Copy link

faced this issue recently
Combining all solutions is what I shared with DevOps on the Ubuntu system.

sudo wget http://download.redis.io/redis-stable.tar.gz
sudo tar xvzf redis-stable.tar.gz
cd redis-stable
sudo apt-get install libssl-dev
sudo make BUILD_TLS=yes

./src/redis-cli -h <REDIS_HOST> --tls -p 6379

@tudormunteanu
Copy link

On Amazon Linux 2 this worked for me:

yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum update -y
yum install -y redis

@amitsaxena
Copy link

On Amazon Linux you can use this:

$ sudo yum install gcc openssl-devel
$ wget http://download.redis.io/redis-stable.tar.gz && tar xvzf redis-stable.tar.gz && cd redis-stable && make BUILD_TLS=yes

and then connect using this:

$ src/redis-cli -h conn-string-elasticache.amazonaws.com -p 6379 --tls

// If you have auth
$ src/redis-cli -h conn-string-elasticache.amazonaws.com -p 6379 --tls -a password

@neto-developer
Copy link

Thanks! 🚀

@Segmentational
Copy link

On Amazon Linux you can use this:

$ sudo yum install gcc openssl-devel
$ wget http://download.redis.io/redis-stable.tar.gz && tar xvzf redis-stable.tar.gz && cd redis-stable && make BUILD_TLS=yes

and then connect using this:

$ src/redis-cli -h conn-string-elasticache.amazonaws.com -p 6379 --tls

// If you have auth
$ src/redis-cli -h conn-string-elasticache.amazonaws.com -p 6379 --tls -a password

Thanks @amitsaxena -- using AWS' new 2023 ami, this worked wonderfully (:

+1:

@1-0-01
Copy link

1-0-01 commented Apr 19, 2023

It's very help for me!Thanks.

@carlosmedina-io
Copy link

On Amazon Linux you can use this:

$ sudo yum install gcc openssl-devel
$ wget http://download.redis.io/redis-stable.tar.gz && tar xvzf redis-stable.tar.gz && cd redis-stable && make BUILD_TLS=yes

and then connect using this:

$ src/redis-cli -h conn-string-elasticache.amazonaws.com -p 6379 --tls

// If you have auth
$ src/redis-cli -h conn-string-elasticache.amazonaws.com -p 6379 --tls -a password

This is the way!! Thanks @amitsaxena

@daudmalik06
Copy link

Very Simple:

For Ubuntu/Debian-based Systems

sudo apt-get update
sudo apt-get install redis-tools

For Amazon Linux/RedHat-based Systems
sudo yum install redis

for more help feel free to reach out at [email protected]

@rannn505
Copy link

With AL2, this is the most straightforward method:
sudo amazon-linux-extras install -y redis6

@blaskovicz
Copy link

With AL2, this is the most straightforward method: sudo amazon-linux-extras install -y redis6

Thanks! 👍

@twall
Copy link

twall commented Nov 8, 2024

Needs an update for AL2023...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment