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

Upgrading CMake

Upgrade CMake to ensure that the CMake version meets the MySQL requirements during compilation. If the built-in CMake software of the OS cannot meet the compilation requirements of the current database, upgrade CMake to 3.4.3 or later. The following describes how to upgrade CMake to 3.5.2.

  1. Download CMake 3.5.2 and upload it to the /home directory on the server.
    If the server is connected to the Internet, you can run the wget command to download CMake.
    1
    2
    cd /home
    wget https://cmake.org/files/v3.5/cmake-3.5.2.tar.gz --no-check-certificate
    
  2. Decompress the package.
    1
    tar -zxvf cmake-3.5.2.tar.gz
    

  3. Go to the directory generated after the decompression.
    1
    cd cmake-3.5.2
    
  4. Upgrade CMake.
    1
    ./bootstrap
    

    1
    make -j 96
    

    In the command, -j 96 can make full use of the multi-core feature of the CPUs to accelerate the compilation. The number following -j indicates the number of CPU cores. You can run the cat /proc/cpuinfo | grep processor | wc -l command to query the number of CPU cores. The value specified must be less than or equal to the actual number of CPU cores.

    1
    make install
    

  5. Check whether the CMake version is 3.5.2.
    1
    2
    hash -r
    /usr/local/bin/cmake --version