分享

ceph的安装过程

 醉人说梦 2017-09-07

  1.   

 前面一段时间公司要求找一个分布式软件,于是就看了下开源的ceph,在官网上http:///download/下载了ceph-0.52.tar.gz源码包。

这儿记录了下自己安装的过程:

        操作系统使用的是: CentOS-6.3-x86_64;

        一、先安装一些编译常用工具,也是本次编译所需要用到的工具:

  1. <span style="font-size:14px;"><span style="white-space:pre">    </span>yum install automake autoconf automake libtool make</span>  
       二、然后就开始编译ceph源码了,解压ceph-0.52.tar.gz,并进入到源码目录下:

  1. <span style="font-size:14px;"><span style="white-space:pre">    </span>#tar -xzf ceph-0.52.tar.gz  
  2. <span style="white-space:pre">  </span>#cd ceph-0.5.2  
  3. <span style="white-space:pre">  </span>#./autogen.sh  
  4. <span style="white-space:pre">  </span>#./configure</span>  

执行./configure时会报一些错误:

  1. <span style="font-size:14px;"><span style="white-space:pre">    </span>configure: error: libuuid not found  
  2. <span style="white-space:pre">  </span>configure: error: no FUSE found (use --without-fuse to disable)  
  3. <span style="white-space:pre">  </span>configure: error: No usable version of libedit found.  
  4. <span style="white-space:pre">  </span>configure: error: libaio not found</span>  
        这是因为缺少一些依赖包,安装所需要的依赖包:

  1. <span style="font-size:14px;"><span style="white-space:pre">    </span>yum install libuuid-devel  
  2. <span style="white-space:pre">  </span>yum install fuse-devel  
  3.  <span style="white-space:pre"> </span>yum install libedit-devel  
  4. <span style="white-space:pre">  </span>yum install libaio-devel  
  5. <span style="white-space:pre">  </span>yum install keyutils-libs-devel  
  6. <span style="white-space:pre">  </span>yum install gcc-c++  
  7. <span style="white-space:pre">  </span>yum install cryptopp-devel</span>  
成功安装好以上依赖包后在执行命令:
  1. <span style="font-size:14px;"><span style="white-space:pre">    </span>#./configure --without-tcmalloc --without-libatomic-ops</span>  
        运行这个命令的时候又遇到问题,还是的继续解决:
  1. <span style="font-size:14px;"><span style="white-space:pre">    </span>checking boost/spirit.hpp usability... </span>  
  1. <span style="font-size:14px;"><span style="white-space:pre">    </span>nochecking boost/spirit.hpp presence... </span>  
  1. <span style="font-size:14px;"><span style="white-space:pre">    </span>nochecking for boost/spirit.hpp... </span>  
  1. <span style="font-size:14px;"><span style="white-space:pre">    </span>noconfigure: error: in `/home/ceph-0.29':</span>  
  1. <span style="font-size:14px;"><span style="white-space:pre">    </span>configure: error: "Can't find boost spirit headers"See `config.log' for more details</span>  
          这是缺少boost,我通过yum安装boost后没有解决,于是我下载boost源码包boost_1_46_0.tar.gz,解压后进行编译:

  1. <span style="white-space:pre">  </span># ./bootstrap.sh  //脚本,生成 bjam可执行程序,然后再执行下面的配置,就编译完成了。  
  2.    
  3. <span style="white-space:pre">  </span>#./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  

     以上完成后,再执行命令:

  1. <span style="white-space:pre">  </span>./configure --without-tcmalloc --without-libatomic-ops  
     成功通过。现在就进行编译:

  1. <span style="white-space:pre">  </span>#make  
     哈哈,“前途是光明的,道路是曲折的”,又遇到了不想遇到的问题:

  1. <span style="white-space:pre">  </span>error: expat.h: No such file or directory  
  2. <span style="white-space:pre">  </span>error: ‘XML_Parser’ does not name a type  
     一看就知道肯定是缺少某个包:

  1. <span style="white-space:pre">  </span>yum install expat-deve  
     安装好后再编译:

  1. <span style="white-space:pre">  </span>#make  
  2. <span style="white-space:pre">  </span>#make install  
     到此,安装成功!!!!

     当然,你可以通过官网上的安装方法安装:

     http:///docs/master/install/rpm/






    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约