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