README 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. Where to find complete Redis documentation?
  2. -------------------------------------------
  3. This README is just a fast "quick start" document. You can find more detailed
  4. documentation at http://redis.io
  5. Building Redis
  6. --------------
  7. It is as simple as:
  8. % make
  9. Redis is just a single binary, but if you want to install it you can use
  10. the "make install" target that will copy the binary in /usr/local/bin
  11. for default. You can also use "make PREFIX=/some/other/directory install"
  12. if you wish to use a different destination.
  13. You can run a 32 bit Redis binary using:
  14. % make 32bit
  15. After building Redis is a good idea to test it, using:
  16. % make test
  17. Buliding using tcmalloc
  18. -----------------------
  19. tcmalloc is a fast and space efficient implementation (for little objects)
  20. of malloc(). Compiling Redis with it can improve performances and memeory
  21. usage. You can read more about it here:
  22. http://goog-perftools.sourceforge.net/doc/tcmalloc.html
  23. In order to compile Redis with tcmalloc support install tcmalloc on your system
  24. and then use:
  25. % make USE_TCMALLOC=yes
  26. Note that you can pass any other target to make, as long as you append
  27. USE_TCMALLOC=yes at the end.
  28. Running Redis
  29. -------------
  30. To run Redis with the default configuration just type:
  31. % cd src
  32. % ./redis-server
  33. If you want to provide your redis.conf, you have to run it using an additional
  34. parameter (the path of the configuration file):
  35. % cd src
  36. % ./redis-server /path/to/redis.conf
  37. Playing with Redis
  38. ------------------
  39. You can use redis-cli to play with Redis. Start a redis-server instance,
  40. then in another terminal try the following:
  41. % cd src
  42. % ./redis-cli
  43. redis> ping
  44. PONG
  45. redis> set foo bar
  46. OK
  47. redis> get foo
  48. "bar"
  49. redis> incr mycounter
  50. (integer) 1
  51. redis> incr mycounter
  52. (integer) 2
  53. redis>
  54. You can find the list of all the available commands here:
  55. http://redis.io/commands
  56. Enjoy!