読者です 読者をやめる 読者になる 読者になる

DELAEMON BLOG

Live as if you were to die tomorrow. Learn as if you were to live forever.

redis3.2@Fedora22

環境

OS: Fedora22

概要

dnsコマンドではredis2.8がinstallされるので、redis3.2を手動でビルド

手順

1. ソースをダウンロード

% wget http://download.redis.io/releases/redis-3.2.5.tar.gz
% tar xvzf redis-3.2.5.tar.gz
% cd redis-3.2.5/

README.mdよんで手順を確認

2. ビルド

% make

....

    CC geo.o
    LINK redis-server
    INSTALL redis-sentinel
    CC redis-cli.o
    LINK redis-cli
    CC redis-benchmark.o
    LINK redis-benchmark
    INSTALL redis-check-rdb
    CC redis-check-aof.o
    LINK redis-check-aof

Hint: It's a good idea to run 'make test' ;)

make[1]: Leaving directory '/home/dela/source/redis-3.2.5/src'

geo.oがみえる。3.2からGEO APIが追加された。

3. ビルドのテスト

% make test

....

\o/ All tests passed without errors!

Cleanup: may take some time... OK
make[1]: Leaving directory '/home/dela/source/redis-3.2.5/src'

4. 起動

% ./src/redis-server

5. 疎通確認

% (echo "PING\r\nPING\r\nPING\r\n"; sleep 1) | nc localhost 6379
+PONG
+PONG
+PONG

その他

ヘルプ見てみる

./src/redis-server -h
Usage: ./redis-server [/path/to/redis.conf] [options]
       ./redis-server - (read config from stdin)
       ./redis-server -v or --version
       ./redis-server -h or --help
       ./redis-server --test-memory <megabytes>

Examples:
       ./redis-server (run the server with default conf)
       ./redis-server /etc/redis/6379.conf
       ./redis-server --port 7777
       ./redis-server --port 7777 --slaveof 127.0.0.1 8888
       ./redis-server /etc/myredis.conf --loglevel verbose

Sentinel mode:
       ./redis-server /etc/sentinel.conf --sentinel

"--test-memory"とは。
Problems with Redis? This is a good starting point. – Redis

% ./src/redis-server --test-memory 1000

# AAA..., CCC..., RRR..., SSS....,で画面が埋まるけど放置

Your memory passed this test.
Please if you are still in doubt use the following two tools:
1) memtest86: http://www.memtest86.com/
2) memtester: http://pyropus.ca/software/memtester/

latency problems troubleshootingのページも役立ちそう。
Redis latency problems troubleshooting – Redis