According to the official website (https://github.com/mongodb/mongo-cxx-driver/wiki/quickstart-guide-(new-driver)), the C + + driver internal use of Libbson and MongoDB C driver. Therefore to install C + + driver, you need to install C driver first. My system GCC version 4.8.5,cmake version 3.5.2, to meet the official website requirements of the installation version.
1. Install Automake, autoconf and Libtool, here all Yum installation can be
Yum-y Install Automake autoconf libtool
2. Install c driver and install the installation method according to the official website (https://github.com/mongodb/mongo-c-driver). Here I have 1.3.5 version.
wget Https://github.com/mongodb/mongo-c-driver/releases/download/1.3.5/mongo-c-driver-1.3.5.tar.gztar Xzf MONGO-C-DRIVER-1.3.5.TAR.GZCD Mongo-c-driver-1.3.5./configuremakemake Install
3. Install C + + driver and install according to the installation method given by the official website (https://github.com/mongodb/mongo-cxx-driver/wiki/quickstart-guide-(new-driver)). Here I have 3.0.1 version.
wget Https://github.com/mongodb/mongo-cxx-driver/archive/r3.0.1.tar.gztar Xzf R3.0.1.TAR.GZCD Mongo-cxx-driver-r3.0.1/buildpkg_config_path=/usr/local/lib/pkgconfig Cmake-dcmake_build_type=release-dcmake_ install_prefix=/usr/local/. Makemake Install
Centos7 installing MongoDB's C + + driver