> CentOS > CentOS教程 >

Centos 6.4 安装Ceph

根据Ceph官网提供的文档,手动进行安装

# Add Keys
# 首先要安装一个release.asc key

 
  1. sudo rpm --import 'https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc'  

or
# QA and developers only
 
  1. sudo rpm --import 'https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/autobuild.asc'  

# Add Ceph Extras
# 在/etc/yum.repos.d/这个路径下创建一个repo文件,比如ceph-extras.repo,设置priority=2

 
  1. [ceph-extras]  
  2. name=Ceph Extras Packages  
  3. baseurl=http://ceph.com/packages/ceph-extras/rpm/centos6/$basearch  
  4. enabled=1  
  5. priority=2  
  6. gpgcheck=1  
  7. type=rpm-md  
  8. gpgkey=https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc  
  9.   
  10. [ceph-extras-noarch]  
  11. name=Ceph Extras noarch  
  12. baseurl=http://ceph.com/packages/ceph-extras/rpm/centos6/noarch  
  13. enabled=1  
  14. priority=2  
  15. gpgcheck=1  
  16. type=rpm-md  
  17. gpgkey=https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc  
  18.   
  19. [ceph-extras-source]  
  20. name=Ceph Extras Sources  
  21. baseurl=http://ceph.com/packages/ceph-extras/rpm/centos6/SRPMS  
  22. enabled=1  
  23. priority=2  
  24. gpgcheck=1  
  25. type=rpm-md  
  26. gpgkey=https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc  

# Add Ceph
# 在/etc/yum.repos.d/这个路径下创建一个repo文件,比如ceph.repo

 
  1. [ceph]  
  2. name=Ceph packages for $basearch  
  3. baseurl=http://ceph.com/rpm-{ceph-release}/{distro}/$basearch  
  4. enabled=1  
  5. gpgcheck=1  
  6. type=rpm-md  
  7. gpgkey=https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc  
  8.   
  9. [ceph-noarch]  
  10. name=Ceph noarch packages  
  11. baseurl=http://ceph.com/rpm-{ceph-release}/{distro}/noarch  
  12. enabled=1  
  13. gpgcheck=1  
  14. type=rpm-md  
  15. gpgkey=https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc  
  16.   
  17. [ceph-source]  
  18. name=Ceph source packages  
  19. baseurl=http://ceph.com/rpm-{ceph-release}/{distro}/SRPMS  
  20. enabled=0  
  21. gpgcheck=1       
  22. type=rpm-md  
  23. gpgkey=https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc  

# {ceph-release}用ceph的版本来替换,参考http://ceph.com/docs/master/release-notes/;{distro}用linux系统来选择,Centos 6.4的话是el6;我这里选择ceph-release是v0.67.3 “Dumpling”,所以http://ceph.com/rpm-{ceph-release}/{distro}就用http://ceph.com/rpm-dumpling/el6/来替换。

# 对于development版本,rpm-{ceph-release}用rpm-testing替换即可。

# Add Apache/FastCGI
# Ceph对Apache、FastCGI做了一些修改,以便支持100-continue
# 在/etc/yum.repos.d/这个路径下创建两个repo文件,比如ceph-apache.repo和ceph-fastcgi.repo

# ceph-apache.repo
 
  1. [apache2-ceph-noarch]  
  2. name=Apache noarch packages for Ceph  
  3. baseurl=http://gitbuilder.ceph.com/apache2-rpm-{distro}-x86_64-basic/ref/master  
  4. enabled=1  
  5. priority=2  
  6. gpgcheck=1  
  7. type=rpm-md  
  8. gpgkey=https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/autobuild.asc  
  9.   
  10. [apache2-ceph-source]  
  11. name=Apache source packages for Ceph  
  12. baseurl=http://gitbuilder.ceph.com/apache2-rpm-{distro}-x86_64-basic/ref/master  
  13. enabled=0  
  14. priority=2  
  15. gpgcheck=1  
  16. type=rpm-md  
  17. gpgkey=https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/autobuild.asc  

# ceph-fastcgi.repo
 
  1. [fastcgi-ceph-basearch]  
  2. name=FastCGI basearch packages for Ceph  
  3. baseurl=http://gitbuilder.ceph.com/mod_fastcgi-rpm-{distro}-x86_64-basic/ref/master  
  4. enabled=1  
  5. priority=2  
  6. gpgcheck=1  
  7. type=rpm-md  
  8. gpgkey=https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/autobuild.asc  
  9.   
  10. [fastcgi-ceph-noarch]  
  11. name=FastCGI noarch packages for Ceph  
  12. baseurl=http://gitbuilder.ceph.com/mod_fastcgi-rpm-{distro}-x86_64-basic/ref/master  
  13. enabled=1  
  14. priority=2  
  15. gpgcheck=1  
  16. type=rpm-md  
  17. gpgkey=https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/autobuild.asc  
  18.   
  19. [fastcgi-ceph-source]  
  20. name=FastCGI source packages for Ceph  
  21. baseurl=http://gitbuilder.ceph.com/mod_fastcgi-rpm-{distro}-x86_64-basic/ref/master  
  22. enabled=0  
  23. priority=2  
  24. gpgcheck=1  
  25. type=rpm-md  
  26. gpgkey=https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/autobuild.asc  

# Centos 6.4 下使用centos6替换{distro}

# Download Packages
# 加载一个第三方依赖的repo
 
  1. su -c 'rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm'  

# 列出了Ceph的依赖
snappy
leveldb
gdisk
python-argparse
gperftools-libs

# 下载
 
  1. su -c 'rpm -Uvh http://ceph.com/rpm-dumpling/el6/noarch/ceph-release-1-0.el6.noarch.rpm'  

# yum安装
 
  1. yum install ceph  

 

# 此外还需要安装一些扩展

 
  1. yum install ceph-devel  
 

 

# 大概是这么一个效果






(责任编辑:IT)