# 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/
# 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/