centos7编译安装cmake3

运维技术   cmake  

下载cmake源码

  • 这是已经编译的版本,解压即可以使用
wget https://cmake.org/files/v3.15/cmake-3.15.0-Linux-x86_64.tar.gz  
  • 解压
tar -zxvf cmake-3.15.0-Linux-x86_64.tar.gz

mv cmake-3.15.0-Linux-x86_64 /usr/local/cmake

 cd /usr/bin/
 mv cmake cmake2
ln -s /usr/local/cmake/bin/cmake .  
  • 检查
# cmake --version
cmake version 3.15.0

CMake suite maintained and supported by Kitware (kitware.com/cmake).