leveldb是google公司开发高效的kv数据库,下载地址:http://leveldb.googlecode.com/files/leveldb-1.9.0.tar.gz,参考资料:http://www.oschina.net/p/leveldb
kyoto tycoon必须在kyoto canbinet安装之后,kt依赖于kc部分库。本文安装顺序是leveldb、kc、kt。
本文的安装环境是:
Linux version 2.6.32-100.34.1.el6uek.x86_64 (mockbuild@ca-build44.us.oracle.com) (gcc version 4.4.4 20100726 (Red Hat 4.4.4-13) (GCC) ) #1 SMP Wed May 25 17:46:45 EDT 2011
1.下载leveldb源码
2.修改Makefile(关键点)
增加-fPIC命令参数
CFLAGS += -I. -I./include -fPIC $(PLATFORM_CCFLAGS) $(OPT)
CXXFLAGS += -I. -I./include -fPIC $(PLATFORM_CXXFLAGS) $(OPT)
3.编译安装:make && make install
4.cp libleveldb.a /usr/local/lib
5.cp -r include/leveldb /usr/local/include
1.wget http://fallabs.com/kyotocabinet/pkg/kyotocabinet-1.2.75.tar.gz
2../configure
3.make
4.make install
1.wget http://fallabs.com/kyototycoon/pkg/kyototycoon-0.9.56.tar.gz
2../configure
3.make &&make install
4.cd ./kyototycoon-0.9.56/lab/leveldb
5.make
6.cp ktplugdblevel.so /usr/local/lib
7.echo "/usr/local/lib" >>/etc/ld.so.conf
8. ldconfig -v
打开服务器端: ktserver -pldb /usr/local/lib/ktplugdblevel.so casket.ldb