If you use command 2 to start the failure output information is as follows:ĮRROR: child process failed, exited with error number 48 Use the command 2 to start the server and successfully output the following information:Ībout to fork child process, waiting until server is ready for connections.Ĭhild process started successfully, parent exiting How to close the reference Turn off mongod servicechapter The mongod service started by command 2 runs in the background as a daemon thread. So, if we configure /usr/local/etc/nf and want mongdb to use our configuration, there are two optional commands: (1) $ mongod -config /usr/local/etc/nfAnd (2) $ mongod -config /usr/local/etc/nf -forkThe mongod service started with command 1 runs in the foreground, and can be turned off by Ctrl+C. It is recommended to pass mongod when starting -configParameter specifies the configuration file, more reference official website Configuration File Options。 The corresponding data save path for this configuration is /data/db. This is because it does not pass $ mongod -config xxx.confWhen this form specifies the configuration file xxx.conf, mongodb will use the default configuration built in the program. That's right, the above startup command does not read /usr/local/etc/nf. But the default dbpath in /usr/local/etc/nf is not /usr/local/var/mongodb? Could it be that the configuration file does not take effect? T10:25:09.929+0800 I CONTROL MongoDB starting : pid=5693 port=27017 dbpath=/data/db 64-bit host=MacBookProĪs you can see, the default data save path /data/db will be used. Starting mongod with this command will find the following output: Starting the mongod server requires only a very simple command: The mongod service is also the mongodb database. For details, please refer to my other article: Do I need to set the environment variable PATH to install Packages using Homebrew?。 Start the mongod service The fact is that there is no need to add environment variables at all. ![]() Many of the tutorials on the web have been deleted. If you want the latest environment variables to take effect immediately: Note that you can change the version to the mongodb version number you installed. bash_profile:Įxport PATH=/usr/local/Cellar/mongodb/version/bin:$ ![]() Note: If you are going to connect to a mongodb database that is not a native environment, bind_ip = 0.0.0.0Īdd the mongodb binary directory to the environment variable, first open. Path: /usr/local/var/log/mongodb/mongo.log You can see the contents of nf as follows: Then write data permissions to the folder you just created: The mongo binaries are here: /usr/local/Cellar/mongodb//bin Configuration database The mongo logs can be found at /usr/local/var/log/mongodb/ The databases are stored in the /usr/local/var/mongodb/ directory The default installation path for each part is □ /usr/local/Cellar/mongodb/3.2.7: 17 files, 264Mįrom the terminal information, it is known that regardless of which version is installed, the installation depends on openssl. Or, if you don't want/need a background service you can just run: To have launchd start mongodb now and restart at login: Own software and it requires this formula, you'll need to add to yourĬPPFLAGS: -I/usr/local/opt/openssl/include Generally there are no consequences of this for you. ![]() This formula is keg-only, which means it was not symlinked into /usr/local.Īpple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries => Pouring openssl-1.0.2h_1.el_Ī CA file has been bootstrapped using certificates from the system => Installing mongodb dependency: openssl => Installing dependencies for mongodb: openssl The normal version installation performs the following instructions: Mongodb provides 3 versions for installation: normal version, support for TLS/SSL version and development version, please refer to mongodb official website. There is a check mark that is already installed on the computer. In order to avoid occupying too many layouts, some of the contents of the terminal are omitted by. => Migrating /Library/Caches/Homebrew to /Users/chenxin/Library/Caches/Homebrew Removing: /Library/Caches/Homebrew/git-2.8.2.el_. Updated Homebrew from 60e3737 to e9cc2a5. The following information is output in the terminal: Install mongodb here using Homebrew, first update Homebrew: This article will demonstrate how to install and start the MongoDB database step by step. MongoDB is a free, open source, cross-platform file-based database that is part of a large family of NoSQL databases.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |