From 7640e50cccbbf68840d3cf62bb1f7e7c3231ff28 Mon Sep 17 00:00:00 2001 From: iProbe Date: Sun, 25 Jun 2023 21:53:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20'=E5=AD=98=E5=82=A8/ceph/p?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=AE=89=E8=A3=85/5-=E5=AE=89=E8=A3=85cephad?= =?UTF-8?q?m.md'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 存储/ceph/p版本安装/5-安装cephadm.md | 59 ++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 存储/ceph/p版本安装/5-安装cephadm.md diff --git a/存储/ceph/p版本安装/5-安装cephadm.md b/存储/ceph/p版本安装/5-安装cephadm.md new file mode 100644 index 0000000..611f153 --- /dev/null +++ b/存储/ceph/p版本安装/5-安装cephadm.md @@ -0,0 +1,59 @@ +1. 安装cephadm,O版开始就不再支持ceph-deploy工具 +> [cephadm安装](https://docs.ceph.com/en/latest/cephadm/install/#install-cephadm) +> cephadm安装前提 +- Python3 +- Systemd +- Podman or Docker +- Chrony or NTP +- LVM2 +```shell +## 在ceph所有点上执行 +# CEPH_RELEASE=17.2.6 # replace this with the active release +# curl --silent --remote-name --location https://download.ceph.com/rpm-${CEPH_RELEASE}/el9/noarch/cephadm +# chmod +x cephadm +# mv cephadm /usr/sbin/ +## 执行cephadm install 会在当前节点上安装cephadm依赖相关的软件包,版本较低,所以不建议执行 +# cephadm install +ERROR: Distro openeuler version 22.03 not supported +## 修改 /usr/sbin/cephadm ,在 +# vi /usr/sbin/cephadm +## DISTRO_NAMES 这个字典中增加 openeuler +  7654     DISTRO_NAMES = { +  7655         'centos': ('centos', 'el'), +  7656         'rhel': ('centos', 'el'), +  7657         'scientific': ('centos', 'el'), +  7658         'rocky': ('centos', 'el'), +  7659         'openeuler': ('centos', 'el'), +  7660         'almalinux': ('centos', 'el'), +  7661         'ol': ('centos', 'el'), +  7662         'fedora': ('fedora', 'fc'), +  7663         'mariner': ('mariner', 'cm'), +  7664     } +  7665   +## 将 cephadm 文件拷贝到其他节点上   +# for i in {2..5};do scp -rp /usr/sbin/cephadm ceph0$i:/usr/sbin/;done +``` +> 如果是Centos8,可直接yum源安装 +````shell +# yum download cephadm +# rpm -ivh cephadm-17.2.6-0.el8.noarch.rpm +# rpm -ql cephadm-17.2.6-0.el8 +/usr/sbin/cephadm +/usr/share/man/man8/cephadm.8.gz +/var/lib/cephadm +/var/lib/cephadm/.ssh +/var/lib/cephadm/.ssh/authorized_keys +```` +2. 检查ceph各节点是否满足安装ceph集群,该命令需要在当前节点执行,比如要判断ceph02是否支持安装ceph集群,则在ceph02上执行 +```shell +# cephadm check-host --expect-hostname ceph02 +docker (/usr/bin/docker) is present +systemctl is present +lvcreate is present +Unit chronyd.service is enabled and running +Hostname "ceph02" matches what is expected. +Host looks OK + +## 也可以使用以下命令检查 +# cephadm check-host --expect-hostname `hostname` +``` 作者:itcooking https://www.bilibili.com/read/cv24307360?spm_id_from=333.999.0.0 出处:bilibili \ No newline at end of file