LoginSignup
2
2

More than 5 years have passed since last update.

yrmcdsをAmazon Linuxで試してみる 其の①

Posted at

先日、久々の更新があったようなので、少し試してみようと思う。

yrmcdsとは?

サイボウズ社にて開発されているKVS。memcachedと互換性がある。
さらにレプリケーションや、オブジェクトの占有などの独自機能も備えているようだ。

詳しくは本家にて。
http://cybozu.github.io/yrmcds/html/#index

インストール

以下が必要なようなので準備する。
・gcc-c++
・libatomic
・google-perftools
・google-perftools-devel

yum install gcc-c++
yum install libatomic.x86_64
wget ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/home:/hmacht:/storage/CentOS_CentOS-6/x86_64/google-perftools-1.9.1-21.1.x86_64.rpm
rpm -ivh google-perftools-1.9.1-21.1.x86_64.rpm
wget ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/home:/hmacht:/storage/CentOS_CentOS-6/x86_64/google-perftools-devel-1.9.1-21.1.x86_64.rpm
rpm -ivh google-perftools-devel-1.9.1-21.1.x86_64.rpm

google-perftoolsたちは、少し古いがrpmからインストールにしておく。

そして、yrmcdsのインストール。

wget https://github.com/cybozu/yrmcds/archive/v1.1.1.tar.gz
tar xvzf v1.1.1.tar.gz
cd yrmcds-1.1.1/
make
make install

注意点としては、nogroupといったグループにて動作するよう、Makefileなどに定義されている。Amazon Linuxではデフォルトにはそのようなグループはないため、インストールできない。
nobodyに置き換えるようにした。

動作確認

起動して動作を確認してみる。

# /usr/local/sbin/yrmcdsd &
# telnet localhost 11211
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
stats
STAT pid 2578
STAT time 1425385609
STAT version yrmcds version 1.1.1
STAT pointer_size 64
STAT rusage_user 0:132000
STAT rusage_system 0:20000
STAT curr_connections 1
STAT total_connections 1
STAT curr_items 0
STAT total_items 0
STAT bytes 0
STAT limit_maxbytes 1073741824
STAT threads 10
STAT gc_count 3
STAT slaves 0
STAT last_expirations 0
STAT last_evictions 0
STAT evictions 0
STAT last_gc_elapsed 40918
STAT total_gc_elapsed 120571
END
get test
END
set test 0 0 4
hoge
STORED
get test
VALUE test 0 4
hoge
END
delete test
DELETED
get test
END

動いてるっぽい!
今日はとりあえずここまで。

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2