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:
Copy the Code as follows:
[[Email protected]/] # Yum install gcc-C ++
[[Email protected]/] # Yum install ncurses-devel
Install cmake
Upload the cmake-2.8.10.2.tar.gz file to/usr/local and perform the following operations:
Copy the Code as follows:
[[Email protected] # cd/usr/local
[[Email protected] # tar-zxv-F cmake-2.8.10.2.tar.gz // extract the compressed package
[[Email protected] # rm-RF cmake-2.8.10.2.tar.gz // Delete compressed package
[[Email protected] # cd cmake-2.8.10.2
[[Email protected] cmake-2.8.10.2] #./configure
[[Email protected] cmake-2.8.10.2] # Make
[[Email protected] cmake-2.8.10.2] # make install
[[Email protected] # 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:
[[Email protected] # vi/etc/profile // modify Environment Variables
Append the following two lines of code to the end of the file:
Copy the Code as follows:
Path =/usr/local/cmake/bin: $ path
Export path
Then, perform the following operations:
Copy the Code as follows:
[[Email protected] # source/etc/profile // make the modification take effect
[[Email protected] # echo $ PATH // view the PATH value
Verify cmake Installation
Copy the Code as follows:
[[Email protected] # cmake -- version
Cmake version 2.8.10.2
The preceding prompt is displayed, indicating that the installation is successful.
Install and configure cmake in centos 6.3