Ceph 開發環境建置

0. download

1. create VMs

2. installing

安裝Ceph-Deploy

1. adds key

wget -q -O- 'https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc' | sudo apt-key add -
 
// QA and developers only
wget -q -O- 'https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/autobuild.asc' | sudo apt-key add -

2. 更新sources.list

echo deb http://ceph.com/packages/ceph-extras/debian precise main | sudo tee /etc/apt/sources.list.d/ceph-extras.list

3. add Ceph repositories

sudo apt-add-repository 'deb http://ceph.com/debian-firefly/ trusty main'

4. add APACHE/FASTCGI

echo deb http://gitbuilder.ceph.com/apache2-deb-trusty-x86_64-basic/ref/master trusty main | sudo tee /etc/apt/sources.list.d/ceph-apache.list
echo deb http://gitbuilder.ceph.com/libapache-mod-fastcgi-deb-trusty-x86_64-basic/ref/master trusty main | sudo tee /etc/apt/sources.list.d/ceph-fastcgi.list

5. install ceph-deploy

sudo apt-get update && sudo apt-get install ceph-deploy

編輯/etc/hosts

127.0.0.1         localhost
192.168.168.6     m.glusterlab     m
192.168.168.5     c.glusterlab     c
192.168.168.11    n1.glusterlab    n1
192.168.168.12    n2.glusterlab    n2
192.168.168.13    n3.glusterlab    n3
192.168.168.14    n4.glusterlab    n4
192.168.168.15    c0.cephlab       c0

Ceph Node Setup

apt-get install -y ntp ntpdate ntp-doc
apt-get install -y openssh-server

建立專用的用戶

在每個Ceph node上,建立新用戶

為求簡單: 用戶名稱 ricky;用戶密碼 111111

sudo useradd -d /home/ricky -m ricky
 
sudo passwd ricky

在每個Ceph node上為用戶增加root權限

echo "ricky ALL = (root) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/ricky
sudo chmod 0440 /etc/sudoers.d/ricky

TBD

除非特別註明,本頁內容採用以下授權方式: Creative Commons Attribution-ShareAlike 3.0 License