Installing CMake
- Download the CMake (3.0 or later) installation package.
1 2
cd /home wget https://cmake.org/files/v3.5/cmake-3.5.2.tar.gz --no-check-certificate
- Decompress the CMake installation package.
1tar -zxvf cmake-3.5.2.tar.gz
- Perform the compilation and installation.
1 2
cd cmake-3.5.2 ./bootstrap --prefix=/usr/local/cmake && make -j60 && make install
- Set the environment variables.
- Open the /etc/profile file.
1vim /etc/profile - Press i to enter the insert mode and add the following content to the file:
export PATH=/usr/local/cmake/bin:$PATH
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Make the new environment variables take effect.
1source /etc/profile
- Open the /etc/profile file.
- View the version.
cmake --version

Parent topic: Configuring the Compilation Environment