Installation Instructions installation environment: CentOS-6.3 installation method: Source code compilation installation software: cmake-2.8.10.2.tar.gz: License
Installation Instructions
Installation environment: CentOS-6.3
Installation method: Source code compilation and installation
Software: cmake-2.8.10.2.tar.gz
: Http://www.cmake.org/cmake/resources/software.html
Prerequisites
G ++ and ncurses-devel have been installed in the system. if they are not installed, run the following command to install them:
[Root @ admin/] # yum install gcc-c ++
[Root @ admin/] # yum install ncurses-devel
Install cmake
Upload the cmake-2.8.10.2.tar.gz file to/usr/local and perform the following operations:
[Root @ admin local] # cd/usr/local
[Root @ admin local] # tar-zxv-f cmake-2.8.10.2.tar.gz // Unzip the package
[Root @ admin local] # rm-rf cmake-2.8.10.2.tar.gz // delete compressed package
[Root @ admin local] # cd cmake-2.8.10.2
[Root @ localhost cmake-2.8.10.2] #./configure
[Root @ localhost cmake-2.8.10.2] # make
[Root @ localhost cmake-2.8.10.2] # make install
[Root @ admin local] # mv cmake-2.8.10.2 cmake // modify folder name
Add Environment variables
Use vi to add variables to the/etc/profile file to make them permanently valid:
[Root @ admin local] # vi/etc/profile // modify environment variables
Append the following two lines of code to the end of the file:
PATH =/usr/local/cmake/bin: $ PATH
Export PATH
Then, perform the following operations:
[Root @ admin local] # source/etc/profile // make the modification take effect
[Root @ admin local] # echo $ PATH // view the PATH value
Verify cmake installation
[Root @ admin local] # cmake-version
Cmake version 2.8.10.2
Congratulations, the installation is successful.