centos7安装cmake3.10.3

1.下载cmake

下载地址:​​https://cmake.org/files/v3.10/​​

2.安装

chmod +x cmake-3.10.3-Linux-x86_64.sh
./cmake-3.10.3-Linux-x86_64.sh

centos7安装cmake3.10.3

设置环境变量

mv cmake-3.10.3-Linux-x86_64 /usr/local/
vim /etc/profile

在profile中添加以下内容:

CMAKE_HOME=/usr/local/cmake-3.10.3-Linux-x86_64/
PATH=$PATH:$CMAKE_HOME/bin

使环境变量生效

source /etc/profile