我要评分
获取效率
正确性
完整性
易理解

On the Kunpeng Server

Install Percona XtraBackup 8.0.35 on the Arm-based Kunpeng server by compiling the source code to ensure that Percona XtraBackup can run properly.

Percona does not provide the XtraBackup installation package of the Arm architecture. The executable file of Percona XtraBackup is unavailable on the Kunpeng server. Therefore, Percona XtraBackup must be installed on the Kunpeng server by compiling the source code.

  1. Configure the Yum source.
    1. Ensure that the server can access the Internet.

      Run curl to access any website. If the website information is displayed, the proxy is successfully configured and the Internet is connected.

    2. Check whether the EPOL and update repositories have been configured in the Yum software library configuration file of openEuler.
      cat /etc/yum.repo.d/openEuler.repo
      • If the EPOL and update repository information of openEuler is not configured in the [EPOL] and [update] sections, add the following content to the /etc/yum.repo.d/openEuler.repo file:
        [EPOL]
        name=EPOL
        baseurl=http://repo.openeuler.org/openEuler-22.03-LTS-SP2/EPOL/main/$basearch/
        metalink=https://mirrors.openeuler.org/metalink?repo=$releasever/EPOL/main&arch=$basearch
        metadata_expire=1h
        enabled=1
        gpgcheck=1
        gpgkey=http://repo.openeuler.org/openEuler-22.03-LTS-SP2/OS/$basearch/RPM-GPG-KEY-openEuler
        
        [update]
        name=update
        baseurl=http://repo.openeuler.org/openEuler-22.03-LTS-SP2/update/$basearch/
        metalink=https://mirrors.openeuler.org/metalink?repo=$releasever/update&arch=$basearch
        metadata_expire=1h
        enabled=1
        gpgcheck=1
        gpgkey=http://repo.openeuler.org/openEuler-22.03-LTS-SP2/OS/$basearch/RPM-GPG-KEY-openEuler
      • If the openEuler.repo file does not exist, run the following commands to download the software repository configuration file (AArch64) of the openEuler OS from the Huawei Cloud image site. Save the configuration file to openEuler.repo in the /etc/yum.repos.d directory, and use the configuration file to update the Yum software package cache.
        wget -O /etc/yum.repos.d/openEuler.repo https://mirrors.huaweicloud.com/repository/conf/openeuler_aarch64.repo --no-check-certificate
        yum makecache
  2. Upgrade GCC.
    • To compile Boost 1.77.0, the GCC version must be 8 or later. If the GCC version is earlier than 8, upgrade GCC. Run the following command to check the GCC version:
      gcc --version
    • Install GCC Toolset 12 to meet the compilation requirements.
    yum install gcc
    yum install -y gcc-toolset-12-*
    gcc --version

    Expected result: GCC 10.3.1 has been successfully installed.

  3. Install the dependency packages required by Percona XtraBackup.
    yum install -y cmake openssl-devel libaio libaio-devel automake autoconf bison libtool ncurses-devel libgcrypt-devel libev-devel libcurl-devel zlib-devel vim-common
  4. Download the Percona XtraBackup source package.
    cd /home
    wget https://downloads.percona.com/downloads/Percona-XtraBackup-8.0/Percona-XtraBackup-8.0.35-30/source/tarball/percona-xtrabackup-8.0.35-30.tar.gz  --no-check-certificate
    tar -zxvf ./percona-xtrabackup-8.0.35-30.tar.gz
  5. Download the Boost 1.77.0 source package.
    wget https://boostorg.jfrog.io/artifactory/main/release/1.77.0/source/boost_1_77_0.tar.gz --no-check-certificate
    tar -zxvf boost_1_77_0.tar.gz
    mv ./boost_1_77_0 ./percona-xtrabackup-8.0.35-30/
  6. Compile and install Percona XtraBackup.
    cd /home/percona-xtrabackup-8.0.35-30
    mkdir build
    cd build
    cmake -DWITH_BOOST=/home/percona-xtrabackup-8.0.35-30/boost_1_77_0 -DDOWNLOAD_BOOST=OFF  -DBUILD_CONFIG=xtrabackup_release -DWITH_MAN_PAGES=OFF ..
    make -j 95
    make -j 95 install

    The -j 96 parameter can fully utilize the multi-core feature of the CPUs to accelerate the compilation. The number following -j indicates the number of CPU cores. Run cat /proc/cpuinfo | grep processor | wc -l to query the number of CPU cores. The number specified must be less than or equal to the actual number of CPU cores.

  7. Verify that Percona XtraBackup is available.
    Verify that the Percona XtraBackup version is the target version.
    /usr/local/xtrabackup/bin/xtrabackup -version

    The executable file is stored in the /usr/local/xtrabackup/bin directory by default.