]> git.saurik.com Git - redis.git/blob - README
Merge pull request #147 from janoberst/unstable
[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 at http://redis.io
6
7 Building Redis
8 --------------
9
10 It is as simple as:
11
12 % make
13
14 Redis is just a single binary, but if you want to install it you can use
15 the "make install" target that will copy the binary in /usr/local/bin
16 for default. You can also use "make PREFIX=/some/other/directory install"
17 if you wish to use a different destination.
18
19 You can run a 32 bit Redis binary using:
20
21 % make 32bit
22
23 After building Redis is a good idea to test it, using:
24
25 % make test
26
27 NOTE: 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
31 Allocator
32 ---------
33
34 By default Redis compiles and links against jemalloc under Linux, since
35 glibc malloc() has memory fragmentation problems.
36
37 To force a libc malloc() build use:
38
39 make FORCE_LIBC_MALLOC=yes
40
41 In all the other non Linux systems the libc malloc() is used by default.
42
43 On Mac OS X you can force a jemalloc based build using the following:
44
45 make USE_JEMALLOC=yes
46
47 Verbose build
48 -------------
49
50 Redis will build with a user friendly colorized output by default.
51 If you want to see a more verbose output use the following:
52
53 make V=1
54
55 Running Redis
56 -------------
57
58 To run Redis with the default configuration just type:
59
60 % cd src
61 % ./redis-server
62
63 If you want to provide your redis.conf, you have to run it using an additional
64 parameter (the path of the configuration file):
65
66 % cd src
67 % ./redis-server /path/to/redis.conf
68
69 Playing with Redis
70 ------------------
71
72 You can use redis-cli to play with Redis. Start a redis-server instance,
73 then 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
89 You can find the list of all the available commands here:
90
91 http://redis.io/commands
92
93 Enjoy!