]> git.saurik.com Git - redis.git/blame - README
Better installation info inside README file.
[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
d3207647 14You can run a 32 bit Redis binary using:
15
16 % make 32bit
17
3fb1c8a0 18After building Redis is a good idea to test it, using:
d3207647 19
20 % make test
21
3fb1c8a0
JO
22NOTE: if after building Redis with a 32 bit target you need to rebuild it
23 with a 64 bit target you need to perform a "make clean" in the root
24 directory of the Redis distribution.
25
26Allocator
27---------
28
29By default Redis compiles and links against jemalloc under Linux, since
30glibc malloc() has memory fragmentation problems.
31
32To force a libc malloc() build use:
33
ca1f766a 34 % make FORCE_LIBC_MALLOC=yes
3fb1c8a0
JO
35
36In all the other non Linux systems the libc malloc() is used by default.
37
38On Mac OS X you can force a jemalloc based build using the following:
39
ca1f766a 40 % make USE_JEMALLOC=yes
3fb1c8a0
JO
41
42Verbose build
43-------------
44
45Redis will build with a user friendly colorized output by default.
46If you want to see a more verbose output use the following:
47
ca1f766a 48 % make V=1
0a802bd7 49
d3207647 50Running Redis
51-------------
52
53To run Redis with the default configuration just type:
54
55 % cd src
56 % ./redis-server
57
58If you want to provide your redis.conf, you have to run it using an additional
59parameter (the path of the configuration file):
60
61 % cd src
62 % ./redis-server /path/to/redis.conf
63
64Playing with Redis
65------------------
66
67You can use redis-cli to play with Redis. Start a redis-server instance,
68then in another terminal try the following:
69
70 % cd src
71 % ./redis-cli
72 redis> ping
73 PONG
74 redis> set foo bar
75 OK
76 redis> get foo
77 "bar"
78 redis> incr mycounter
79 (integer) 1
80 redis> incr mycounter
81 (integer) 2
82 redis>
83
84You can find the list of all the available commands here:
85
e491a1a1 86 http://redis.io/commands
d3207647 87
ca1f766a 88Installing Redis
89-----------------
90
91In order to install Redis binaries into /usr/local/bin just use:
92
93 % make install
94
95You can use "make PREFIX=/some/other/directory install" if you wish to use a
96different destination.
97
98Make install will just install binaries in your system, but will not configure
99init scripts and configuration files in the appropriate place. This is not
100needed if you want just to play a bit with Redis, but if you are installing
101it the proper way for a production system, we have a script doing this
102for Ubuntu and Debian systems:
103
104 % cd utils
105 % ./install_server
106
107The script will ask you a few questions and will setup everything you need
108to run Redis properly as a background daemon that will start again on
109system reboots.
110
111You'll be able to stop and start Redis using the script named
112/etc/init.d/redis_<portnumber>, for instance /etc/init.d/redis_6379.
113
d3207647 114Enjoy!