Linux - install only redis-cli

I have a Linux server with Redis installed, and I want to connect to it via the command line from my local Linux machine.

Is it possible to install only redis-cli (without redis-server and other tools)?

If I just redis-cli to my local computer and run it, I have the following error:

 ./redis-cli: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.14' not found (required by ./redis-cli) 
+133
linux redis
Feb 15 '14 at 8:43
source share
12 answers

Ubuntu (tested on 04/14) has a package called redis-tools that contains redis-cli among other tools. To install it, enter:

 sudo apt-get install redis-tools 
+286
September 18 '14 at 9:48
source share

Instead of redis-cli you can just use nc !

 nc -v --ssl redis.mydomain.com 6380 

Then send the commands.

+68
Aug 10 '16 at 19:20
source share

To install 3.0 , which is the latest stable version :

 $ git clone http://github.com/antirez/redis.git $ cd redis && git checkout 3.0 $ make redis-cli 

Optionally, you can put the compiled executable in your download path:

 $ ln -s src/redis-cli /usr/local/bin/redis-cli 
+26
Feb 16 '14 at 12:14
source share

From http://redis.io/topics/quickstart

 wget http://download.redis.io/redis-stable.tar.gz tar xvzf redis-stable.tar.gz cd redis-stable make redis-cli sudo cp src/redis-cli /usr/local/bin/ 

With Docker, I usually use https://registry.hub.docker.com/_/redis/ . If I need to add redis-cli to an image, I use the following snippet.

 RUN cd /tmp &&\ curl http://download.redis.io/redis-stable.tar.gz | tar xz &&\ make -C redis-stable &&\ cp redis-stable/src/redis-cli /usr/local/bin &&\ rm -rf /tmp/redis-stable 
+25
Sep 16 '14 at 16:12
source share

For centOS, you can probably try the following steps.

 cd /tmp wget http://download.redis.io/redis-stable.tar.gz tar xvzf redis-stable.tar.gz cd redis-stable make cp src/redis-cli /usr/local/bin/ chmod 755 /usr/local/bin/redis-cli 
+12
Jan 13 '17 at 3:20
source share

To extend the answer to @Agis, you can also install the Redis CLI by running

 $ git clone -b v2.8.7 git@github.com:antirez/redis.git $ make -C redis install redis-cli /usr/bin 

This will create a Redis CLI and add the binary to / usr / bin. For those using Docker , I also created a Docker file that does this for you: https://github.com/bacongobbler/dockerfiles/blob/master/redis-cli/Dockerfile

+6
Mar 21 '14 at 0:38
source share

In my case, I need to follow a few more steps to build it on RedHat or Centos .

 # get system libraries sudo yum install -y gcc wget # get stable version and untar it wget http://download.redis.io/redis-stable.tar.gz tar xvzf redis-stable.tar.gz cd redis-stable # build dependencies too! cd deps make hiredis jemalloc linenoise lua geohash-int cd .. # compile it make # make it globally accesible sudo cp src/redis-cli /usr/bin/ 
+6
Apr 26 '18 at 12:56
source share

Using Docker , you can run this command to get the Redis CLI:

 docker run -it redis redis-cli -h redis.mycompany.org -p 6379 

where redis is the image of redis Docker from the Docker Hub,
redis-cli pre-installed in this image, and after that all the redis-cli :
-h is the host name for the connection,
-p is obviously the port to connect to.

+3
Feb 07 '18 at 13:13
source share

You can also use telnet instead

 telnet redis-host 6379 

And then run a command, for example to monitor

 monitor 
+2
Jun 25
source share

you can scp it from your redis computer if you have one, its only single file. Or copy with nc if the private network (this method is unsafe):

 redisclient: nc -l 8888 > /usr/local/bin/redis-cli redisserver: cat /usr/local/bin/redis-cli | nc redisclient 8888 
0
Jul 10 '15 at 23:31
source share

I made a simple clean-run solution that is under development.

redis-cli: https://github.com/holys/redis-cli

Build once and run everywhere. Totally portable.

Please feel free to try.

0
Dec 24 '16 at 6:41
source share

There are many ways to install radis-cli . Comes with redis-tools and redis-server . Installing either of them will also install redis-cli . But he will also install other tools. Since you have redis-server installed somewhere and are only interested in installing redis-cli . To install, install only redis-cli without other unnecessary tools, run the following commands

 cd /tmp wget http://download.redis.io/redis-stable.tar.gz tar xvzf redis-stable.tar.gz cd redis-stable make cp src/redis-cli /usr/local/bin/ chmod 755 /usr/local/bin/redis-cli 
0
Mar 03 '19 at 10:15
source share



All Articles