Ceph 安装

newdye 2016-09-24

http://www.linuxidc.com/Linux/2013-05/85210.htm

http://www.cnblogs.com/javawebsoa/archive/2013/05/31/3111541.html

http://www.cnblogs.com/AlfredChen/p/3897015.html

http://blog.chinaunix.net/uid-657291-id-2078434.html

http://dreamfire.blog.51cto.com/418026/1084729/

wget https://github.com/ceph/ceph/archive/v0.94.3.tar.gz

mv v0.94.3.tar.gz ceph-v0.94.3.tar.gz

tar –zxvf ceph-v0.94.3.tar.gz

yum install automake autoconf automake libtool make

http://rpmfind.net/linux/rpm2html/search.php

http://rpmfind.net/linux/RPM/SByName.html

http://rpmfind.net/linux/RPM/epel/5/x86_64/snappy-devel-1.0.5-1.el5.x86_64.html

http://rpmfind.net/linux/RPM/centos/6.7/x86_64/Packages/snappy-devel-1.1.0-1.el6.x86_64.html

http://rpmfind.net/linux/RPM/epel/5/x86_64/snappy-1.0.5-1.el5.x86_64.html

wget ftp://fr2.rpmfind.net/linux/epel/5/x86_64/snappy-devel-1.0.5-1.el5.x86_64.rpm

Wget ftp://fr2.rpmfind.net/linux/centos/6.7/os/x86_64/Packages/snappy-devel-1.1.0-1.el6.x86_64.rpm

wget ftp://fr2.rpmfind.net/linux/epel/5/x86_64/snappy-1.0.5-1.el5.x86_64.rpm

rpm -ivh snappy-1.0.5-1.el6.x86_64.rpm

rpm -ivh snappy-devel-1.0.5-1.el6.x86_64.rpm

 

 

http://rpmfind.net/linux/RPM/LByName.html

https://leveldb.googlecode.com/files/leveldb-1.14.0.tar.gz

http://rpmfind.net/linux/rpm2html/search.php?query=libleveldb.so.1()(64bit)

http://rpmfind.net//linux/RPM/epel/6/x86_64/leveldb-1.7.0-2.el6.x86_64.html

ftp://rpmfind.net/linux/epel/6/x86_64/leveldb-1.7.0-2.el6.x86_64.rpm

http://rpmfind.net//linux/RPM/epel/6/x86_64/leveldb-devel-1.7.0-2.el6.x86_64.html

ftp://rpmfind.net/linux/epel/6/x86_64/leveldb-devel-1.7.0-2.el6.x86_64.rpm

wget ftp://rpmfind.net/linux/epel/6/x86_64/leveldb-1.7.0-2.el6.x86_64.rpm

wget ftp://rpmfind.net/linux/epel/6/x86_64/leveldb-devel-1.7.0-2.el6.x86_64.rpm

rpm -ivh leveldb-1.7.0-2.el6.x86_64.rpm

rpm -ivh leveldb-devel-1.7.0-2.el6.x86_64.rpm

 

 

yum install libuuid-devel

yum install  libblkid-devel

yum install libudev-devel

yum install keyutils-libs-devel

ftp://rpmfind.net/linux/epel/6/x86_64/cryptopp-5.6.2-9.el6.x86_64.rpm

ftp://rpmfind.net/linux/epel/6/x86_64/cryptopp-devel-5.6.2-9.el6.x86_64.rpm

wget ftp://rpmfind.net/linux/epel/6/x86_64/cryptopp-5.6.2-9.el6.x86_64.rpm

wget ftp://rpmfind.net/linux/epel/6/x86_64/cryptopp-devel-5.6.2-9.el6.x86_64.rpm

rpm -ivh cryptopp-5.6.2-9.el6.x86_64.rpm

rpm -ivh cryptopp-devel-5.6.2-9.el6.x86_64.rpm

yum install fuse-devel

yum install libedit-devel

yum install libatomic_ops-devel

wget http://download.savannah.gnu.org/releases/libunwind/libunwind-0.99-beta.tar.gz

tar zxvf libunwind-0.99-beta.tar.gz

./configure

make && make install

wget https://googledrive.com/host/0B6NtGsLhIcf7MWxMMF9JdTN3UVk/gperftools-2.2.1.tar.gz

http://rpmfind.net/linux/RPM/opensuse/13.1/x86_64/gperftools-2.1-3.1.2.x86_64.html

ftp://fr2.rpmfind.net/linux/opensuse/distribution/13.1/repo/oss/suse/x86_64/gperftools-2.1-3.1.2.x86_64.rpm

wget ftp://fr2.rpmfind.net/linux/opensuse/distribution/13.1/repo/oss/suse/x86_64/gperftools-2.1-3.1.2.x86_64.rpm

http://download.csdn.net/download/zsjangel/7787337

tar -zxvf gperftools-2.1.tar.gz

./configure

make

make install

yum install libaio-devel

yum -y install xfsprogs-devel

yum -y install boost*

yum install expat-devel

yum install btrfs-progs

./autogen.sh

./configure  --prefix=/usr/local/ceph

 

 

make -j8

make install

 

 

<!--[if !supportLists]-->•       <!--[endif]-->sudo dd if=/dev/zero of=/swapfile bs=64M count=16
sudo mkswap /swapfile
sudo swapon /swapfile

<!--[if !supportLists]-->•       <!--[endif]-->
After compiling, you may wish to

<!--[if !supportLists]-->•       <!--[endif]-->Code:

<!--[if !supportLists]-->•       <!--[endif]-->sudo swapoff /swapfile
sudo rm /swapfile

 

cp ./src/sample* /usr/local/ceph/etc/ceph/

mkdir -p /etc/ceph

cp /usr/local/ceph/etc/ceph/sample.ceph.conf  /etc/ceph/ceph.conf

cp /usr/local/ceph/etc/ceph/sample.fetch_config   /etc/ceph/fetch_config

cp ./src/init-ceph /etc/init.d/ceph

cp ./src/mkcephfs  /usr/local/ceph/etc/ceph/

cp /home/ceph-0.60/src/ceph_common.sh  ./

cp /home/ceph-0.60/src/ceph-conf ./

cp /home/ceph-0.60/src/monmaptool ./

mkdir /var/log/ceph

./mkcephfs -a -c /etc/ceph/ceph.conf  --mkbtrfs

/etc/init.d/ceph -a start

/etc/init.d/ceph -a -c /etc/ceph/ceph.conf start

 

 

[root@iZ11tbxf10uZ src]# ps -ef | grep ceph

root      7612     1  0 18:24 ?        00:00:00 /usr/local/ceph/bin/ceph-mon -i alpha --pid-file /var/run/ceph/mon.alpha.pid -c /etc/ceph/ceph.conf

root      7686     1  0 18:24 ?        00:00:00 /usr/local/ceph/bin/ceph-mon -i beta --pid-file /var/run/ceph/mon.beta.pid -c /etc/ceph/ceph.conf

root      7764     1  0 18:24 ?        00:00:00 /usr/local/ceph/bin/ceph-mon -i gamma --pid-file /var/run/ceph/mon.gamma.pid -c /etc/ceph/ceph.conf

root      7901     1  6 18:25 ?        00:00:01 /usr/local/ceph/bin/ceph-osd -i 0 --pid-file /var/run/ceph/osd.0.pid -c /etc/ceph/ceph.conf

root      8015     1 11 18:25 ?        00:00:02 /usr/local/ceph/bin/ceph-osd -i 1 --pid-file /var/run/ceph/osd.1.pid -c /etc/ceph/ceph.conf

 

 

./ceph-osd: error while loading shared libraries: libtcmalloc.so.4: cannot open shared object file: No such file or directory

vim /etc/ld.so.conf

/usr/local/lib

ldconfig

ldconfig -p

 

 

[root@iZ11tbxf10uZ bin]# ./ceph -s

   health HEALTH_OK

   monmap e1: 3 mons at {alpha=10.174.141.161:6789/0,beta=10.174.141.161:6788/0,gamma=10.174.141.161:6787/0}, election epoch 4, quorum 0,1,2 alpha,beta,gamma

   osdmap e5: 2 osds: 2 up, 2 in

    pgmap v41: 576 pgs: 576 active+clean; 0 bytes data, 2008 MB used, 55295 MB / 61451 MB avail

   mdsmap e1: 0/0/1 up

 

 

[root@iZ11tbxf10uZ bin]# ./ceph df

GLOBAL:

    SIZE       AVAIL      RAW USED     %RAW USED

    61451K     55295K     2008K        3.27      

POOLS:

    NAME         ID     USED     %USED     OBJECTS

    data         0      0        0         0      

    metadata     1      0        0         0      

    rbd          2      0        0         0

 

 

mkdir /mnt/ceph

mount -t ceph ceph_mds:/ /mnt/ceph

dmesg

./mount.ceph iZ11tbxf10uZ:/ /mnt/ceph -v -o name=name=admin,secret=AQBCZe1VqGzzLhAAPulMaxzunzzplzzRck9vsw==

 

 

 

相关推荐