以下是 CentOS7 安装 Ceph-2.0.1 并创建一个高可用集群的步骤:

  1. 首先,安装 Ceph 依赖库:
sudo yum install -y epel-release
sudo yum install -y wget git vim ntp ntpdate ntp-doc openssh-server openssh-clients openssl-devel libevent libevent-devel libffi libffi-devel python-devel python-pip python-setuptools python-argparse python-crypto python-jinja2 python-six python-rados python-rbd python-ceph librados2 librados2-devel librbd1 librbd1-devel ceph-fuse libradosstriper1 libradosstriper1-devel python-cephfs librados2-python librbd1-python ceph-fuse python-cephfs radosgw librados2-python-devel librados2-devel librbd1-python-devel ceph-base ceph-common ceph-osd ceph-mds ceph-mon
  1. 下载 Ceph-2.0.1 源码包:
wget https://download.ceph.com/tarballs/ceph-2.0.1.tar.gz
tar -zxvf ceph-2.0.1.tar.gz
cd ceph-2.0.1/
  1. 编译安装 Ceph:
./install-deps.sh
./autogen.sh
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --with-radosgw --with-debug --with-libevent=internal
make -j8
sudo make install
  1. 创建 Ceph 配置文件:
sudo mkdir /etc/ceph
sudo cp ceph.conf.sample /etc/ceph/ceph.conf
sudo chown ceph:ceph /etc/ceph/ceph.conf
  1. 创建 Ceph 存储池:
sudo ceph osd pool create mypool 64
  1. 创建 Ceph 文件系统:
sudo ceph osd pool create cephfs_data 64
sudo ceph osd pool create cephfs_metadata 64
sudo ceph fs new cephfs cephfs_metadata cephfs_data
  1. 启动 Ceph 服务:
sudo systemctl start ceph-mon.target
sudo systemctl start ceph-osd.target
sudo systemctl start ceph-mds.target
sudo systemctl start ceph-radosgw.target
  1. 查看 Ceph 集群状态:
sudo ceph -s

至此,你已经成功安装并创建了一个 Ceph 高可用集群。

CentOS7 安装 Ceph-201并创建一个高可以集群

原文地址: https://www.cveoy.top/t/topic/bbbv 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录