Rate This Document
Findability
Accuracy
Completeness
Readability

Compiling Client Installation Packages

The /home directory must be 100 GB or larger for the compilation.

  1. Obtain ceph-14.2.8.tar.gz, ceph-global-cache.patch, globalcache-ceph-adaptor-spec.patch, ceph-global-cache-tls.patch, and boostkit-globalcache-ceph-adaptor-release-1.3.15.oe1.aarch64.rpm (ARM) or boostkit-globalcache-ceph-adaptor-release-1.3.15.oe1.x86_64.rpm (x86) and save them to /home.
  2. Decompress the Ceph source code in the /home directory, install the patches for the Ceph source code, and generate the client package.
    1
    2
    3
    4
    5
    6
    7
    8
    tar -zxvf ceph-14.2.8.tar.gz
    cp ceph-global-cache.patch ceph-14.2.8
    cp globalcache-ceph-adaptor-spec.patch ceph-14.2.8
    cp ceph-global-cache-tls.patch ceph-14.2.8
    cd ceph-14.2.8
    patch -p1 < ceph-global-cache.patch
    patch -p1 < globalcache-ceph-adaptor-spec.patch
    patch -p1 < ceph-global-cache-tls.patch
    
  3. Install the closed-source RPM package obtained from the Huawei Enterprise or Carrier website.

    In the ARM environment:

    rpm -ivh /home/boostkit-globalcache-ceph-adaptor-release-1.3.15.oe1.aarch64.rpm

    In the x86 environment:

    rpm -ivh /home/boostkit-globalcache-ceph-adaptor-release-1.3.15.oe1.x86_64.rpm
  4. Make the environment variables that are configured during the RPM package installation take effect.
    1
    source /etc/profile
    
  5. Use EPEL to install the dependencies that are missing in openEuler.
    1. Configure the EPEL source.
      1
      vi /etc/yum.repos.d/epel.repo
      
      Add the following content:
      1
      2
      3
      4
      5
      6
      [epel]
      name=epel
      baseurl=https://repo.huaweicloud.com/epel/7/aarch64/
      enabled=1
      gpgcheck=0
      priority=1
      
    2. Use the EPEL source to install dependencies.
      1
      yum install python-routes python-tox -y
      
    3. Delete the EPEL source.
      1
      rm -rf /etc/yum.repos.d/epel.repo
      

      The EPEL source must be deleted. Otherwise, an RPM package that conflicts with openEuler will be downloaded from the EPEL source in subsequent steps.

  6. Compile and install mxml.
    1. Download mxml-3.2.tar.gz from the open source website and save it to the /home directory.
    2. Decompress mxml-3.2.tar.gz.
      1
      2
      cd /home
      tar -zxvf mxml-3.2.tar.gz
      
    3. Configure, compile, and install mxml.
      cd mxml-3.2
      ./configure
      make all
      make install
  7. Run install-deps.sh to install the dependencies.
    1
    2
    cd /home/ceph-14.2.8/
    sh install-deps.sh
    

    If the install-deps.sh script fails to be executed, try again using another proxy. openEuler 20.03 LTS SP3 has two versions of PostgreSQL, which conflict with each other during the installation. To prevent the script exit due to the conflict, delete set -e from the install-deps.sh script and then run the script.

  8. Modify the ceph.spec.in file.
    1
    sed -i 's#%if 0%{?fedora} || 0%{?rhel}#%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler}#' ceph.spec.in
    

  9. Go back to the parent directory and compress the ceph-14.2.8 directory into a tar.bz2 package.
    1
    2
    cd /home
    tar -cjvf ceph-14.2.8.tar.bz2 ceph-14.2.8
    
  10. Copy the ceph.spec file to the SPECS directory.
    1
    cp ceph-14.2.8/ceph.spec /home/rpmbuild/SPECS/
    
    Save the package file to the SOURCES directory.
    1
    cp ceph-14.2.8.tar.bz2 /home/rpmbuild/SOURCES/
    
  11. Modify the rpmmacros file and comment out the content in the red box:
    1
    vi /root/.rpmmacros
    

  12. Delete /etc/profile.d/performance.sh to increase the compilation speed.
    1
    rm -rf  /etc/profile.d/performance.sh
    
  13. Start a new terminal for the previous step to take effect and run the rpmbuild command to start the compilation.
    1
    2
    unset GOMP_CPU_AFFINITY
    rpmbuild -bb /home/rpmbuild/SPECS/ceph.spec
    

    The compilation takes a long time. After the compilation is complete, the aarch64 and noarch directories are generated in the /home/rpmbuild/RPMS/ directory. The directories include the Ceph-related RPM packages.