Skip to content
Luke Chen edited this page Dec 29, 2020 · 10 revisions

https://redis.io/

Build

Download redis-6.0.9.tar.gz or latest

Pre-requisition:

sudo apt-get install tcl

Build:

make
make test

Alternatively

$ sudo add-apt-repository ppa:redislabs/redis
$ sudo apt-get update
$ sudo apt-get install redis

Run

$ ~/redis-6.0.9/src/redis-server

The official Redis command documentation

https://redis.io/commands

Client

command line

$ pwd
~/redis-6.0.9/src
$ ./redis-cli

python

https://redislabs.com/lp/python-redis/

python API

https://github.com/andymccurdy/redis-py/blob/master/redis/client.py

import redis

r = redis.Redis(
    host='localhost',
    port=6379)

r.set('name', 'lchen')
name = r.get('name')
print(name)

Clone this wiki locally