Company Migration MongoDB, check a half-day data, a variety of textual research, all kinds of information, finally I choose very savage directly to the library and log directly to the SCP came ....
Note How to install and start MongoDB:
1. Unzip the MongoDB:
tar -zvxf mongodb-linux-x86_64-2.6. 4. gz
2. Enter MongoDB to set user name password:
[Email protected] bin]#./2.6. 4 connecting to:test> Use adminswitched to DB admin> AddUser (' abc', 'abc ')
3. Turn on MongoDB after exiting: (Default port: 27017)
./mongod--dbpath/data/mongodb/data--logpath/data/mongodb/mongodb.log-auth--fork
-auth: Requires authentication to enter.
--fork: Runs in the background.
--dbpath: Make data storage location
--logpath: Log storage location
4. Set up auto-run:
Echo " /home/mongodb-linux-x86_64-2.6.4/bin/mongod--dbpath/data/mongodb/data--logpath/data/mongodb/mongodb.log- Auth--fork" >>/etc/rc.local
5. Close can not forcibly kil, may be problematic, to be gentle: into MongoDB execution:
> Db.shutdownserver ()
Linux anything in the form of a file for me such a rib, is simply welfare ah ~ ~
By the way, when the pressure test, even if you want to test the real environment, but also to re-build an environment like ~ ~, or hang it is embarrassing .... I'm retarded enough to say that.
MongoDB Installation and startup (CENTOS7)