安装ecflow+ui

安装ecflow5+ui

软件版本
boost1.71.0
cmake3.15.37
ecflow5.8.1
openssl1.1.1
python3.8.5
qt5.8.0
节点IP系统功能CPU内存硬盘
node110.80.10.1centos7.9ecflow4核心8GB20GB

node1

下载软件包:

下载地址:https://boostorg.jfrog.io/artifactory/main/release/

下载地址:https://confluence.ecmwf.int/display/ECFLOW/Releases

下载地址:https://cmake.org/files/

下载地址:https://download.qt.io/new_archive/qt/

下载地址:https://www.openssl.org/source/

下载地址:https://www.python.org/ftp/python/

1
2
3
4
5
6
7
# cd /usr/local/src/
# wget https://boostorg.jfrog.io/artifactory/main/release/1.71.0/source/boost_1_71_0.tar.gz --no-check-certificate
# wget https://confluence.ecmwf.int/download/attachments/8650755/ecFlow-5.8.1-Source.tar.gz --no-check-certificate
# wget https://cmake.org/files/v3.15/cmake-3.15.7.tar.gz --no-check-certificate
# wget https://download.qt.io/new_archive/qt/5.8/5.8.0/qt-opensource-linux-x64-5.8.0.run --no-check-certificate
# wget https://www.openssl.org/source/openssl-1.1.1o.tar.gz --no-check-certificate
# wget https://www.python.org/ftp/python/3.8.5/Python-3.8.5.tgz

安装依赖包:

1
# yum install -y gcc gcc-c++ libffi-devel zlib zlib-devel ncurses openssl-devel

升级gcc7:

1
2
3
4
5
6
7
8
9
# yum -y install centos-release-scl
# yum -y install devtoolset-7
# scl enable devtoolset-7 bash
# echo "source /opt/rh/devtoolset-7/enable" >> /etc/bashrc
# gcc --version
gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

安装openssl:

1
2
3
4
5
6
7
# cd /usr/local/src/
# tar -xzvf openssl-1.1.1o.tar.gz
# cd openssl-1.1.1o/
# ./config --prefix=/usr/local/openssl shared
# make -j 4 && make -j 4 install
# ln -s /usr/local/openssl/lib/libssl.so.1.1 /lib64/libssl.so.1.1
# ln -s /usr/local/openssl/lib/libcrypto.so.1.1 /lib64/libcrypto.so.1.1

安装python:

1
2
3
4
5
# cd /usr/local/src/
# tar -xzvf Python-3.8.5.tgz
# cd Python-3.8.5/
# ./configure --prefix=/usr/local/python3 --with-openssl=/usr/local/openssl --enable-shared CFLAGS=-fPIC
# make -j 4 && make -j 4 install

删除系统自带python3软连接:

1
# rm -rf /usr/bin/python3

添加python环境变量:

1
2
3
# vim /etc/profile
# 尾行,添加配置
export PATH=$PATH:/usr/local/python3/bin/
1
# source /etc/profile

添加python3.8动态库:

1
2
3
# cp /usr/local/python3/lib/libpython3.8.so.1.0 /usr/lib64/
# python3 --version
Python 3.8.5

安装cmake:

1
2
3
4
5
# cd /usr/local/src/
# tar -xzvf cmake-3.15.7.tar.gz
# cd cmake-3.15.7
# ./configure --prefix=/usr/local/cmake3.15
# make -j 4 && make -j 4 install

备份并拷贝cmake:

1
2
3
4
5
6
# ls /usr/bin/cmake
# ln -s /usr/local/cmake3.15/bin/cmake /usr/bin/cmake
# cmake --version
cmake version 3.15.7

CMake suite maintained and supported by Kitware (kitware.com/cmake).

安装qt5,若无法执行qt则重启:

1
2
3
4
5
# cd /usr/local/src/
# yum install -y mesa-libGL-devel mesa-libGLU-devel freeglut-devel gflags gflags-devel fontconfig-devel
# yum install -y git mesa-libGLES-devel mesa-dri-drivers xorg-x11-xauth xorg-x11-utils xorg-x11-fonts-* libxkbcommon-x11-devel wqy-zenhei-fonts*
# chmod +x qt-opensource-linux-x64-5.8.0.run
# ./qt-opensource-linux-x64-5.8.0.run
1
2
3
# vim /etc/profile
# 尾行,添加配置
export PATH=$PATH:/opt/Qt5.8.0/5.8/gcc_64/bin/
1
2
3
4
# source /etc/profile
# qmake -v
QMake version 3.1
Using Qt version 5.8.0 in /opt/Qt5.8.0/5.8/gcc_64/lib
1
2
# vim /etc/ld.so.conf.d/qt5.conf
/opt/Qt5.8.0/5.8/gcc_64/include/
1
# ldconfig

安装boost和ecflow:

1
2
3
# cd /usr/local/src/
# tar -xzvf boost_1_71_0.tar.gz
# tar -xzvf ecFlow-5.8.1-Source.tar.gz
1
2
3
4
# vim /etc/profile
# 尾行,添加配置
export WK=/usr/local/src/ecFlow-5.8.1-Source/
export BOOST_ROOT=/usr/local/src/boost_1_71_0/
1
# source /etc/profile
1
2
3
# cd $BOOST_ROOT
# ./bootstrap.sh
# $WK/build_scripts/boost_build.sh
1
2
3
# vim /etc/profile
# 尾行,添加配置
export CPLUS_INCLUDE_PATH=/usr/local/python3/include/python3.8/
1
# source /etc/profile

安装ecflow:

1
2
3
4
5
6
# cd $WK
# mkdir build; cd build;
# cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local/ecflow -DCMAKE_BUILD_TYPE=Release
# make -j 4 && make -j 4 install
# ls /usr/local/ecflow/
bin include lib lib64 share
1
2
3
# vim /etc/profile
# 尾行,添加配置
export PATH=$PATH:/usr/local/ecflow/bin/
1
# source /etc/profile

python使用ecflow,ecflow python api仅支持python3:

1
2
3
# vim /etc/profile
# 尾行,添加配置
export PYTHONPATH=$PYTHONPATH:/usr/local/ecflow/lib/python3.8/site-packages/ecflow/
1
# source /etc/profile
1
2
3
# cd $WK/build
# cmake -DCMAKE_INSTALL_PREFIX=/tmp/avi/custom/ecflow/5.8.1 -DCOMPONENT=python -P cmake_install.cmake -- make install
# cp -ar /tmp/avi/custom/ecflow/5.8.1/lib/python3.8/site-packages/ecflow/ /usr/local/python3/lib/python3.8/site-packages/
1
# python3 -c "import ecflow"

打开ecflow终端:

1
# ecflow_ui &

添加边侧栏:

Paneks—>三个加上