]>
Commit | Line | Data |
---|---|---|
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 to /usr/local/bin | |
19 | by 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 (which require Tcl), using: | |
27 | ||
28 | % make test | |
29 | ||
30 | Buliding using tcmalloc | |
31 | ----------------------- | |
32 | ||
33 | tcmalloc is a fast and space efficient implementation (for little objects) | |
34 | of malloc(). Compiling Redis with it can improve performance and memory | |
35 | usage. You can read more about it here: | |
36 | ||
37 | http://goog-perftools.sourceforge.net/doc/tcmalloc.html | |
38 | ||
39 | In order to compile Redis with tcmalloc support, install tcmalloc on your system | |
40 | and then use: | |
41 | ||
42 | % make USE_TCMALLOC=yes | |
43 | ||
44 | Note that you can pass any other target to make, as long as you append | |
45 | USE_TCMALLOC=yes at the end. | |
46 | ||
47 | Running Redis | |
48 | ------------- | |
49 | ||
50 | To run Redis with the default configuration just type: | |
51 | ||
52 | % cd src | |
53 | % ./redis-server | |
54 | ||
55 | If you want to provide your redis.conf, you have to run it using an additional | |
56 | parameter (the path of the configuration file): | |
57 | ||
58 | % cd src | |
59 | % ./redis-server /path/to/redis.conf | |
60 | ||
61 | Playing with Redis | |
62 | ------------------ | |
63 | ||
64 | You can use redis-cli to play with Redis. Start a redis-server instance, | |
65 | then in another terminal try the following: | |
66 | ||
67 | % cd src | |
68 | % ./redis-cli | |
69 | redis> ping | |
70 | PONG | |
71 | redis> set foo bar | |
72 | OK | |
73 | redis> get foo | |
74 | "bar" | |
75 | redis> incr mycounter | |
76 | (integer) 1 | |
77 | redis> incr mycounter | |
78 | (integer) 2 | |
79 | redis> | |
80 | ||
81 | You can find the list of all the available commands here: | |
82 | ||
83 | http://code.google.com/p/redis/wiki/CommandReference | |
84 | ||
85 | Enjoy! | |
86 |