将所有的文件都安装到kt-leveldb目录下
1.安装kyoto cabinet
1.wget http://fallabs.com/kyotocabinet/pkg/kyotocabinet-1.2.75.tar.gz
2../configure --prefix=/home/admin/lb-tt/kt-leveldb/
3.make
4.make install
2.安装leveldb
1.svn co http://leveldb.googlecode.com/svn/trunk leveldb
2.chmod a+x build_detect_platform
3.给makefile添加-fpic
-CFLAGS += -I. -I./include $(PLATFORM_CCFLAGS) $(OPT)
-CXXFLAGS += -I. -I./include $(PLATFORM_CXXFLAGS) $(OPT)
+CFLAGS += -I. -I./include -fPIC $(PLATFORM_CCFLAGS) $(OPT)
+CXXFLAGS += -I. -I./include -fPIC $(PLATFORM_CXXFLAGS) $(OPT)4.make
5.cp libleveldb.a /home/admin/lb-tt/kt-leveldb/lib/
6. cp –r include/leveldb /home/admin/lb-tt/kt-leveldb/include/
3.安装kyoto tycoon
1.wget http://fallabs.com/kyototycoon/pkg/kyototycoon-0.9.56.tar.gz
2../configure --prefix=/home/admin/lb-tt/kt-leveldb/ --with-kc=/home/admin/lb-tt/kt-leveldb/ 编译的时候需要依赖kc
3.make &&make install
4.cd ./kyototycoon-0.9.56/lab/leveldb 修改makefile文件
5.相应添加 -I/home/admin/lb-tt/kt-leveldb/include 和 -L/home/admin/lb-tt/kt-leveldb/lib
6.make
7.cp ktplugdblevel.so /home/admin/lb-tt/kt-leveldb/lib
8. 添加PATH和LD_LIBRARY_PATH
即可完成编译