MongoDB: Install and configureation

本文详细介绍了如何在Ubuntu系统上安装MongoDB数据库,包括依赖安装、构建与安装步骤,并提供了MongoDB文档的安装指导。此外,还阐述了MongoDB与Hadoop的集成方法,包括下载、配置及构建MongoDB Hadoop连接器的过程。

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.youkuaiyun.com/junchaox/article/details/8552961

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值