Redis

http://redis.io/

Redis is an open source (BSD licensed), in-memory data structure store, used as database, cache and message broker. It supports data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs and geospatial indexes with radius queries. Redis has built-in replication, Lua scripting, LRU eviction, transactions and different levels of on-disk persistence, and provides high availability via Redis Sentinel and automatic partitioning with Redis Cluster.


  • Download & install

    $ wget http://download.redis.io/redis-stable.tar.gz
    $ tar xzf redis-stable.tar.gz
    $ cd redis-stable
    $ make
    
  • Start redis-server

    $ cd src
    $ ./redis-server # or
    $ nohup ./redis-server & # run in background
    
  • OR Install in Utuntu

    $ sudo apt-get update
    $ sudo apt-get install redis-server
    
  • client

    cli interface

      $ ./redis-cli
      redis> set foo bar
      OK
      redis> get foo
      "bar"
    

    python interface

    install python module

      $ pip install redis
    

    In python code

      import redis
      r = redis.StrictRedis(host='localhost', port=6379, db=0)
    

    commands

    http://redisdoc.com/ (Chinese)

results matching ""

    No results matching ""