MongoDB: Install and configureation

MongoDB

Download

#git clone https://github.com/mongodb/mongo


To install dependencies on Ubuntu systems:

#sudo apt-get install aptitude

#sudo aptitude install scons build-essential

#sudo aptitude install libboost-filesystem-dev libboost-program-options-dev libboost-system-dev libboost-thread-dev

#sudo aptitude install python-pymongo

Build and Install

#scons all  (it taks about one hour)

#scons --prefix=/opt/mongo install     (--prefix point to the bash dir used by mongo)

add the --prefix dir to PATH in ~/.bashrc and source to make it effecitve

#sudo mkdir -p /data/db

#sudo chmod 777 -R /data

#mongod   //boot mongo database

#mongo    //start a client

>help

 

MongoDB Docs

#git clone https://github.com/mongodb/docs.git
#cd docs/
#git config --global url."https://".insteadOF git://   
#python bootstrap.py  (use above commands avoid errors)
make html

 But error comes :



 

The complete build mongoDB docs see:

http://docs.mongodb.org/manual/meta/build/

#sudo apt-get install python-sphinx python-yaml python-argparse inkscape python-pip

#pip install droopy fabric

I can't build it sucessuflly. Instead of downloading pdf version from

http://docs.mongodb.org/master/MongoDB-manual.pdf

MongoDB Connector for Hadoop

#git clone https://github.com/mongodb/mongo-hadoop

#cd mongo-hadoop

alter build.gradle(to skip download some test data and coloarda repository url from https to http avoiding buile failure), please download attachment one build.gradle.gif and rename it to build.gradle

# ./gradlew jar -Phadoop_version=2.3

The jars will be placed in to build/libs for each module. e.g. for the core module, it will be generated in the core/build/libs directory.

After successfully building, you must copy the jars to the lib directory on each node in your hadoop cluster. This is usually one of the following locations, depending on which Hadoop release you are using:

  • $HADOOP_HOME/lib/
  • $HADOOP_HOME/share/hadoop/mapreduce/
  • $HADOOP_HOME/share/hadoop/lib/

References

http://blog.csdn.net/junchaox/article/details/8552961

猜你喜欢

转载自ylzhj02.iteye.com/blog/2076667
今日推荐