Today I thought of exploring NoSQL era of computers. The first in this series is MongoDB. I am planning to setup and install MongoDB. Use MongoDB for modelling my current project's database.
Installation Steps
Step 1: Install MongoDB from Downloads
Step 2: Very easy to install, just unzip the downloaded file and we are done. (I renamed this file to mongodb to easily refer to it)
Step 3: Create a new directory called /data/db (For windows create this directory in C:/ drive)
Note: In case you want to create data directory at different location/name or to place datafiles elsewhere, use the --dbpath command line parameter when starting mongod.exe.
Server Startup
Tip: For easy server startup, add the mongodb directory and bin folder into the System Classpath variable.
Go to command prompt/terminal and type mongod --help command to see all the startup options.
For now, I started the server by typing mongod command.
Here's the server log:
-------------------------------------------------------------------------------------------------------------------------------------------------------
C:\Documents and Settings\parampreetsethi>mongod
mongod --help for help and startup options
Wed Jun 22 10:54:43 [initandlisten] MongoDB starting : pid=10944 port=27017 dbpa
th=/data/db/ 32-bit
** NOTE: when using MongoDB 32 bit, you are limited to about 2 gigabytes of data
** see http://blog.mongodb.org/post/137788967/32-bit-limitations
** with --dur, the limit is lower
Wed Jun 22 10:54:43 [initandlisten] db version v1.8.2, pdfile version 4.5
Wed Jun 22 10:54:43 [initandlisten] git version: 433bbaa14aaba6860da15bd4de8edf6
00f56501b
Wed Jun 22 10:54:43 [initandlisten] build sys info: windows (5, 1, 2600, 2, 'Ser
vice Pack 3') BOOST_LIB_VERSION=1_35
Wed Jun 22 10:54:43 [initandlisten] waiting for connections on port 27017
Wed Jun 22 10:54:43 [websvr] web admin interface listening on port 28017
C:\Documents and Settings\parampreetsethi>mongo
MongoDB shell version: 1.8.2
connecting to: test
> 3+2;
5
>
Installation Steps
Step 1: Install MongoDB from Downloads
Step 2: Very easy to install, just unzip the downloaded file and we are done. (I renamed this file to mongodb to easily refer to it)
Step 3: Create a new directory called /data/db (For windows create this directory in C:/ drive)
Note: In case you want to create data directory at different location/name or to place datafiles elsewhere, use the --dbpath command line parameter when starting mongod.exe.
Server Startup
Tip: For easy server startup, add the mongodb directory and bin folder into the System Classpath variable.
Go to command prompt/terminal and type mongod --help command to see all the startup options.
For now, I started the server by typing mongod command.
Here's the server log:
-------------------------------------------------------------------------------------------------------------------------------------------------------
C:\Documents and Settings\parampreetsethi>mongod
mongod --help for help and startup options
Wed Jun 22 10:54:43 [initandlisten] MongoDB starting : pid=10944 port=27017 dbpa
th=/data/db/ 32-bit
** NOTE: when using MongoDB 32 bit, you are limited to about 2 gigabytes of data
** see http://blog.mongodb.org/post/137788967/32-bit-limitations
** with --dur, the limit is lower
Wed Jun 22 10:54:43 [initandlisten] db version v1.8.2, pdfile version 4.5
Wed Jun 22 10:54:43 [initandlisten] git version: 433bbaa14aaba6860da15bd4de8edf6
00f56501b
Wed Jun 22 10:54:43 [initandlisten] build sys info: windows (5, 1, 2600, 2, 'Ser
vice Pack 3') BOOST_LIB_VERSION=1_35
Wed Jun 22 10:54:43 [initandlisten] waiting for connections on port 27017
Wed Jun 22 10:54:43 [websvr] web admin interface listening on port 28017
----------------------------------------------------------------------------------------------------------------------------------------------------
Welcome to world of NoSQL :) . MongoDB Server is up and running now.
The next step is to run command mongo in new command prompt/terminal. This will connect to MongoDB server which was started in the last step.
-------------------------------------------------------------------------------------------
C:\Documents and Settings\parampreetsethi>mongo
MongoDB shell version: 1.8.2
connecting to: test
> 3+2;
5
>
-------------------------------------------------------------------------------------------
Other Installation related Posts
Thanks
ReplyDelete