`
wangxiaohigh
  • 浏览: 1423657 次
文章分类
社区版块
存档分类
最新评论

在Ubuntu11.04上安装分布式文件系统CEPH

 
阅读更多

CEPH的好处我就不说了, 之前在RED HAT上折腾了好多次, 都不成功, 因为要升级系统内核, 还有很多乱七八糟的依赖库都找不到,折腾来折腾去总是失败,最后算了,还是先在Ubuntu上弄好以后在慢慢折腾RedHat吧。

为何选择Ubuntu,因为Ubuntu的内核比较新,文件系统支持btrfs,btrfs系统是在Linux2.6.34中才加入的,而Ubuntu的最新版本11.04的系统内核是Linux2.6.38,显然是支持btrfs文件系统的, 其他的系统即使你费尽的升级了内核, 这文件系统的修改还要看你当时安装系统的时候的磁盘划分,如果有单独的盘可用,那你升级一下也可以,要不然就麻烦了。 在安装Ubuntu的时候,可以直接格式化为btrfs的文件系统, 要不然安装了也很难使用, 除非你可以挂硬盘,但是我在虚拟机上使用, 无法挂硬盘。

需要安装的软件:

1.cryptopp ;cryptopp-progs; cryptopp-devel

2.boost-devel

3.gcc-c++

4.libedit-devel

5.openssl-devel

6.fuse-devel-----如果需要使用fuse客户端就需要安装这个软件包

7.libatomic_ops-devel

下载最新版本的 ceph,我的是CEPH0.29, 解压缩到随便一个目录。

第一:进入到 ceph目录,执行autogen.sh脚本,如下

root@zhangceph:/home/ceph-0.29# ./autogen.sh
./autogen.sh: 15: aclocal: not found
./autogen.sh: 17: libtoolize: not found
./autogen.sh: 18: autoconf: not found
./autogen.sh: 19: autoheader: not found
./autogen.sh: 20: automake: not found
./autogen.sh: 21: autoreconf: not found

第二:缺什么东西就安装什么东西吧,根据上面的提示,安装吧。

apt-get install libtool

apt-get install autoconf

安装完成后在执行 ./autogen.sh 脚本成功后进入下面的步骤。

第三:执行 ./configure ,会有如下错误

checking for pthread_create in -lpthread... yes
checking for add_key in -lkeyutils... no
configure: error: in `/home/ceph-0.29':
configure: error: libkeyutils not found
See `config.log' for more details

缺少 libkeyutils 库, 我们就安装一下,

apt-get install libkeyutils-dev

安装完成后在执行 ./configure

第四:执行 ./configure ,会有如下错误

configure: error: in `/home/ceph-0.29':
configure: error: no suitable crypto library found
See `config.log' for more details

缺少 crypto 库, 安装一下吧

apt-get install crypto++

这个加密库 crypto安装完后, 在安装一下 fuse,因为客户端需要, fuse安装请到官方网站下载fuse的源码包进行make安装吧。

第五:执行 ./configure --without-tcmalloc 出如下错误

checking for LIBEDIT... no
configure: error: in `/home/ceph-0.29':
configure: error: No usable version of libedit found.
See `config.log' for more details

那就安装 libedit库吧

apt-get install libedit-dev

第六: 执行 ./configure --without-tcmalloc --without-libatomic-ops , 提示如下错误,要安装boost库, 那就安装吧

checking boost/spirit.hpp usability... no
checking boost/spirit.hpp presence... no
checking for boost/spirit.hpp... no
configure: error: in `/home/ceph-0.29':
configure: error: "Can't find boost spirit headers"
See `config.log' for more details

下载源代码自己编译安装,

解压boost库后,进入boost目录,执行

root@zhangceph:/home/boost_1_45_0# ./bootstrap.sh 脚本,生成 bjam可执行程序,然后再执行下面的配置,就编译完成了。

./bjam --with-date_time --with-system --with-regex --with-thread --with-filesystem --with-serialization --with-iostreams --with-math --with-mpi --with-program_options --with-python --with-math --with-signals --layout=tagged install variant=debug,release link=static --runtime-link=static threading=multi stage

安装完boost库后, 执行 ./configure --without-tcmalloc --without-libatomic-ops 就成功了。

下来make吧。

编译完成了, 下来就是配置和启动了。

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics