]> git.saurik.com Git - redis.git/blame - README
Merge branch 'unstable' of github.com:/antirez/redis into unstable
[redis.git] / README
CommitLineData
d3207647 1Where to find complete Redis documentation?
2-------------------------------------------
3
4This README is just a fast "quick start" document. You can find more detailed
3fb1c8a0 5documentation at http://redis.io
d3207647 6
7Building Redis
8--------------
9
10It is as simple as:
11
12 % make
13
14Redis is just a single binary, but if you want to install it you can use
3fb1c8a0
JO
15the "make install" target that will copy the binary in /usr/local/bin
16for default. You can also use "make PREFIX=/some/other/directory install"
e1386503 17if you wish to use a different destination.
d3207647 18
19You can run a 32 bit Redis binary using:
20
21 % make 32bit
22
3fb1c8a0 23After building Redis is a good idea to test it, using:
d3207647 24
25 % make test
26
3fb1c8a0
JO
27NOTE: if after building Redis with a 32 bit target you need to rebuild it
28 with a 64 bit target you need to perform a "make clean" in the root
29 directory of the Redis distribution.
30
31Allocator
32---------
33
34By default Redis compiles and links against jemalloc under Linux, since
35glibc malloc() has memory fragmentation problems.
36
37To force a libc malloc() build use:
38
39 make FORCE_LIBC_MALLOC=yes
40
41In all the other non Linux systems the libc malloc() is used by default.
42
43On Mac OS X you can force a jemalloc based build using the following:
44
45 make USE_JEMALLOC=yes
46
47Verbose build
48-------------
49
50Redis will build with a user friendly colorized output by default.
51If you want to see a more verbose output use the following:
52
53 make V=1
0a802bd7 54
d3207647 55Running Redis
56-------------
57
58To run Redis with the default configuration just type:
59
60 % cd src
61 % ./redis-server
62
63If you want to provide your redis.conf, you have to run it using an additional
64parameter (the path of the configuration file):
65
66 % cd src
67 % ./redis-server /path/to/redis.conf
68
69Playing with Redis
70------------------
71
72You can use redis-cli to play with Redis. Start a redis-server instance,
73then in another terminal try the following:
74
75 % cd src
76 % ./redis-cli
77 redis> ping
78 PONG
79 redis> set foo bar
80 OK
81 redis> get foo
82 "bar"
83 redis> incr mycounter
84 (integer) 1
85 redis> incr mycounter
86 (integer) 2
87 redis>
88
89You can find the list of all the available commands here:
90
e491a1a1 91 http://redis.io/commands
d3207647 92
93Enjoy!