Professional Documents
Culture Documents
What is Mongo DB ?
--- MongoDB is a cross-platform document-oriented database that is defined as a NoSQL database, MongoDB eschews
the traditional table-based relational database structure in favor of JSON-like documents with dynamic schemas
(MongoDB calls the format BSON), making the integration of data in certain types of applications easier and faster.
Released under a combination of the GNU Affero General Public License and the Apache License, MongoDB is free and
open-source software.
Website :- http://www.mongodb.com/
Step 1 :- Select the directory under which you want to install mongo db and check all the permission is assigned to
your user for this directory or not. example :- read, write and execute.
Step 2 :- Copy the installer file (mongodb-linux-x86_64-2.6.1.tar.gz ) for Linux into the directory created into step 1.
Step 3. Extract the files from the installer through tar command.
Step 4 :- ensure the location of the binaries is set in the PATH variable.
export PATH=<mongodb-install-directory>:$PATH
- bin
- data
- log
Before starting installation, User needs to create some config file and folders for mongo db installation as below
-- for mongo db process , create /data/db directory. If we create any other directory than we need to specify DBPATH
variable in mongo.cfg (config file) to start mongo db process on the Linux box.
Example :-
DBPATH= /opt/app/mongodb/mongodb-linux-x86_64-2.4.1/data/db
MONGOD.log=/opt/app/mongodb/mongodb-linux-x86_64-2.4.1/log
Step 6 :- Also we have to create a mongod.config file under mongo db home directory that will have all the details and
paths required to run mongod process on Linux. For example see below path
mongod.config=/opt/app/mongodb/mongodb-linux-x86_64-2.4.1/
Step 7 :- To start mongo db, execute below command from the bin directory of mongo db
Since Mongo DB is a NoSQL DB, we can create our DB and use them from command prompt.
Using the Mongo Shell (mongo.exe), you can interact with Mongo DB from the command line.
[INFORMATIONAL] Commands
db.adminCommand( { "hostInfo" : 1 } )
db.runCommand( { buildInfo: 1 } )
show dbs
5) Select the ‘admin’ database, and query for a list of databases in the Mongo DB instance:
use admin
db.runCommand( { listDatabases: 1 } )
db.stats()
++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mongo DB Basic Commands
No-Sql DB Mongod
This httpd version contains new features like MPMs, mod_lua, better authentication & authorization, Fast CGI Proxy,
improved OCSP support and small caching API.
By above link user can get the any installer file like .tar, .gz and binaries files for installation.
Apr-Utill-1.5.3
Pcre-8.35
-- Recommended
OpenSSL-1.0.1h
Above packages are bundled and come with Apache installer file. Once user unzip or explodes the installer file downloaded, will
get the all the packages and dependencies.
This library files are required for Apache HTTP server 2.4.9. it is not bundled with https, user may download it
from http://www.pcre.org. First, User has to build pcre library for the system that will create pcre-config scripts installed by the
PCRE build. To configuring Apache , user needs to add --with-pcre parameter.
Configure PCRE
$ cd pcre-8.35
$ ./configure --prefix=PREFIX
$ make install
above command will generate the pcre-config scripts under the pcre home directory. this pcre-config will be used during
Apache installation.
Extraction
$ gzip -d httpd-xx.tar.gz
$ cd httpd-NN
Configure Apache
Copy the APR, APR-Utill and pcre directory into the ./srclib of Apache installation.
PREFIX = it is home directory of installation or by default location system will take /usr/local/apache2
Note :- Here user can add multiple modes for Apache Web server according to requirement.
Compile & install Apache
$ make
Above command will compile the Apache package and file system.
$ make install
Upon successfully completion of above command. you can access your Apache HTTP server at port 80. To test it just hit the URL
:- http://<hostname>:80
But you need to start the https service to access this. Please follow the below steps.
Customization
$ vi PREFIX/conf/httpd.conf
here user can change the server parameters like hostname, port and modules for the Apache.
$ cd PREFIX/bin