CentOS6.3 install and configure cmake

Source: Internet
Author: User
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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.