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

#### 操作步骤

1. 使用PuTTY工具，以root用户登录服务器。
2. 执行以下命令进入源码目录。

```
cd
/path/to/thrust
/thrust
```


3. 执行以下命令创建并进入编译目录。

```
mkdir build
cd build
```


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

```
cmake .. -DCMAKE_INSTALL_PREFIX=
/path/to
/thrust
make -j 64
make -j install
```
