Install Ceph on CentOS 5.5

來源:互聯網
上載者:User
文章目錄
  • 附錄2 無需密碼ssh訪問
原文地址:Install Ceph on CentOS 5.5(原創)CentOS5.5 上安裝 Ceph 作者:Eugene為了實驗的簡單性,本實驗就是在一台虛擬CentOS-5.5 i386上進行。

 準備:  

centos5.5 下yum庫擴充工具鏈接:   ftp://ftp.univie.ac.at/systems/linux/dag/redhat/el5/en/x86_64/dag/RPMS/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm   ftp://ftp.univie.ac.at/systems/linux/dag/redhat/el5/en/i386/dag/RPMS/rpmforge-release-0.5.2-2.el5.rf.i386.rpm# yum install rpm-build fuse-devel libtool libtool-ltdl-devel boost-devel libedit-devel gitopenssl-devel gcc-c++ btrfs-progs步驟1、因為光碟片上的核心版本不是最新,所有第一步就是編譯核心,本實驗選擇的是2.6.37。  # make mrproper && # make menuconfig  認真尋找將與btrfs和Ceph相關的選項多選擇上,儲存退出# make bzImage && # make modules && # make modules_install && # make install(注意其中會出現兩個錯誤,請參照本部落格的另外兩篇博文)
步驟2、安裝btrfs和建立btrfs檔案系統下載源碼包:btrfs-progs-0.19.tar.gz , 注意步驟1中我們已經將btrfs編入核心,就無需源碼包btrfs-0.xx。tar -zxvf XXXX && make && make install可以實驗一下: fdisk /dev/sdb ...&& mkdir /mnt/btrfs && mkfs.btrfs /dev/sdb1 && mount -t btrfs /dev/sdb1 /mnt/sdb1 && df 一下就能看到結果 ,記得umount掉。
步驟3、安裝ceph進入源碼包ceph-0.24 , ./autogen && ./configure && make &&make install在這個過程中會出現一些問題(1)要求安裝libcrypto++:下載源碼包cryptopp561.zip,&& mkdir cryptopp561 &&cd &&unzip ../cryptopp561.zip && vim GNUmakefile ,CXXFLAGS += -fPIC && make&& make libcryptopp.so && make install(2)要求安裝libedit:因為本系統是i386系列,     rpm -Uvh http://dev.centos.org/centos/5/testing/i386/RPMS/libedit-3.0-2.20090905cvs.el5.centos.i386.rpm     rpm -Uvh http://dev.centos.org/centos/5/testing/i386/RPMS/libedit-devel-3.0-2.20090905cvs.el5.centos.i386.rpm步驟4、# mkcephfs -c /usr/local/etc/ceph/ceph.conf --allhosts --mkbtrfs -k /etc/ceph/keyring.bin# mkcephfs -c /etc/ceph/ceph.conf --allhosts --mkbtrfs -k /etc/ceph/keyring.bin這兩條命令有點混。# /etc/init.d/ceph -a start步驟5、ceph掛載,出現了問題:# mount -t ceph 10.65.1.86:/ /mnt/cephmount: wrong fs type, bad option, bad superblock on 10.65.1.87:/,       missing codepage or other error       In some cases useful info is found in syslog - try       dmesg | tail  or so查看錯誤:[root@ceph86 src]# dmesg | taillibceph: no secret set (for auth_x protocol)libceph: error -22 on auth protocol 2 init問題解決了將ceph-0.24卸載掉後,重裝最新的ceph-0.25.1即可。
附錄1 修改hostname

google 百度一下吧 
這裡主要涉及 /etc/sysconfig/network檔案, hostname命令, /etc/hosts檔案 

附錄2 無需密碼ssh訪問

原理就是公私密金鑰機制,我要向讓別人訪問我,那麼就要把自己的公開金鑰發給別人,這樣他就可以憑該公開金鑰來訪問我了.

$ ssh-keygen –d 
#該命令會在~/.ssh下面產生幾個檔案,這裡有用的是id_dsa.pub,為該節點(甲)的公開金鑰,然後把裡面的內容添加到對方節點(乙) 
#~/.ssh/目錄下的authorized_keys檔案中,如果沒有則建立一個,這樣就從乙節點不要求輸入密碼ssh登陸到甲上了.

附錄3 請記住一定要關閉 selinuxsetenforce 0vim /etc/sysconfig/selinux不然在用戶端對新加進來的裝置操作,會出現錯誤:XXXXXPermission denied為了排除幹擾:servcie iptabes stop
相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.