-
Notifications
You must be signed in to change notification settings - Fork 1
Setup Linux host machine
STEP I: Setting up host machine
Prerequisite: The host machine should run a 64 bit version of the operating system. Steps:
- Open a terminal in the host machine
- Download and install mongodb-2.0.5 64bit (32bit version has a limitation of 2GB data space)
$ sudo wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.0.5.tgz
If you want to install the 32 bit version, use the following command:
$ sudo wget http://downloads.mongodb.org/linux/mongodb-linux-i686-2.0.5.tgz
and extract the corresponding downloaded file by replacing the mongodb-linux-x86_64-2.0.5.tgz
with mongodb-linux-i686-2.0.5.tgz
in the following command:
$ sudo tar -C /opt -zxvf mongodb-linux-x86_64-2.0.5.tgz
$ sudo mkdir -p /data/db/
$ sudo chown
`id -u` /data/db
Assuming you extracted mongodb tar file to /opt/mongodb-linux-x86_64-2.0.5/,
$ sudo ln -s /opt/mongodb-linux-x86_64-2.0.5/bin/mongod /usr/bin/mongod
$ sudo ln -s /opt/mongodb-linux-x86_64-2.0.5/bin/mongo /usr/bin/mongo
$ mongod
This starts the MongoDB database process. "waiting connections" will be displayed once the process starts.
(i) Open a new terminal and type
`$ mongo`
(ii) Type the following commands in the newly opened command prompt window (from the above command)
`> db.test.save( { a: 1 } )`
`> db.test.find()`
You should be able to see-
`{ "_id" : ObjectId("50af218a0e4451a45194eed5"), "a" : 1 }`
The displayed ObjectId can be different on your system. If you see this, then mongoDB has been started successfully.
(iii)Type Ctrl + C to exit mongo shell and close this terminal.
The "mongod" service should still be running in the first terminal.
IMPORTANT: Make sure to start mongod service before you start the SensorAct system.
NEXT: Setup SensorAct System