For a long time did not send blog ~ today came a ~ nonsense less say ~goon.
A: Homebrew Introduction and Installation
Introduction: Is the software package management tools on Mac, easy to install and uninstall.
Installation: Open terminal, enter the following command, the period will enter a carriage return + two boot password.
Ruby-e "$ (curl-fssl https://raw.githubusercontent.com/Homebrew/install/master/install)"
|
Two: MongoDB installation
1: Open terminal, enter the following command
2: Continue to enter the following instruction, there will be about two progress bar (forget)
3: Enter the command to start MongoDB
The following error occurred: About to say there is no /data/db directory.
2016-08-02t18:19:16.825+0800 I CONTROL [Initandlisten] MongoDB starting:pid=37113 port=27017 dbpath=/data/db 64-bit hos T=c02q6n1gfvh5-3.local 2016-08-02t18:19:16.826+0800 I CONTROL [initandlisten] DB version v3.2.8 2016-08-02t18:19:16.826+0800 I CONTROL [Initandlisten] git version:ed70e33130c977bda0024c125b56d159573dbaf0 2016-08-02t18:19:16.826+0800 I CONTROL [Initandlisten] OpenSSL Version:openssl 1.0.2h 3 May 2016 2016-08-02t18:19:16.826+0800 I CONTROL [Initandlisten] Allocator:system 2016-08-02t18:19:16.826+0800 I CONTROL [Initandlisten] Modules:none 2016-08-02t18:19:16.826+0800 I CONTROL [Initandlisten] Build environment: 2016-08-02t18:19:16.826+0800 I CONTROL [Initandlisten] distarch:x86_64 2016-08-02t18:19:16.826+0800 I CONTROL [Initandlisten] target_arch:x86_64 2016-08-02t18:19:16.826+0800 I CONTROL [Initandlisten] options: {} 2016-08-02t18:19:16.828+0800 I STORAGE [Initandlisten] exception in initandlisten:29 Data directory/data/db not fou nd., terminating 2016-08-02t18:19:16.828+0800 I CONTROL [Initandlisten] dbexit:rc:100 |
4: Continue to enter instructions, create /data/db, solve the above problems. The password will be in and out once.
5: Try to start MongoDB again
The following error occurred: About say no permission.
2016-08-02t19:15:14.592+0800 I CONTROL [Initandlisten] MongoDB starting:pid=38311 port=27017 dbpath=/data/db 64-bit hos T=c02q6n1gfvh5-3.local 2016-08-02t19:15:14.593+0800 I CONTROL [initandlisten] DB version v3.2.8 2016-08-02t19:15:14.593+0800 I CONTROL [Initandlisten] git version:ed70e33130c977bda0024c125b56d159573dbaf0 2016-08-02t19:15:14.593+0800 I CONTROL [Initandlisten] OpenSSL Version:openssl 1.0.2h 3 May 2016 2016-08-02t19:15:14.593+0800 I CONTROL [Initandlisten] Allocator:system 2016-08-02t19:15:14.593+0800 I CONTROL [Initandlisten] Modules:none 2016-08-02t19:15:14.593+0800 I CONTROL [Initandlisten] Build environment: 2016-08-02t19:15:14.593+0800 I CONTROL [Initandlisten] distarch:x86_64 2016-08-02t19:15:14.593+0800 I CONTROL [Initandlisten] target_arch:x86_64 2016-08-02t19:15:14.593+0800 I CONTROL [Initandlisten] options: {} 2016-08-02t19:15:14.595+0800 I STORAGE [Initandlisten] exception in initandlisten:98 unable to create/open lock file :/data/db/mongod.lock errno:13 Permission denied is a Mongod instance already running?, terminating 2016-08-02t19:15:14.595+0800 I CONTROL [Initandlisten] dbexit:rc:100 |
6: Execute the following instruction, solve the above problem, give permission (hehe, no reaction after the execution)
sudo chown-r user name/data/db |
7: Try to start MongoDB again
Waitting 27017 ... Success!!!
2016-08-02t19:16:06.621+0800 I CONTROL [Initandlisten] MongoDB starting:pid=38338 port=27017 dbpath=/data/db 64-bit hos T=c02q6n1gfvh5-3.local 2016-08-02t19:16:06.622+0800 I CONTROL [initandlisten] DB version v3.2.8 2016-08-02t19:16:06.622+0800 I CONTROL [Initandlisten] git version:ed70e33130c977bda0024c125b56d159573dbaf0 2016-08-02t19:16:06.622+0800 I CONTROL [Initandlisten] OpenSSL Version:openssl 1.0.2h 3 May 2016 2016-08-02t19:16:06.622+0800 I CONTROL [Initandlisten] Allocator:system 2016-08-02t19:16:06.622+0800 I CONTROL [Initandlisten] Modules:none 2016-08-02t19:16:06.622+0800 I CONTROL [Initandlisten] Build environment: 2016-08-02t19:16:06.622+0800 I CONTROL [Initandlisten] distarch:x86_64 2016-08-02t19:16:06.622+0800 I CONTROL [Initandlisten] target_arch:x86_64 2016-08-02t19:16:06.622+0800 I CONTROL [Initandlisten] options: {} 2016-08-02t19:16:06.622+0800 I STORAGE [Initandlisten] Wiredtiger_open config:create,cache_size=4g,session_max= 20000,eviction= (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), 2016-08-02t19:16:07.239+0800 I CONTROL [Initandlisten] 2016-08-02t19:16:07.239+0800 I CONTROL [initandlisten] * * warning:soft rlimits too low. Number of files is a, should be at least 1000 2016-08-02t19:16:07.239+0800 I ftdc [Initandlisten] Initializing full-time diagnostic data capture with directory '/da Ta/db/diagnostic.data ' 2016-08-02t19:16:07.239+0800 I NETWORK [hostnamecanonicalizationworker] starting hostname canonicalization worker 2016-08-02t19:16:07.390+0800 I NETWORK [Initandlisten] waiting for connections on port 27017 |
8: Open the browser at this time, enter the following address:
The page that appears as shown below also represents a successful start.
It looks like you is trying to access MongoDB over HTTP on the native driver port.
|
Oh, God, that's all.
This article is from the "Cinderella" blog, please be sure to keep this source http://cinderella7.blog.51cto.com/7607653/1833705
Installation of MongoDB under Mac