1. 下载安装包
[root@db01 ~]# wget https://cmake.org/files/v3.7/cmake-3.7.2.tar.gz
2. 解压安装包
[root@db01 ~]# tar xf cmake-3.7.2.tar.gz
[root@db01 ~]# cd cmake-3.7.2
3. 安装cmake
[root@db01 ~]# ./bootstrap
[root@db01 ~]# gmake
[root@db01 ~]# gmake install
4. 检查版本
[root@db01 usr]# /usr/local/bin/cmake -version
cmake version 3.7.2
CMake suite maintained and supported by Kitware (kitware.com/cmake).
5. 变更环境
[root@db01 bin]# yum -y remove cmake
[root@db01 bin]# ln -s /usr/local/bin/cmake /usr/bin/
[root@db01 bin]#
[root@db01 bin]#
[root@db01 bin]# cmake --version
cmake version 3.7.2
CMake suite maintained and supported by Kitware (kitware.com/cmake).
网友评论