RHEL7.x/Centos Mongodb Build and test

本文介绍如何从源码编译MongoDB 3.2版本,并提供了详细的步骤说明,包括构建环境需求、编译命令及参数设置等。通过本文,读者可以了解到如何针对不同平台进行定制化编译。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >



Refer to 
https://github.com/mongodb/mongo/wiki/Build-Mongodb-From-Source


The requirements for building MongoDB vary by branch:


To build the master branch, you will need:


A modern and complete C++11 compiler. One of the following is required:
VS2015 Update 2 or newer
GCC 5.3.0
Clang 3.4 (or Apple XCode 5.1.1 Clang) or newer
Python 2.7
To build the 3.2 and 3.0 branches, you will need:


A C++11 compiler. One of the following is required:
VS2013 Update 4 or newer. Note that VS2015 is currently not compatible with the 3.0 and 3.2 branches. You must use VS2013.
GCC 4.8.2 or newer. Note that versions of GCC newer than 4.8.2 may produce warnings when building these branches, which are promoted to errors. Please use the --disable-warnings-as-errors build option if necessary to allow the build to succeed despite the warnings.
Python 2.7
SCons 2.3.0 or newer
To build the 2.6 branch, you will need:


A C++03 compiler, or VS2010 or newer.






RHEL7.x/x86-64bit is GCC4.8.5
lake@localhost:~/$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.5 20150623 (Red Hat 4.8.5-4) (GCC) 
lake@localhost:~/Cloud/mongodb/mongo-r3.2.19-git$ 




######## Source tag:  r3.2.19  MongoDB 
lake@localhost:~/Cloud/mongodb$ git clone -b   r3.2.19    --depth 1    https://github.com/mongodb/mongo.git
Cloning into 'mongo'...
remote: Counting objects: 14000, done.
remote: Compressing objects: 100% (11541/11541), done.
remote: Total 14000 (delta 3098), reused 8105 (delta 2226), pack-reused 0
Receiving objects: 100% (14000/14000), 33.14 MiB | 922.00 KiB/s, done.
Resolving deltas: 100% (3098/3098), done.
Note: checking out 'a9f574de6a566a58b24d126b44a56718d181e989'.


You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.


If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:


  git checkout -b new_branch_name


lake@localhost:~/Cloud/mongodb$ 












### Build preparation on RHEL7.2/Centos


1.pip/Python tool   (<------------ This is optional now for mongodb/3.x)


lake@localhost:~/Cloud/mongodb$ python --version 
Python 2.7.5
lake@localhost:~/Cloud/mongodb$ 


lake@localhost:~/Cloud/mongodb$ rpm -ivh p
php-devel-5.4.16-36.el7_1.x86_64.rpm  php-mongo-driver/                     python2-pip-8.1.2-5.el7.noarch.rpm
lake@localhost:~/Cloud/mongodb$ sudo  rpm -ivh python2-pip-8.1.2-5.el7.noarch.rpm 
[sudo] password for lake: 
warning: python2-pip-8.1.2-5.el7.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:python2-pip-8.1.2-5.el7          ################################# [100%]
lake@localhost:~/Cloud/mongodb$ which  pip
/usr/bin/pip
lake@localhost:~/Cloud/mongodb$ rpm -qf /usr/bin/pip
python2-pip-8.1.2-5.el7.noarch


# macOS / Linux
pip install -r buildscripts/requirements.txt   //////////////  No need now for mongodb/3.x


2. Build server: mongod


lake@localhost:~/Cloud/mongodb/mongo-r3.2.19-git$ buildscripts/scons.py mongod 
................
Compiling build/opt/third_party/zlib-1.2.8/zutil.o
Generating placeholder library build/opt/third_party/zlib-1.2.8/libzlib.a
Skipping ranlib for build/opt/third_party/zlib-1.2.8/libzlib.a
Linking build/opt/mongo/mongod
Install file: "build/opt/mongo/mongod" as "mongod"
scons: done building targets.


lake@localhost:~/Cloud/mongodb/mongo-r3.2.19-git$ file  build/opt/mongo/mongod 
build/opt/mongo/mongod: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=30541b5a0bc3a9191adda3bb6a94467983ec401a, not stripped
lake@localhost:~/Cloud/mongodb/mongo-r3.2.19-git$ 




lake@localhost:~/Cloud/mongodb/mongo-r3.2.19-git$ ls -l build/opt/
mongo/       third_party/ 
lake@localhost:~/Cloud/mongodb/mongo-r3.2.19-git$ ls -l build/opt/mongo/
total 585576
drwxr-xr-x  2 lake sys      4096 Mar 27 23:27 base
drwxr-xr-x  4 lake sys      4096 Mar 27 23:28 bson
drwxr-xr-x  2 lake sys      4096 Mar 27 22:53 client
-rw-r--r--  1 lake sys      3078 Mar 27 22:51 config.h
drwxr-xr-x  3 lake sys      4096 Mar 27 22:53 crypto
drwxr-xr-x 19 lake sys      4096 Mar 27 23:21 db
drwxr-xr-x  2 lake sys      4096 Mar 27 23:27 executor
-rw-r--r--  1 lake sys        37 Mar 27 23:28 libbase.a
-rw-r--r--  1 lake sys        37 Mar 27 23:28 liblinenoise_utf8.a
drwxr-xr-x  2 lake sys      4096 Mar 27 23:28 logger
-rwxr-xr-x  1 lake sys 599558296 Mar 27 23:45 mongod
drwxr-xr-x  2 lake sys      4096 Mar 27 23:28 platform
drwxr-xr-x  3 lake sys      4096 Mar 27 23:29 rpc
drwxr-xr-x  7 lake sys      4096 Mar 27 23:33 s
drwxr-xr-x  3 lake sys      4096 Mar 27 23:35 scripting
drwxr-xr-x  2 lake sys      4096 Mar 27 23:35 shell
drwxr-xr-x  6 lake sys      4096 Mar 27 23:37 util
lake@localhost:~/Cloud/mongodb/mongo-r3.2.19-git$ ls -l build/opt/
mongo/       third_party/ 
lake@localhost:~/Cloud/mongodb/mongo-r3.2.19-git$ ls -l build/opt/third_party/
total 136
drwxr-xr-x 3 lake sys 4096 Mar 27 23:37 asio-asio-1-11-0
drwxr-xr-x 3 lake sys 4096 Mar 27 23:38 boost-1.56.0
drwxr-xr-x 3 lake sys 4096 Mar 27 23:38 gperftools-2.2
-rw-r--r-- 1 lake sys   37 Mar 27 23:38 libshim_allocator.a
-rw-r--r-- 1 lake sys   37 Mar 27 23:38 libshim_asio.a
-rw-r--r-- 1 lake sys   37 Mar 27 23:38 libshim_boost.a
-rw-r--r-- 1 lake sys   37 Mar 27 23:38 libshim_mozjs.a
-rw-r--r-- 1 lake sys   37 Mar 27 23:38 libshim_pcrecpp.a
-rw-r--r-- 1 lake sys   37 Mar 27 23:38 libshim_snappy.a
-rw-r--r-- 1 lake sys   37 Mar 27 23:38 libshim_stemmer.a
-rw-r--r-- 1 lake sys   37 Mar 27 23:38 libshim_tz.a
-rw-r--r-- 1 lake sys   37 Mar 27 23:38 libshim_wiredtiger.a
-rw-r--r-- 1 lake sys   37 Mar 27 23:38 libshim_yaml.a
-rw-r--r-- 1 lake sys   37 Mar 27 23:38 libshim_zlib.a
drwxr-xr-x 5 lake sys 4096 Mar 27 23:38 libstemmer_c
drwxr-xr-x 4 lake sys 4096 Mar 27 23:43 mozjs-38
drwxr-xr-x 2 lake sys 4096 Mar 27 23:43 murmurhash3
drwxr-xr-x 2 lake sys 4096 Mar 27 23:43 pcre-8.41
drwxr-xr-x 5 lake sys 4096 Mar 27 23:44 s2
-rw-r--r-- 1 lake sys 1148 Mar 27 23:38 shim_allocator.o
-rw-r--r-- 1 lake sys 1143 Mar 27 23:38 shim_asio.o
-rw-r--r-- 1 lake sys 1144 Mar 27 23:38 shim_boost.o
-rw-r--r-- 1 lake sys 1144 Mar 27 23:38 shim_mozjs.o
-rw-r--r-- 1 lake sys 1145 Mar 27 23:38 shim_pcrecpp.o
-rw-r--r-- 1 lake sys 1145 Mar 27 23:38 shim_snappy.o
-rw-r--r-- 1 lake sys 1146 Mar 27 23:38 shim_stemmer.o
-rw-r--r-- 1 lake sys 1141 Mar 27 23:38 shim_tz.o
-rw-r--r-- 1 lake sys 1149 Mar 27 23:38 shim_wiredtiger.o
-rw-r--r-- 1 lake sys 1143 Mar 27 23:38 shim_yaml.o
-rw-r--r-- 1 lake sys 1143 Mar 27 23:38 shim_zlib.o
drwxr-xr-x 2 lake sys 4096 Mar 27 23:44 snappy-1.1.2
drwxr-xr-x 4 lake sys 4096 Mar 27 23:45 wiredtiger
drwxr-xr-x 3 lake sys 4096 Mar 27 23:45 yaml-cpp-0.5.1
drwxr-xr-x 2 lake sys 4096 Mar 27 23:45 zlib-1.2.8
lake@localhost:~/Cloud/mongodb/mongo-r3.2.19-git$  date
Wed Mar 28 00:40:52 EDT 2018
lake@localhost:~/Cloud/mongodb/mongo-r3.2.19-git$ 




3. Build command line client mongo 




lake@localhost:~/Cloud/mongodb/mongo-r3.2.19-git$ buildscripts/scons.py mongo 
................


lake@localhost:~/Cloud/mongodb/mongo-r3.2.19-git$ file mongo
mongo: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=b0a42100b94afe02ad1004ea64bfd384dd398375, not stripped
lake@localhost:~/Cloud/mongodb/mongo-r3.2.19-git$ ls -l 
total 791476
-rw-r--r--  1 lake sys     11358 Mar 27 22:32 APACHE-2.0.txt
drwxr-xr-x  4 lake sys      4096 Mar 27 22:51 build
drwxr-xr-x  8 lake sys      4096 Mar 27 22:51 buildscripts
-rw-r--r--  1 lake sys      3747 Mar 27 22:32 CONTRIBUTING.rst
drwxr-xr-x  2 lake sys      4096 Mar 27 22:32 debian
drwxr-xr-x  2 lake sys      4096 Mar 27 22:32 distsrc
drwxr-xr-x  2 lake sys      4096 Mar 27 22:32 docs
drwxr-xr-x  3 lake sys      4096 Mar 27 22:32 etc
-rw-r--r--  1 lake sys     34520 Mar 27 22:32 GNU-AGPL-3.0.txt
drwxr-xr-x 28 lake sys      4096 Mar 27 22:32 jstests
-rwxr-xr-x  1 lake sys 210703752 Mar 28 00:50 mongo
-rwxr-xr-x  1 lake sys 599558296 Mar 27 23:45 mongod
-rw-r--r--  1 lake sys      2266 Mar 27 22:32 README
drwxr-xr-x  2 lake sys      4096 Mar 27 22:32 rpm
-rw-r--r--  1 lake sys    100839 Mar 27 22:32 SConstruct
drwxr-xr-x  3 lake sys      4096 Mar 27 22:51 site_scons
drwxr-xr-x  4 lake sys      4096 Mar 27 22:32 src


lake@localhost:~/Cloud/mongodb/mongo-r3.2.19-git$ buildscripts/scons.py  mongos 
....
laceholder library build/opt/mongo/s/commands/libcluster_commands.a
Generating placeholder library build/opt/mongo/s/query/libcluster_client_cursor.a
Skipping ranlib for build/opt/mongo/s/commands/libcluster_commands.a
Skipping ranlib for build/opt/mongo/s/query/libcluster_client_cursor.a
Linking build/opt/mongo/mongos
Install file: "build/opt/mongo/mongos" as "mongos"
scons: done building targets. 
lake@localhost:~/Cloud/mongodb/mongo-r3.2.19-git$ ls -l mongo*
-rwxr-xr-x 1 lake sys 210703752 Mar 28 00:50 mongo
-rwxr-xr-x 1 lake sys 599558296 Mar 27 23:45 mongod
-rwxr-xr-x 1 lake sys 286169416 Mar 28 00:54 mongos
lake@localhost:~/Cloud/mongodb/mongo-r3.2.19-git$ 






4. Alternatively, you may build everything, which includes mongo, mongod, mongos, and all the C++ unit tests:


lake@localhost:~/Cloud/mongodb/mongo-r3.2.19-git$ buildscripts/scons.py all 


paramers 
-j <N> This option controls the number of parallel jobs SCons will use. Depending on what the local hardware is, you probably want to set this from anything between 1 and 32. Keep in mind that this isn't just compilation, but also linking. Having 32 concurrent linking jobs running can make your machine pretty sluggish. Find a number that works for you, such as the number of cpus. When running on Windows machines, it is recommended to install either pywin32 or ActivePython if you wish to do parallel builds.


--ssl
This option builds MongoDB with SSL support.


>>>>>>>>>>>> Rebuild with ssl and build all 


lake@localhost:~/Cloud/mongodb/mongo-r3.2.19-git$ buildscripts/scons.py all --ssl -j32 
..............


Checking whether backtrace_symbols_fd is declared... yes
Checking for C library pcap... no
Checking for C library wpcap... no
Checking if std::atomic<int64_t> works... yes
Checking if std::atomic<uint64_t> works... yes
Checking if std::atomic<int32_t> works... yes
Checking if std::atomic<uint32_t> works... yes
Checking if __malloc_hook is declared volatile... yes
Checking for C function fallocate()... yes
Checking for C function sync_file_range()... yes
Checking for C header file x86intrin.h... yes
scons: done reading SConscript files.
scons: Building targets ...
Creating 'build/opt/mongo/config.h'






Install file: "build/opt/mongo/mongod" as "mongod"
scons: done building targets.
lake@localhost:~/Cloud/mongodb/mongo-r3.2.19-git$ ls -l mongo*
-rwxr-xr-x 1 lake sys 212241480 Mar 28 01:09 mongo
-rwxr-xr-x 1 lake sys  71345952 Mar 28 01:09 mongobridge
-rwxr-xr-x 1 lake sys 604151632 Mar 28 01:12 mongod
-rwxr-xr-x 1 lake sys 593656192 Mar 28 01:12 mongoperf
-rwxr-xr-x 1 lake sys 290095048 Mar 28 01:09 mongos
lake@localhost:~/Cloud/mongodb/mongo-r3.2.19-git$ ls -l 
total 2385036
-rw-r--r--  1 lake sys     11358 Mar 27 22:32 APACHE-2.0.txt
drwxr-xr-x  5 lake sys      4096 Mar 28 01:12 build
drwxr-xr-x  8 lake sys      4096 Mar 27 22:51 buildscripts
-rw-r--r--  1 lake sys      3747 Mar 27 22:32 CONTRIBUTING.rst
-rwxr-xr-x  1 lake sys 670556608 Mar 28 01:12 dbtest
drwxr-xr-x  2 lake sys      4096 Mar 27 22:32 debian
drwxr-xr-x  2 lake sys      4096 Mar 27 22:32 distsrc
drwxr-xr-x  2 lake sys      4096 Mar 27 22:32 docs
drwxr-xr-x  3 lake sys      4096 Mar 27 22:32 etc
-rw-r--r--  1 lake sys     34520 Mar 27 22:32 GNU-AGPL-3.0.txt
drwxr-xr-x 28 lake sys      4096 Mar 27 22:32 jstests
-rwxr-xr-x  1 lake sys 212241480 Mar 28 01:09 mongo
-rwxr-xr-x  1 lake sys  71345952 Mar 28 01:09 mongobridge
-rwxr-xr-x  1 lake sys 604151632 Mar 28 01:12 mongod
-rwxr-xr-x  1 lake sys 593656192 Mar 28 01:12 mongoperf
-rwxr-xr-x  1 lake sys 290095048 Mar 28 01:09 mongos
-rw-r--r--  1 lake sys      2266 Mar 27 22:32 README
drwxr-xr-x  2 lake sys      4096 Mar 27 22:32 rpm
-rw-r--r--  1 lake sys    100839 Mar 27 22:32 SConstruct
drwxr-xr-x  3 lake sys      4096 Mar 27 22:51 site_scons
drwxr-xr-x  4 lake sys      4096 Mar 27 22:32 src
lake@localhost:~/Cloud/mongodb/mongo-r3.2.19-git$ ./mongo
MongoDB shell version: 3.2.19
connecting to: test
2018-03-28T01:41:00.197-0400 W NETWORK  [thread1] Failed to connect to 127.0.0.1:27017, in(checking socket for error after poll), reason: errno:111 Connection refused
2018-03-28T01:41:00.197-0400 E QUERY    [thread1] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed :
connect@src/mongo/shell/mongo.js:229:14
@(connect):1:6


exception: connect failed
lake@localhost:~/Cloud/mongodb/mongo-r3.2.19-git$ 










####  Test 




lake@localhost:~/Cloud/mongodb$ mkdir Bin-mongo-r3.2.19




lake@localhost:~/Cloud/mongodb/mongo-r3.2.19-git$ cd build/opt/mongo/
lake@localhost:~/Cloud/mongodb/mongo-r3.2.19-git/build/opt/mongo$ ls
base    config.h  dbtests    liblinenoise_utf8.a  logger  mongoperf  rpc        shell     util
bson    crypto    executor   libshell_core.a      mongo   mongos     s          tools
client  db        libbase.a  libshell_options.a   mongod  platform   scripting  unittest


lake@localhost:~/Cloud/mongodb/mongo-r3.2.19-git/build/opt/mongo$ cp mongo*  ~/Cloud/mongodb/Bin-mongo-r3.2.19/
lake@localhost:~/Cloud/mongodb/mongo-r3.2.19-git/build/opt/mongo$ cd ~/Cloud/mongodb/Bin-mongo-r3.2.19/
lake@localhost:~/Cloud/mongodb/Bin-mongo-r3.2.19$ ls
mongo  mongod  mongoperf  mongos
lake@localhost:~/Cloud/mongodb/Bin-mongo-r3.2.19$ 








lake@localhost:~/Cloud/mongodb/Bin-mongo-r3.2.19$ ./mongod  -v   --bind_ip  localhost,/tmp/mongod.sock   --port 27017  --dbpath ./db --logpath ./logs/mongodb.log
### to have http inteface start,  add  --httpinterface
./mongod  -v    --httpinterface  --bind_ip  localhost,/tmp/mongod.sock   --port 27017  --dbpath ./db --logpath ./logs/mongodb.log   


http://localhost:28017/    (28017= 27017 + 1000)
###  add rest to have no function in web:    --httpinterface   --rest




lake@localhost:~/Cloud/mongodb/Bin-mongo-r3.2.19$ ./mongo
MongoDB shell version: 3.2.19
connecting to: test
Server has startup warnings: 
2018-03-28T02:14:10.670-0400 I CONTROL  [initandlisten] 
2018-03-28T02:14:10.670-0400 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
2018-03-28T02:14:10.670-0400 I CONTROL  [initandlisten] **        We suggest setting it to 'never'
2018-03-28T02:14:10.670-0400 I CONTROL  [initandlisten] 
2018-03-28T02:14:10.670-0400 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
2018-03-28T02:14:10.670-0400 I CONTROL  [initandlisten] **        We suggest setting it to 'never'
2018-03-28T02:14:10.670-0400 I CONTROL  [initandlisten] 
> show dbs
local  0.000GB
> 2+2
4







lake@localhost:~/Cloud/mongodb/Bin-mongo-r3.2.19$ cat logs/mongodb.log 
2018-03-28T02:14:09.836-0400 I CONTROL  [initandlisten] MongoDB starting : pid=1748 port=27017 dbpath=./db 64-bit host=localhost.localdomain
2018-03-28T02:14:09.836-0400 I CONTROL  [initandlisten] db version v3.2.19
2018-03-28T02:14:09.836-0400 I CONTROL  [initandlisten] git version: a9f574de6a566a58b24d126b44a56718d181e989
2018-03-28T02:14:09.836-0400 I CONTROL  [initandlisten] OpenSSL version: OpenSSL 1.0.1e-fips 11 Feb 2013
2018-03-28T02:14:09.836-0400 I CONTROL  [initandlisten] allocator: tcmalloc
2018-03-28T02:14:09.836-0400 I CONTROL  [initandlisten] modules: none
2018-03-28T02:14:09.836-0400 I CONTROL  [initandlisten] build environment:
2018-03-28T02:14:09.836-0400 I CONTROL  [initandlisten]     distarch: x86_64
2018-03-28T02:14:09.836-0400 I CONTROL  [initandlisten]     target_arch: x86_64
2018-03-28T02:14:09.836-0400 I CONTROL  [initandlisten] options: { net: { bindIp: "localhost,/tmp/mongod.sock", port: 27017 }, storage: { dbPath: "./db" }, systemLog: { destination: "file", path: "./logs/mongodb.log", verbosity: 1 } }
2018-03-28T02:14:09.836-0400 D NETWORK  [initandlisten] fd limit hard:4096 soft:1024 max conn: 819
2018-03-28T02:14:09.859-0400 I -        [initandlisten] Detected data files in ./db created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.
2018-03-28T02:14:09.859-0400 I STORAGE  [initandlisten] wiredtiger_open config: create,cache_size=18G,session_max=20000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),checkpoint=(wait=60,log_size=2GB),statistics_log=(wait=0),verbose=(recovery_progress),
2018-03-28T02:14:10.060-0400 I STORAGE  [initandlisten] WiredTiger [1522217650:60768][1748:0x7f66f1f53dc0], txn-recover: Main recovery loop: starting at 1/12288
2018-03-28T02:14:10.148-0400 I STORAGE  [initandlisten] WiredTiger [1522217650:148600][1748:0x7f66f1f53dc0], txn-recover: Recovering log 1 through 2
2018-03-28T02:14:10.233-0400 I STORAGE  [initandlisten] WiredTiger [1522217650:233785][1748:0x7f66f1f53dc0], txn-recover: Recovering log 2 through 2
2018-03-28T02:14:10.628-0400 D COMMAND  [WTJournalFlusher] BackgroundJob starting: WTJournalFlusher
2018-03-28T02:14:10.628-0400 D STORAGE  [WTJournalFlusher] starting WTJournalFlusher thread
2018-03-28T02:14:10.653-0400 D STORAGE  [initandlisten] flushing directory ./db
2018-03-28T02:14:10.670-0400 I CONTROL  [initandlisten] 
2018-03-28T02:14:10.670-0400 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
2018-03-28T02:14:10.670-0400 I CONTROL  [initandlisten] **        We suggest setting it to 'never'
2018-03-28T02:14:10.670-0400 I CONTROL  [initandlisten] 
2018-03-28T02:14:10.670-0400 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
2018-03-28T02:14:10.670-0400 I CONTROL  [initandlisten] **        We suggest setting it to 'never'
2018-03-28T02:14:10.670-0400 I CONTROL  [initandlisten] 
2018-03-28T02:14:10.670-0400 D STORAGE  [initandlisten] enter repairDatabases (to check pdfile version #)
2018-03-28T02:14:10.670-0400 D STORAGE  [initandlisten] local.startup_log: clearing plan cache - collection info cache reset
2018-03-28T02:14:10.670-0400 D STORAGE  [initandlisten] Checking node for SERVER-23299 eligibility
2018-03-28T02:14:10.670-0400 D STORAGE  [initandlisten] Checking node for SERVER-23299 applicability - reading startup log
2018-03-28T02:14:10.670-0400 D STORAGE  [initandlisten] Checking node for SERVER-23299 applicability - checking version 3.2.x for x in [0, 4]
2018-03-28T02:14:10.670-0400 D STORAGE  [initandlisten]     Recovering database: local
2018-03-28T02:14:10.670-0400 D STORAGE  [initandlisten] done repairDatabases
2018-03-28T02:14:10.670-0400 I COMMAND  [initandlisten] query admin.system.roles planSummary: EOF ntoreturn:0 ntoskip:0 keysExamined:0 docsExamined:0 cursorExhausted:1 keyUpdates:0 writeConflicts:0 numYields:0 nreturned:0 reslen:20 locks:{ Global: { acquireCount: { r: 10, w: 1, W: 1 } }, Database: { acquireCount: { r: 4, W: 1 } }, Collection: { acquireCount: { r: 4 } } } 0ms
2018-03-28T02:14:10.671-0400 D INDEX    [initandlisten] checking complete
2018-03-28T02:14:10.671-0400 D COMMAND  [TTLMonitor] BackgroundJob starting: TTLMonitor
2018-03-28T02:14:10.671-0400 D COMMAND  [PeriodicTaskRunner] BackgroundJob starting: PeriodicTaskRunner
2018-03-28T02:14:10.671-0400 D COMMAND  [ClientCursorMonitor] BackgroundJob starting: ClientCursorMonitor
2018-03-28T02:14:10.671-0400 I NETWORK  [HostnameCanonicalizationWorker] Starting hostname canonicalization worker
2018-03-28T02:14:10.671-0400 I FTDC     [initandlisten] Initializing full-time diagnostic data capture with directory './db/diagnostic.data'
2018-03-28T02:14:10.671-0400 I NETWORK  [initandlisten] waiting for connections on port 27017
2018-03-28T02:14:19.311-0400 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:50009 #1 (1 connection now open)
2018-03-28T02:14:19.311-0400 I COMMAND  [conn1] command admin.$cmd command: isMaster { isMaster: 1 } keyUpdates:0 writeConflicts:0 numYields:0 reslen:178 locks:{} protocol:op_query 0ms
2018-03-28T02:14:19.311-0400 I COMMAND  [conn1] command admin.$cmd command: whatsmyuri { whatsmyuri: 1 } keyUpdates:0 writeConflicts:0 numYields:0 reslen:47 locks:{} protocol:op_command 0ms
2018-03-28T02:14:19.312-0400 I COMMAND  [conn1] command admin.$cmd command: getLog { getLog: "startupWarnings" } keyUpdates:0 writeConflicts:0 numYields:0 reslen:722 locks:{} protocol:op_command 0ms
2018-03-28T02:14:19.312-0400 I COMMAND  [conn1] command test.$cmd command: buildInfo { buildInfo: 1.0 } keyUpdates:0 writeConflicts:0 numYields:0 reslen:1178 locks:{} protocol:op_command 0ms
2018-03-28T02:14:19.313-0400 I COMMAND  [conn1] command admin.$cmd command: replSetGetStatus { replSetGetStatus: 1.0, forShell: 1.0 } keyUpdates:0 writeConflicts:0 numYields:0 reslen:71 locks:{} protocol:op_command 0ms
2018-03-28T02:14:19.313-0400 I COMMAND  [conn1] command test.$cmd command: isMaster { isMaster: 1.0, forShell: 1.0 } keyUpdates:0 writeConflicts:0 numYields:0 reslen:163 locks:{} protocol:op_command 0ms
2018-03-28T02:15:33.947-0400 I NETWORK  [conn1] end connection 127.0.0.1:50009 (0 connections now open)
lake@localhost:~/Cloud/mongodb/Bin-mongo-r3.2.19$ 



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值