Installing CMake
Procedure
- Use PuTTY to log in to the server as the root user.
- Use an SFTP tool to upload the CMake installation package to the /path/to/CMAKE directory.
- Run the following command to decompress the installation package:
cd /path/to/CMAKE && tar -zxf cmake-3.17.3.tar.gz
- Run the following command to go to the installation directory:
cd cmake-3.17.3
- Run the following commands to perform the compilation and installation:
CC=`which gcc` CXX=`which g++` ./bootstrap --prefix=/path/to/CMAKE gmake && gmake install
- Run the following command to set the environment variable:
export PATH=/path/to/CMAKE/bin:$PATH
Parent topic: Configuring the Compilation Environment