Configuring the Deployment Environment
The operations vary according to the OS. Unless otherwise specified, the operations are the same in the two OSs.
Disabling SMMU
Before deploying Ceph, disable SMMU to prevent it from affecting Ceph performance.
- Access the BIOS.
- Choose .

- Set Support Smmu to Disabled and press F10 to save the settings and exit.

Configuring Hostnames
- Configure static hostnames, for example, configure ceph 1 to ceph 3 for server nodes and client 1 to client 3 for client nodes.
- Modify the domain name resolution file.
1vi /etc/hostsOn each server node and client node, add the following information to the /etc/hosts file:1 2 3 4 5 6
192.168.3.166 ceph1 192.168.3.167 ceph2 192.168.3.168 ceph3 192.168.3.160 client1 192.168.3.161 client2 192.168.3.162 client3
Configuring Password-Free Login
Enable ceph 1 and client 1 to access all server and client nodes (including ceph 1 and client 1) without a password.
- Generate a public key on ceph 1 and send the public key to each server node and client node.
1 2 3
ssh-keygen -t rsa for i in {1..3}; do ssh-copy-id ceph$i; done for i in {1..3}; do ssh-copy-id client$i; done
After inputting the first command ssh-keygen -t rsa, press Enter to use the default configuration.


- Generate a public key on client 1 and send the public key to each server node and client node.
1 2 3
ssh-keygen -t rsa for i in {1..3}; do ssh-copy-id ceph$i; done for i in {1..3}; do ssh-copy-id client$i; done
After inputting the first command ssh-keygen -t rsa, press Enter to use the default configuration.
Disabling the Firewall
On each server node and client node, run the following commands in sequence to disable the firewall:
1 2 3 | systemctl stop firewalld systemctl disable firewalld systemctl status firewalld |

Setting the Permissive Mode
Set the permissive mode on each server node and client node.
- Set the permissive mode temporarily. The configuration becomes invalid after the system restarts.
1setenforce permissive
- Set the permissive mode permanently. The configuration takes effect upon the next restart.
1vi /etc/selinux/configSet SELINUX to permissive.

Configuring Repo Sources
This section provides online and offline installation modes for Repo sources. The online installation mode is recommended.
Method 1: online installation
- Create the ceph.repo file on each server node and client node.
1vi /etc/yum.repos.d/ceph.repoAdd the following information to the file:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
[Ceph] name=Ceph packages for $basearch baseurl=http://download.ceph.com/rpm-nautilus/el7/$basearch enabled=1 gpgcheck=1 type=rpm-md gpgkey=https://download.ceph.com/keys/release.asc priority=1 [Ceph-noarch] name=Ceph noarch packages baseurl=http://download.ceph.com/rpm-nautilus/el7/noarch enabled=1 gpgcheck=1 type=rpm-md gpgkey=https://download.ceph.com/keys/release.asc priority=1 [ceph-source] name=Ceph source packages baseurl=http://download.ceph.com/rpm-nautilus/el7/SRPMS enabled=1 gpgcheck=1 type=rpm-md gpgkey=https://download.ceph.com/keys/release.asc priority=1
- Update the Yum source.
1yum clean all && yum makecache

- Install the EPEL source. (Skip this step in openEuler.)
1yum -y install epel-release

- Modify the proxy configuration of all nodes.
1vim /etc/environmentAdd the following information to support the installation of related dependencies:
1 2 3 4
export http_proxy=http://{Proxy-User-Name}:{Proxy-Password}@<Proxy-Server-IP-Address>:<Proxy-Port> export https_proxy= http://{Proxy-User-Name}:{Proxy-Password}@<Proxy-Server-IP-Address>:<Proxy-Port> export ftp_proxy= http://{Proxy-User-Name}:{Proxy-Password}@<Proxy-Server-IP-Address>:<Proxy-Port> export no_proxy=127.0.0.1,localhost
Method 2: offline installation
Perform the following operations on each node to configure Repo sources for all nodes in the cluster:
In this version, you need to manually create the source.zip package. For details, see Creating a Repo Source Package.
- Upload the source.zip package to the /home directory and go to the directory.
1cd /home
- Decompress the package.
1unzip source.zip
- Install createrepo.
1yum install -y createrepo/*.rpm

- Create local sources.
1 2
cd /home/local_source createrepo .

- Go to the yum.repo.d directory.
1cd /home/yum.repo.d
- Remove the backup of the .repo file provided by the system.
1 2
mkdir bak mv *.repo bak
- Create a .repo file.
1vi local.repoAdd the following information to the file:1 2 3 4 5
[local] name=local baseurl=file:///home/local_source enabled=1 gpgcheck=0
Compiling the python-enum34 Package
You need to compile the python-enum34 software package in openEuler only. Skip this section for CentOS.
Perform the following operations on all the nodes.
- Download the source code and patch.
1git clone –b openEuler-20.03-LTS-SP1 https://gitee.com/src-openeuler/python-enum34.git
- Move the source package to the /root/rpmbuild/SOURCES directory.
1mv enum34-1.1.6.tar.gz /root/rpmbuild/SOURCES
- Modify the .spec file.
1vim python-enum34.specChange %files -n python2-%{_name} in line 42 to %files -n python-%{_name}.

- Compile the software package.
1 2
mv python-enum34.spec /root/rpmbuild/SPECS/ rpmbuild -bb /root/rpmbuild/SPECS/python-enum34.spec
- Move the compiled RPM package to the specified directory.
1 2
mkdir -p /home/rpm/local cp -r /root/rpmbuild/RPMS/* /home/rpm/local/
- Obtain the liboath software package and create a repo source.
1 2 3 4 5 6
cd /home/rpm/local wget http://mirrors.tools.huawei.com/openeuler/openEuler-21.03/everything/aarch64/Packages/liboath-2.6.5-2.oe1.aarch64.rpm wget http://mirrors.tools.huawei.com/openeuler/openEuler-21.03/everything/aarch64/Packages/liboath-devel-2.6.5-2.oe1.aarch64.rpm wget http://mirrors.tools.huawei.com/openeuler/openEuler-21.03/everything/aarch64/Packages/liboath-doc-2.6.5-2.oe1.noarch.rpm yum install -y createrepo cd /home/rpm/local & createrepo .
- Configure the .repo file.
1vim /etc/yum.repos.d/local.repoAdd the following information to the file:
1 2 3 4 5 6
[local-rpm] name=local-rpm baseurl=file:///home/rpm/local enabled=1 gpgcheck=0 priority=1
- Clear the Yum cache.
1yum clean all && yum makecache
