MongoDB under Redhat installation mongodb download install
- : http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.6.10.tgz
- The root user performs the following actions in turn
TAR-ZXVF mongodb-linux-x86_64-2.6.10.tgz
MV Mongodb-linux-x86_64-2.6.10/usr/local/mongodb
Cd/usr/local/mongodb
mkdir DB
mkdir logs
CD bin
Add configuration file
VI mongodb.conf
dbpath=/usr/local/mongodb/db
Logpath=/usr/local/mongodb/logs/mongodb.log
port=27107
Fork=true
Nohttpinterface=true
Boot auto Start MongoDB
Vi/etc/rc.d/rc.local
/usr/local/mongodb/bin/mongod--config/usr/local/mongodb/bin/mongodb.conf
Ln-s/usr/local/mongdb/bin/mongo/usr/local/bin/mongo
Download source for C + + drivers: http://github.com/mongodb/mongo-cxx-driver/tree/legacy
C + + Driver Library installation steps:
- Installing the Boost library
- Installing the PCRE Ku Zheng expression Library
- SCons compiling mongodb driver directive sconstruct This file is the key to compiling
Compile driver Get header file + library file
Installing the Boost libraryFile address: D:\Study\ database \ installation package \mongodb
File name: Boost_1_66_0
Go to Folder:cd boost_1_66_0
Run in sequence:
./bootstrap.sh
./b2
./sudo./B2 Install
Installing the PCRE LibraryFile location: D:\Study\ database \ installation package \mongodb
File name: pcre-8.00.tar.gz
Upload to Redhat
Execute in turn:
TAR-ZXVF pcre-8.00.tar.gz
CD pcre-8.00.tar.gz
./configure
Make
Make install
Installing SCons compiling MongoDB-driven instructionsFile location: D:\Study\ database \ installation package \mongodb
File name: scons-2.5.0-1.noarch.rpm
Upload to Redhat
Perform:
RPM-IVH scons-2.5.0-1.noarch.rpm
Install the build driver
File location: D:\Study\ database \ installation package \mongodb
File name: mongodb-linux-x86_64-v2.2-latest.tgz
Execute in turn:
tar -zxvf mongodb-linux-x86_64-v2.2-latest.tgzcd mongo-cxx-driver-v2.2vi src/mongo/pch.h 修改:#define BOOST_FILESYSTEM_VERSION 3sudo scons --extrapath=/usr/local install
Get file Deployment
Enter Usr/local Integration file:
[[email protected] local]$ ls boost
Include Lib
[[email protected] local]$ ls MONGO
Include Lib
Switch to root user execution:
vi /etc/ld.so.conf添加:上面文件的路径/usr/local/boost/lib/usr/local/mongo/lib保存ldconfig
MongoDB installation under Redhat