GRAS installation script for CentOSΒΆ
Created for CentOS 7
# pre-requisites
sudo yum update
sudo yum install dos2unix gcc gcc-c++ cmake3 gdb xerces-c xerces-c-devel qt5-qtbase qt5-qtbase-devel libXmu-devel freeglut-devel expat-devel hdf5
# gcc version 9.3 required by Geant4
sudo yum install devtoolset-9
source /opt/rh/devtoolset-9/enable
gcc --version
# Geant4
cd
mkdir -p software/geant4/10.07.p03
cd software/geant4/10.07.p03
wget https://geant4-data.web.cern.ch/releases/geant4.10.07.p03.tar.gz
tar -zxf geant4.10.07.p03.tar.gz
mkdir build
cd build
cmake3 -DCMAKE_INSTALL_PREFIX=/usr/local/geant4/10.07.p03 -DGEANT4_USE_GDML=ON -DGEANT4_BUILD_MULTITHREADED=OFF -DGEANT4_INSTALL_DATA=ON -DGEANT4_INSTALL_DATADIR=/usr/local/geant4/data -DGEANT4_USE_GDML=ON -DGEANT4_USE_OPENGL_X11=ON -DGEANT4_USE_QT=ON -DGEANT4_USE_RAYTRACER_X11=ON ../geant4.10.07.p03
make -j4
sudo make install
source /usr/local/geant4/10.07.p03/bin/geant4.sh
# ROOT
# install from source because of use of non system compiler gcc-9.3
sudo yum install git make cmake3 gcc-c++ gcc binutils libX11-devel libXpm-devel libXft-devel libXext-devel python openssl-devel
sudo mkdir -p /usr/local/root/v6.22.08/gcc9.3/root
cd
mkdir -p software/root/v6.22.08/gcc9.3
cd software/root/v6.22.08/gcc9.3
sudo wget https://root.cern/download/root_v6.22.08.source.tar.gz
tar -zxf root_v6.22.08.source.tar.gz
mkdir build install
cd build
cmake3 -DCMAKE_INSTALL_PREFIX=/usr/local/root/v6.22.08/gcc9.3/root ../root-6.22.08
cmake3 --build . -- -j4
sudo cmake3 --build . --target install
source /usr/local/root/v6.22.08/gcc9.3/root/bin/thisroot.sh
# Zstr
cd /usr/local
sudo mkdir zstr
cd zstr
sudo git clone --depth 1 https://github.com/mateidavid/zstr .
# GRAS
sudo mkdir /usr/local/gras
cd
mkdir -p software/gras/05.02.00
cd software/gras/05.02.00
Download the GRAS release tarball from [https://essr.esa.int/project/gras-geant4-radiation-analysis-for-space ESSR]. Please note that a separate registration is necessary for the ESSR system.
Make sure the GRAS tgz source archive downloaded from ESSR is put into
the current directory software/gras/05.02.00
.
tar -zxf gras-05-02-00-r1234.tar.gz
mkdir build
cd build
cmake3 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local/gras/05.02.00 -DGRAS_INSTALL_PREFIX=/usr/local/gras/05.02.00 -DSTATIC_BUILD=OFF -DWITH_GEANT4_UIVIS=ON -DWITH_MESHING_ANALYSIS=ON -DWITH_ROOT=ON -DWITH_ZSTR=ON -DZSTR_HEADER_DIR=/usr/local/zstr/src -DCMAKE_CXX_STANDARD=14 ../gras-05-02
make -j4
sudo make install
source /usr/local/gras/05.02.00/bin/gras-env.sh
Initialisation of Geant4, ROOT, GRAS:
(This initialisation needs to be performed in each new session /
terminal, so the commands below can be copied at the end of the
.bashrc
init script)
source /usr/local/geant4/10.07.p03/bin/geant4.sh
source /usr/local/root/v6.22.08/gcc9.3/root/bin/thisroot.sh
source /usr/local/gras/05.02.00/bin/gras-env.sh
GRAS/trunk/r2242