- 安装必要的依赖包
$sudo yum groupinstall -y 'Development Tools'
$sudo yum install zlib-devel libXext-devel libGLU-devel libXt-devel libXrender-devel libXinerama-devel libpng-devel libXrandr-devel libXi-devel libXft-devel libjpeg-turbo-devel libXcursor-devel readline-devel ncurses-devel python python-devel cmake qt-devel qt-assistant mpfr-devel gmp gmp-devel
- 下载OpenFOAM安装包
$cd ~
$mkdir OpenFOAM
$cd OpenFOAM
$git clone https://github.com/OpenFOAM/OpenFOAM-5.x.git
$git clone https://github.com/OpenFOAM/ThirdParty-5.x.git
- 编译安装Open