The following articles may expire and can be downloaded at the following address:
Download the latest MongoDB version list http://www.mongodb.org/display/DOCS/Downloads
Download the required jar driver package http://github.com/mongodb/mongo-java-driver/downloads
This section describesWindows
AndLinux
Download link: http://www.mongodb.org/display/DOCS/Downloads plugin -----------------------------------------------------------------------------------WindowsDownload version 1.4.3 (Windows 32 bit) download link: http://downloads.mongodb.org/win32/mongodb-win32-i386-1.4.3.zip
Assume that the installation path is in E:/MongoDB. Set the data path of the MongoDB database to E:/data/MongoDB. Open the command line (start -- run) and enter the following command: 1. run the mongod command to create a link to the MongoDB database. The data storage path is E:/data/MongoDB.
E:
CD MongoDB/bin
Mongod.exe
-
Port 11111
-
Dbpath E:/data/MongoDB
2. Link to an existing MongoDB Database
E:
CD MongoDB/bin
Cmd.exe 192.168.135.212: 10001
Bytes -----------------------------------------------------------------------------------LinuxRecommended download version 1.4.3 download link: http://downloads.mongodb.org/linux/mongodb-linux-i686-1.4.3.tgz
Run the following command: unzip the tar-zxvf mongodb-linux-i686-1.4.3.tgz to locate Cd in the MongoDB/bin directory .. /MongoDB/bin 1. run the mongod command to create a connection to the MongoDB database. The port number is 10001, and the data storage path is/data/MongoDB/data,Logs
The storage path is/data/MongoDB/log. First, create related directories and files, and run the mkdir and touch commands --. /MongoDB/bin/mongod-port 10001-dbpath/data/MongoDB/data/M1 -- logpath/data/MongoDB/log/m1.log 2. link to an existing MongoDB Database
./MongoDB/bin/Mongo 192.168.135.212: 10001
Windows and Linux have some similarities and differences, but the link isDatabase
And use the same. Query all databases using show DBSTest
Database use test shows all tables (collections) of test show collections query server status dB. serverstatus ()