- Download and unpack redis from (http://redis.io/download).
- Run
make
ormake 32bit
(good idea to save on memory or when RAM is low). - Run tests with
make test
.
- Copy binaries (
redis-server
,redis-cli
, etc.) insrc/
to/usr/local/bin
. - Setup init.d script:
cd utils
./install_server.sh
- Add
vm.overcommit_memory = 1
to/etc/sysctl.conf
and run the commandsysctl vm.overcommit_memory=1
.
- You'll probably want to uncomment
bind 127.0.0.1
so that Redis is only accessible locally. - Turn on Append Only File (AOF):
appendonly yes
- Tweak these memory-related settings:
- hash-max-ziplist-entries, hash-max-ziplist-value, list-max-ziplist-entries, list-max-ziplist-value, zset-max-ziplist-entries, zset-max-ziplist-value, set-max-intset-entries
- Rename sensitive Redis commands in
redis.conf
:
- rename-command FLUSHDB "FLUSHDB_SOMEOBSCUREWORDS"
- rename-command FLUSHALL ""
- rename-command CONFIG ""