# yum install -y centos-release-scl # yum install -y 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:
下载地址:https://www.openssl.org/source/
1 2 3 4 5 6 7 8
# cd /usr/local/src/ # wget https://www.openssl.org/source/openssl-1.1.1o.tar.gz --no-check-certificate # 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:
下载地址:https://www.python.org/ftp/python/
1 2 3 4 5 6
# cd /usr/local/src/ # wget https://www.python.org/ftp/python/3.8.5/Python-3.8.5.tgz # 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/
# 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 # 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 2 3 4 5 6 7
# source /etc/profile # cd $BOOST_ROOT # ./bootstrap.sh # $WK/build_scripts/boost_build.sh # 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/apps/ecflow -DCMAKE_BUILD_TYPE=Release -DENABLE_UI=OFF # make -j 4 && make -j 4 install # ls /usr/local/apps/ecflow/ bin include lib lib64
1 2 3
# vim /etc/profile # 尾行,添加配置 export PATH=$PATH:/usr/local/apps/ecflow/bin/
1
# source /etc/profile
python使用ecflow,ecflow python api仅支持python3:
1 2 3
# vim /etc/profile # 尾行,添加配置 export PYTHONPATH=$PYTHONPATH:/usr/local/apps/ecflow/lib/python3.8/site-packages/ecflow/