首页 > 代码库 > Install Ceph on Ubuntu 14.04 Server

Install Ceph on Ubuntu 14.04 Server


Ceph1:

vi /etc/hosts (on all nodes)
127.0.0.1    localhost

192.168.1.15    ceph1
192.168.1.16    ceph2
192.168.1.17    ceph3

ssh-keygen -q -t rsa -f ~/.ssh/id_rsa -C ‘‘ -N ‘‘


vi ~/.ssh/config
Host ceph2
  Hostname ceph2
  User root
  StrictHostKeyChecking no


Host ceph3
  Hostname ceph3
  User root
  StrictHostKeyChecking no


ssh-copy-id ceph2

ssh-copy-id ceph3


To get latest ceph-deploy:

wget -q -O- ‘https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc‘ | apt-key add -
echo deb http://ceph.com/debian-firefly/ $(lsb_release -sc) main | tee /etc/apt/sources.list.d/ceph.list

vi /etc/apt/sources.list (on all nodes)
deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse

aptitude update (on all nodes)

aptitude -y install ceph-deploy

ssh ceph2 aptitude update ; ssh ceph3 aptitude update

mkdir ceph-cluster
cd ceph-cluster
ceph-deploy new ceph1
ceph-deploy install ceph1 ceph2 ceph3
ceph-deploy mon create-initial
ceph-deploy osd --zap-disk create ceph1:sdb
ceph-deploy osd --zap-disk create ceph2:sdb
ceph-deploy osd --zap-disk create ceph3:sdb
ceph-deploy admin ceph1 ceph2 ceph3
chmod +r /etc/ceph/ceph.client.admin.keyring
ssh ceph2 chmod +r /etc/ceph/ceph.client.admin.keyring
ssh ceph3 chmod +r /etc/ceph/ceph.client.admin.keyring
ceph-deploy mon add ceph2 ceph3
ceph -w

本文出自 “Ilovecat(个人笔记)” 博客,请务必保留此出处http://hj192837.blog.51cto.com/655995/1440590

Install Ceph on Ubuntu 14.04 Server