注意
本文档适用于 Ceph 开发版本。
手动安装 ceph-iscsi
要求
要完成 ceph-iscsi 的安装,有 4 个步骤:
从你的 Linux 发行版的软件仓库安装常用软件包
安装 Git 以直接从它们的 Git 仓库获取剩余的软件包
确保使用兼容的内核
安装 ceph-iscsi 的所有组件并启动相关的守护进程:
tcmu-runner
rtslib-fb
configshell-fb
targetcli-fb
ceph-iscsi
1. 安装常用软件包
以下软件包将由 ceph-iscsi 和目标工具使用。它们必须安装在每一台将要作为 iSCSI 网关的机器上:
libnl3
libkmod
librbd1
pyparsing
python kmod
python pyudev
python gobject
python urwid
python pyparsing
python rados
python rbd
python netifaces
python crypto
python requests
python flask
pyOpenSSL
2. 安装 Git
为了安装运行 Ceph iSCSI 所需的所有软件包,你需要使用 Git 直接从它们的仓库下载它们。
sudo yum install git
在 Debian/Ubuntu 上执行:
sudo apt install git
想了解更多关于 Git 和它是如何工作的信息,请访问https://git-scm.com
3. 确保使用兼容的内核
确保你使用一个包含所需 Ceph iSCSI 补丁的支持的内核:
所有内核版本为 4.16 或更新版本的 Linux 发行版,或
Red Hat Enterprise Linux 或 CentOS 7.5 或更高版本(在这些发行版中,ceph-iscsi 支持 已回退)
如果你已经使用兼容的内核,可以跳到下一步。但是,如果你不使用兼容的内核,请检查你的发行版的文档以获取有关如何构建此内核的具体说明。Ceph iSCSI 的唯一特定要求是以下构建选项必须启用:
CONFIG_TARGET_CORE=m CONFIG_TCM_USER2=m CONFIG_ISCSI_TARGET=m
4. 安装 ceph-iscsi
最后,其余的工具可以直接从它们的 Git 仓库获取,并启动它们相关的服务
tcmu-runner
安装:
git clone https://github.com/open-iscsi/tcmu-runner cd tcmu-runner运行以下命令来安装所有需要的依赖项:
./extra/install_dep.sh
现在你可以构建 tcmu-runner。
cmake -Dwith-glfs=false -Dwith-qcow=false -DSUPPORT_SYSTEMD=ON -DCMAKE_INSTALL_PREFIX=/usr make install启用并启动守护进程:
systemctl daemon-reload systemctl enable tcmu-runner systemctl start tcmu-runner
rtslib-fb
安装:
git clone https://github.com/open-iscsi/rtslib-fb.git cd rtslib-fb python setup.py install
configshell-fb
安装:
git clone https://github.com/open-iscsi/configshell-fb.git cd configshell-fb python setup.py install
targetcli-fb
安装:
git clone https://github.com/open-iscsi/targetcli-fb.git cd targetcli-fb python setup.py install mkdir /etc/target mkdir /var/target警告
ceph-iscsi 工具假定它们正在管理系统上的所有目标。如果目标已被设置并由 targetcli 管理,则必须禁用目标服务。
ceph-iscsi
安装:
git clone https://github.com/ceph/ceph-iscsi.git cd ceph-iscsi python setup.py install --install-scripts=/usr/bin cp usr/lib/systemd/system/rbd-target-gw.service /lib/systemd/system cp usr/lib/systemd/system/rbd-target-api.service /lib/systemd/system启用并启动守护进程:
systemctl daemon-reload systemctl enable rbd-target-gw systemctl start rbd-target-gw systemctl enable rbd-target-api systemctl start rbd-target-api
安装完成。继续到主 ceph-iscsi CLI 页面中的设置部分。main ceph-iscsi CLI page.
由 Ceph 基金会带给您
Ceph 文档是一个社区资源,由非盈利的 Ceph 基金会资助和托管Ceph Foundation. 如果您想支持这一点和我们的其他工作,请考虑加入现在加入.