centos7.2 安装mongoDB C/C++驱动

前端之家收集整理的这篇文章主要介绍了centos7.2 安装mongoDB C/C++驱动前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

系统:centos7.2

说明所有源码放在

1、准备mongoDB C/C++驱动依赖

yum-yinstallepel-release
yuminstall-ygitgccgcc-c++opensslopenssl-devel\
maketexinfopatchimakewgetperl-Test-Harnessperl-Thread-Queue\
perl-Data-Dumperhelp2mancyrus-sasl-develglib-develgettextgettext-develgnulib-devel

2、安装cmake3.2以上版本如果有旧请卸载

yumremovecmake
wgethttps://www.cmake.org/files/v3.2/cmake-3.2.2.tar.gz
tar-xvfcmake-3.2.2.tar.gz
cdcmake-3.2.2
./bootstrap
./configure
make&&makeinstall
ln-s/usr/local/bin/cmake/usr/bin
cd..

3、安装autoconf-2.69

wgethttp://mirrors.kernel.org/gnu/autoconf/autoconf-2.69.tar.gz
	tar-xvfautoconf-2.69.tar.gz
	cdautoconf-2.69
	./configure--prefix=/usr/local
	make&&makeinstall
	cd..

4、安装automake-1.15.1

wgethttp://ftp.gnu.org/gnu/automake/automake-1.15.1.tar.xz
	tar-xvfautomake-1.15.1.tar.xz
	cdautomake-1.15.1
	./bootstrap--force
	./configure--prefix=/usr/local
	make&&makeinstall
	ln-sf/usr/local/bin/automake-1.15/usr/bin/automake
	cd..

5、安装libtool-2.4.6

wgethttp://mirrors.ustc.edu.cn/gnu/libtool/libtool-2.4.6.tar.gz
	tar-xvflibtool-2.4.6.tar.gz
	cdlibtool-2.4.6
	./bootstrap--force
	./configure
	make&&makeinstall
	cd..

6、安装libbson-1.6.3

wgethttps://github.com/mongodb/libbson/releases/download/1.6.3/libbson-1.6.3.tar.gz
	tar-xvflibbson-1.6.3.tar.gz
	cdlibbson-1.6.3
	./configure-prefix=/usr--libdir=/usr/lib64
	make&&makeinstall
	cd..

7、安装m4-1.4.18

wgethttp://mirrors.kernel.org/gnu/m4/m4-1.4.18.tar.gz
	tar-xvfm4-1.4.18.tar.gz
	cdm4-1.4.18
	./bootstrap--force
	./configure--prefix=/usr/local
	make&&makeinstall
	ln-sf/usr/local/bin/m4/usr/bin/m4
	cd..

8、安装mongo-c-driver-1.6.3

wgethttps://github.com/mongodb/mongo-c-driver/releases/download/1.6.3/mongo-c-driver-1.6.3.tar.gz

tar-xvfmongo-c-driver-1.6.3.tar.gz
cdmongo-c-driver-1.6.3
./configure	
make&&makeinstall
cd..

9、安装mongo-cxx-driver-r3.1.2

wgethttps://github.com/mongodb/mongo-cxx-driver/archive/r3.1.2.tar.gz
tar-xvfr3.1.2.tar.gz
cdmongo-cxx-driver-r3.1.2/build/
PKG_CONFIG_PATH=/usr/local/lib/pkgconfigcmake-DCMAKE_BUILD_TYPE=Release-DBSONCXX_POLY_USE_MNMLSTC=1-DCMAKE_INSTALL_PREFIX=/usr/local..
sudomakeEP_mnmlstc_core
sudomake&&sudomakeinstall
ln-s/usr/local/lib/libmongocxx.so/usr/lib/libmongocxx.so

猜你在找的CentOS相关文章