ITeye博客

tokyocabinet数据库自定义安装步骤

wanglihu · 2011-12-26 10:02 · tokyo tyrant 技术 · 数据库 · Cache · TokyoCabinet · Markdown

tokyocabinet-1.4.47.tar.gz下载地址: http://fallabs.com/tokyocabinet/tokyocabinet-1.4.47.tar.gz tokyotyrant-1.1.41.tar.gz下载地址: http://fallabs.com/tokyotyrant/tokyotyrant-1.1.41.tar.gz 自定义安装目录:/home/wlh/tt/ 首先安装tokyocabinet 1.

tar xzf tokyocabinet-1.4.47.tar.gz
cd tokyocabinet-1.4.47
./configure --prefix=/home/wlh/tt/tokyocabinet/

成功: #================================================================

Ready to make.

#================================================================ 4.

MAKE

成功: #================================================================

Ready to install.

#================================================================ 5.

MAKE INSTALL

成功: #================================================================

Thanks for using Tokyo Cabinet.

#================================================================ 然后安装 tokyotyrant 1.

tar xzf  tokyotyrant-1.1.41.tar.gz
cd tokyotyrant-1.1.41.tar.gz
./configure--prefix=/home/wlh/tt/tokyotyrant/ --with-tc=/home/wlh/tt/

tokyocabinet/ 注:with-tc指定Tokyo Cabinet的目录 成功: #================================================================

Ready to make.

#================================================================ 4.

Make

成功: #================================================================

Ready to install.

#================================================================ 5.

Make install

成功:

#================================================================

Thanks for using Tokyo Tyrant.

#================================================================

注: 源码的安装一般由3个步骤组成:配置(configure)、编译(make)、安装(make install),具体的安装方法一般作者都会给出文档,这里主要讨论配置(configure)。Configure是一个可执行脚本,它有很多选项,使用命令./configure –help输出详细的选项列表,如下: -bash-3.00# ./configure --help Usage: configure
Options: Configuration: --cache-file=FILE cache test results in FILE --help print this message --no-create do not create output files --quiet, --silent do not print `checking...' messages --version print the version of autoconf that created configure Directory and file names: --prefix=PREFIX install architecture-independent files in PREFIX

--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX

--bindir=DIR user executables in DIR ……….(省略若干) 很多的选项,你可以忽略其他的一切,但请把—prefix加上。这里以安装tokyocabinet-1.4.47为例,我们打算把它安装到目录 /home/wlh/tt/tokyocabinet,于是在tokyocabinet-1.4.47目录执行带选项的脚本./configure --prefix=/home/wlh/tt/tokyocabinet/,执行成功后再编译、安装(make,make install);安装完成将自动生成目录tokyocabinet,而且该软件所有的档都被复制到这个目录。为什么要指定这个安装目录?是为了以后的维护方便,如果没有用这个选项,安装过程结束后,该软件所需的软件被复制到不同的系统目录下,很难弄清楚到底复制了那些档、都复制到哪里去了—基本上是一塌糊涂。 用了—prefix选项的另一个好处是卸载软件或移植软件。当某个安装的软件不再需要时,只须简单的删除该安装目录,就可以把软件卸载得干干净净;移植软件只需拷贝整个目录到另外一个机器即可(相同的操作系统)。

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。