redisのインストール
遅延処理、非同期処理を実現するためにKVSを使いたいと去年から考えていたが、プロジェクトで実装する手間が かかるので、なかなか実践していなかった。それでredisを実装することで進めていこうかな。
redisの導入は公式サイトにのっているようインストール手順に従う。
cd /url/local
wget http://download.redis.io/releases/redis-2.8.5.tar.gz
tar xzf redis-2.8.5.tar.gz
cd redis-2.8.5
make
redisサーバ起動
src/redis-server
kazuyukiikeda-no-MacBook-Pro% src/redis-server
[72419] 07 Feb 16:32:10.924 # Warning: no config file specified, using the default config. In order to specify a config file use src/redis-server /path/to/redis.conf
[72419] 07 Feb 16:32:10.926 * Max number of open files set to 10032
_._
_.-``__ ''-._
_.-`` `. `_. ''-._ Redis 2.8.5 (cb97f3e5/0) 64 bit
.-`` .-```. ```\/ _.,_ ''-._
( ' , .-` | `, ) Running in stand alone mode
|`-._`-...-` __...-.``-._|'` _.-'| Port: 6379
| `-._ `._ / _.-' | PID: 72419
`-._ `-._ `-./ _.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' | http://redis.io
`-._ `-._`-.__.-'_.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' |
`-._ `-._`-.__.-'_.-' _.-'
`-._ `-.__.-' _.-'
`-._ _.-'
`-.__.-'
[72419] 07 Feb 16:32:10.930 # Server started, Redis version 2.8.5
[72419] 07 Feb 16:32:10.945 * The server is now ready to accept connections on port 6379
これで完了。 redisの設定とrailsアプリへの設定と実装を今度記事にします。