Sharing

2011年9月7日 星期三

Ceph 0.34 build from source

如果想要安裝最新版的 Ceph, 而非 Ubuntu 11.04 official 的 0.24 版,
可以參考
http://ceph.newdream.net/wiki/DebianBuilding from source


# Step 1: install relative package to build source code
root@ubuntu1104-64-5:~/src$ apt-get install debhelper autotools-dev autoconf automake g++ gcc cdbs libfuse-dev libboost-dev libedit-dev libssl-dev libtool libexpat1-dev libfcgi-dev libatomic-ops-dev libgoogle-perftools-dev pkg-config libgtkmm-2.4-dev libcrypto++-dev python-dev

# Step 2: get the source code
root@ubuntu1104-64-5:~/src$ git clone git://ceph.newdream.net/git/ceph.git

# Step 3: get the stable version
root@ubuntu1104-64-5:~/src$ cd ceph
root@ubuntu1104-64-5:~/src/ceph$ git checkout -b stable origin/stable

# Step 4: Build the .deb installation package
root@ubuntu1104-64-5:~/src/ceph$ dpkg-buildpackage -j16

前置步驟要花一些時間, 好了之後到上一層可以發現 .deb 都生出來了

root@ubuntu1104-64-5:~/src$ ls
ceph                                    libceph-dev_0.34-1_amd64.deb
ceph_0.34-1_amd64.changes               librados2_0.34-1_amd64.deb
ceph_0.34-1_amd64.deb                   librados2-dbg_0.34-1_amd64.deb
ceph_0.34-1.dsc                         librados-dev_0.34-1_amd64.deb
ceph_0.34-1.tar.gz                      librbd1_0.34-1_amd64.deb
ceph-client-tools_0.34-1_amd64.deb      librbd1-dbg_0.34-1_amd64.deb
ceph-client-tools-dbg_0.34-1_amd64.deb  librbd-dev_0.34-1_amd64.deb
ceph-dbg_0.34-1_amd64.deb               librgw1_0.34-1_amd64.deb
ceph-fuse_0.34-1_amd64.deb              librgw1-dbg_0.34-1_amd64.deb
ceph-fuse-dbg_0.34-1_amd64.deb          librgw-dev_0.34-1_amd64.deb
gceph_0.34-1_amd64.deb                  obsync_0.34-1_amd64.deb
gceph-dbg_0.34-1_amd64.deb              python-ceph_0.34-1_amd64.deb
libceph1_0.34-1_amd64.deb               radosgw_0.34-1_amd64.deb
libceph1-dbg_0.34-1_amd64.deb           radosgw-dbg_0.34-1_amd64.deb

那就把所有的 .deb 都裝起來, 不過裝的過程中發現還是有些 dependency 的 package 還沒裝

root@ubuntu1104-64-5:~/src$ apt-get install libxslt1.1 python-boto python-pyxattr python-lxml
root@ubuntu1104-64-5:~/src$ dpkg -i *.deb

# 裝好之後檢查一下版本
root@ubuntu1104-64-5:~/src$ ceph --version
ceph version 0.34-4-g7a8ab74 (commit:7a8ab747addf493cb4b82351aeb3c2e07ba46a95)


整個流程還算順利, 沒有太多問題


2011/12/20 補:
後來的版本都可以用 sudo apt-get install ceph python-ceph 來安裝,但如果還是自行改 code, 則可以參考原始的作法,我在 0.39 時有試過
另一個可以參考的網頁:
http://ceph.newdream.net/wiki/Checking_out


沒有留言: