hadoop mongodb install

Posted 良红

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了hadoop mongodb install相关的知识,希望对你有一定的参考价值。

reference:http://dblab.xmu.edu.cn/blog/868-2/

[email protected]:~# mv mongodb-linux-x86_64-ubuntu1604-3.2.7.tgz /usr/local/
[email protected]:~# su hadoop

[email protected]:/usr/local$ sudo tar zxf mongodb-linux-x86_64-ubuntu1604-3.2.7.tgz -C /usr/local/
[sudo] password for hadoop:

[email protected]:/usr/local$ sudo mv mongodb-linux-x86_64-ubuntu1604-3.2.7 mongodb
[email protected]:/usr/local$ sudo chown -R hadoop:hadoop mongodb
[email protected]:/usr/local$ cd mongodb/
[email protected]:/usr/local/mongodb$ ls
bin GNU-AGPL-3.0 MPL-2 README THIRD-PARTY-NOTICES
[email protected]:/usr/local/mongodb$ mkdir data/db/journal -p
[email protected]:/usr/local/mongodb$ ls
bin data GNU-AGPL-3.0 MPL-2 README THIRD-PARTY-NOTICES
[email protected]:/usr/local/mongodb$ cd data/db/journal/
[email protected]:/usr/local/mongodb/data/db/journal$ ls
[email protected]:/usr/local/mongodb/data/db/journal$ touch mongodb.log

[email protected]:/usr/local/mongodb/data$ cat mongodb.conf 

logpath=/usr/local/mongodb/data/db/journal/mongodb.log
logappend=true
fork=true
dbpath=/usr/local/mongodb/data/db
port=27017

 

add export PATH=$PATH:/usr/local/mongodb/bin  to  ~/.bashrc

[email protected]:/usr/local/mongodb/bin$ mongod -f ../data/mongodb.conf
about to fork child process, waiting until server is ready for connections.
forked process: 16409
child process started successfully, parent exiting
[email protected]:/usr/local/mongodb/bin$ pgrep mongod -l
16409 mongod
[email protected]:/usr/local/mongodb/bin$ mongo
MongoDB shell version: 3.2.7
connecting to: test
Welcome to the MongoDB shell.
For interactive help, type "help".
For more comprehensive documentation, see
http://docs.mongodb.org/
Questions? Try the support group
http://groups.google.com/group/mongodb-user
Server has startup warnings:
2019-01-28T13:43:33.783+0800 I CONTROL [initandlisten]
2019-01-28T13:43:33.783+0800 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is ‘always‘.
2019-01-28T13:43:33.783+0800 I CONTROL [initandlisten] ** We suggest setting it to ‘never‘
2019-01-28T13:43:33.783+0800 I CONTROL [initandlisten]
2019-01-28T13:43:33.783+0800 I CONTROL [initandlisten] ** WARNING: soft rlimits too low. rlimits set to 7856 processes, 65535 files. Number of processes should be at least 32767.5 : 0.5 times number of files.
2019-01-28T13:43:33.783+0800 I CONTROL [initandlisten]

 

if we want to in-depth study mongodb , we can learn from :

http://www.runoob.com/mongodb/mongodb-connections.html

 






































以上是关于hadoop mongodb install的主要内容,如果未能解决你的问题,请参考以下文章

使用hadoop mapreduce分析mongodb数据:

hadoop生态搭建(3节点)-13.mongodb配置

linux上安装mongodb

使用hadoop mapreduce分析mongodb数据:

MongoDB & Spark:mongo-hadoop 和 mongo-spark 的区别

使用hadoop mapreduce分析mongodb数据