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

#### 操作步骤

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

```
cd
/path/to/sparta
```


3. 执行以下命令解压源码包。

```
tar -xvf
sparta-7Jan2022.tar.gz
```


4. 执行以下命令新建build与install目录。

```
cd sparta-7Jan2022/
mkdir build install
```


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

```
cmake -DCMAKE_INSTALL_PREFIX=../install
/path/to/sparta
/sparta-7Jan2022/cmake
make
make install
```
