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

#### 操作步骤

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

```
yum install fftw*
```


3. 执行以下命令进入源码目录。

```
cd
/path/to/tinker
/tinker
```


4. 执行以下命令将编译文件拷贝到编译目录。

```
cp make/Makefile source/
```


5. 执行以下命令修改编译文件。

  a. 进入“source”目录。

```
cd source
```


  b. 打开“Makefile”文件。

```
vim Makefile
```


  c. 按“i”进入编辑模式，将第44行改成“TINKERDIR = /path/to/tinker”，将第90行改成“OPTFLAGS = -Ofast -fopenmp”。
  d. 按“Esc”键，输入:wq!，按“Enter”保存并退出编辑。
6. 执行以下命令编译安装。

```
make -j
make install
```


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

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