install gcc 5.3

sudo yum install centos-release-scl
sudo yum install devtoolset-4-toolchain
scl enable devtoolset-4 bash
sudo scl enable devtoolset-4 bash
gcc --version
gcc (GCC) 5.3.1 20160406 (Red Hat 5.3.1-6)
Copyright (C) 2015 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.

sudo vi /etc/profile
source /opt/rh/devtoolset-4/enable

install cmake 3

wget https://github.com/Kitware/CMake/releases/download/v3.15.5/cmake-3.15.5.tar.gz
tar xzvf cmake-3.15.5.tar.gz
cd cmake-3.15.5/
./configure
gmake
sudo make install
cmake --version
cmake version 3.15.5
CMake suite maintained and supported by Kitware (kitware.com/cmake).

  • install oatpp (c++ web server)
    sudo yum install boost-atomic
    sudo ln -s /usr/lib64/libboost_atomic-mt.so.1.53.0 /usr/lib64/libatomic.so

git clone https://github.com/oatpp/oatpp
cd oatpp
mkdir build
cd build
cmake ..
sudo make install

sudo firewall-cmd --list-all
sudo firewall-cmd --zone=public --permanent --add-port=8000/tcp
sudo firewall-cmd --reload
sudo firewall-cmd --list-all

./my-project-exe
I |2019-11-04 01:59:27 1572803967016710| MyApp:Server running on port 8000

curl http://dbhome:8000/
{"statusCode": 200, "message": "Hello World!"}