---
title: 安装cmake
description: 1. 使用PuTTY工具，以root用户登录服务器。
url: "https://www.hikunpeng.com/document/detail/zh/kunpenghpcs/hpcindapp/prtg-osc/centos_kunpeng_amber_20_02_0011.html"
---

# 安装cmake

#### 操作步骤

1. 使用PuTTY工具，以root用户登录服务器。
2. 执行以下命令下载cmake压缩包。

```
wget
https://cmake.org/files/v3.8/cmake-3.8.1.tar.gz
```


3. 执行以下命令进行解压。

```
tar -zxvf cmake-3.8.1.tar.gz
```

```
cd cmake-3.8.1
```


4. 执行以下命令进行编译安装。

```
./configure --prefix=
/path/to/CMAKE
make -j64
make install
```


5. 执行以下命令配置环境变量。

```
export PATH=
/path/to/CMAKE
/bin:$PATH
```
