• hadoop mongodb install(3)


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

    root@iZuf68496ttdogcxs22w6sZ:~# mv mongodb-linux-x86_64-ubuntu1604-3.2.7.tgz /usr/local/
    root@iZuf68496ttdogcxs22w6sZ:~# su hadoop

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

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

    hadoop@iZuf68496ttdogcxs22w6sZ:/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

    hadoop@iZuf68496ttdogcxs22w6sZ:/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
    hadoop@iZuf68496ttdogcxs22w6sZ:/usr/local/mongodb/bin$ pgrep mongod -l
    16409 mongod
    hadoop@iZuf68496ttdogcxs22w6sZ:/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

  • 相关阅读:
    第四周学习总结
    第三周学习总结
    第二周学习总结
    第一周学习总结
    解决pycharm中导入Wordcloud库的时候失败的问题
    开发报告5
    TypeError: _cache_value_encoder: not supported type: <class 'numpy.ndarray'>
    pandas中的rename_axis用法
    金叉死叉量化交易--matplotlib绘图案例
    一、EDA分析
  • 原文地址:https://www.cnblogs.com/lianghong881018/p/10330010.html
Copyright © 2020-2023  润新知