- 安裝gcc等必備程序包(已安裝則略過此步)
yum install -y gcc gcc-c++ make automake
- 安裝wget(已安裝則略過此步)
yum install -y wget
- 獲取CMake源碼包
- 解壓CMake源碼包
tar -zxvf cmake-3.6.2.tar.gz
- 進入目錄
cd cmake-3.6.2
- 編譯安裝
./bootstrap && make -j4 && sudo make install
yum install -y gcc gcc-c++ make automake
yum install -y wget
tar -zxvf cmake-3.6.2.tar.gz
cd cmake-3.6.2
./bootstrap && make -j4 && sudo make install