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

#### 操作步骤

1. 使用PuTTY工具，以root用户登录服务器。
2. 执行以下命令解压CMake安装包。

```
cd
/path/to/CMAKE
tar -xvf cmake-3.8.1.tar.gz
```


3. 执行以下命令进入解压后的目录。

```
cd cmake-3.8.1
```


4. 执行以下命令进行配置。

```
./configure --prefix=
/path/to/CMAKE
```


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

```
make -j16
make install
```


6. 执行以下命令加载环境变量。

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