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

# 安装HDF5

#### 操作步骤

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

```
tar -xvf hdf5-1.10.1.tar.gz
```


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

```
cd hdf5-1.10.1
```


4. 执行以下命令设置编译前环境。

```
export MPICC=mpicc
export MPICXX=mpicxx
export MPIFC=mpifort
```


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

```
./configure --prefix=
/path/to/HDF5
--build=aarch64-unknown-linux-gnu --enable-fortran --enable-static=yes --enable-parallel --enable-shared CC=$MPICC CXX=$MPICXX FC=$MPIFC F77=$MPIFC
```


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

```
make -j 16
make install
```
