1. The installation command is as follows
Featured Blogs About
1.https://www.jianshu.com/p/2d0a1ecd0c82
2. http://blog.csdn.net/moumaobuchiyu/article/details/54885306
3.http://blog.csdn.net/u013310075/article/details/28703009
Brew Install MongoDB (see http://www.cnblogs.com/huangxu/p/8288187.html for specific brew commands)
The installation path of my brew
/usr/local/opt opt is the installation directory for all software (boot file under opt)
/USR/LOCAL/ETC etc is the configuration file for all software
Installing MONGO
Adding environment variables
The steps are as follows: 1. Open the application, utilities, and terminal; 2. Locate the user's home directory in the terminal, enter: CD ~; 3. Create an empty file, enter: Touch. Bash_profile; 4. Edit this file, enter: Open. b Ash_profile; 5. Enter in this file: Export path=${path}:< file directory > (replace "< file directory >" with your desired directory) For example: Export path=${path}:/users /skythinking/mongodb/mongodb-osx-x86_64-2.6.1/bin;
sudo mongod--dbpath=/usr/local/var/mongodb--logpath=/usr/local/var/log/mongodb/mongo.log
After you add the environment variable, you need to go to the installation directory to execute the start command.
Brew Installation MongoDB