A "download
1. go to the MongoDB website drop- down box to find linux =>rhel 6 =
Package Manager:
2.Instructions for installing with Yum
3. Click the (2) Link to find the 3.4 version copy
4. Enter /etc/yum.repos.d/ new mongodb.repo file in the Yum repository
Open the Yum Warehouse command Yum
Enter file cd/etc/yum.repos.d
new file (not folder)VI Mongodb.repo
Enter edit mode a
5. paste The contents of the 3.4 version : w Save:q exit
Install MongoDB database : yum install mongodb* or sudo yum install-y mongodb-org
add: See if MongoDB installation is successful command chkconfig can see mongod
6. Simple operation of MongoDB under Linux
Learn mongodb website:http://www.runoob.com/mongodb/mongodb-create-database.html
to view the running status of MongoDB:service Mongod status
Open MongoDB:service Mongod start
Stop MongoDB:service Mongod restart
into the MongoDB database:MONGO
Show all databases:show DBS
adding or using that database GHF:useGHF
Show current database:db
add: Insert Datato GHF: Db.ghf.insert ({"Name": " Rookie tutorial "})
By deleting:
Change :
check: Show all data for GHF:db.ghf.find ()
Running MongoDB under Linux