zoukankan      html  css  js  c++  java
  • centos 7 安装mongodb 2.6.4

    [root@node01 ~]# tar -xvf mongodb-linux-x86_64-2.6.4.tgz
    mongodb-linux-x86_64-2.6.4/README
    mongodb-linux-x86_64-2.6.4/THIRD-PARTY-NOTICES
    mongodb-linux-x86_64-2.6.4/GNU-AGPL-3.0
    mongodb-linux-x86_64-2.6.4/bin/mongodump
    mongodb-linux-x86_64-2.6.4/bin/mongorestore
    mongodb-linux-x86_64-2.6.4/bin/mongoexport
    mongodb-linux-x86_64-2.6.4/bin/mongoimport
    mongodb-linux-x86_64-2.6.4/bin/mongostat
    mongodb-linux-x86_64-2.6.4/bin/mongotop
    mongodb-linux-x86_64-2.6.4/bin/mongooplog
    mongodb-linux-x86_64-2.6.4/bin/mongofiles
    mongodb-linux-x86_64-2.6.4/bin/bsondump
    mongodb-linux-x86_64-2.6.4/bin/mongoperf
    mongodb-linux-x86_64-2.6.4/bin/mongod
    mongodb-linux-x86_64-2.6.4/bin/mongos
    mongodb-linux-x86_64-2.6.4/bin/mongo
    
    [root@node01 ~]# ln -s /root/mongodb-linux-x86_64-2.6.4 /usr/local/mongodb
    
    [root@node01 ~]# mkdir -p /data
    [root@node01 ~]# mkdir -p /logfile
    
    [root@node01 ~]# vi /etc/profile
    export MONGODB=/usr/local/mongodb
    export PATH=$PATH:$MONGODB/bin
    
    [root@node01 ~]# source /etc/profile
    
    [root@node01 ~]# mongo -version
    MongoDB shell version: 2.6.4
    
    [root@node01 ~]# vi /usr/local/mongodb/mongodb.conf
    port=27017
    dbpath=/data
    logpath=/logfile/mongodb.log
    logappend=true
    fork=true
    
    [root@node01 ~]# mongod --config /usr/local/mongodb/mongodb.conf
    about to fork child process, waiting until server is ready for connections.
    forked process: 1357
    child process started successfully, parent exiting
    [root@node01 ~]# mongo
    MongoDB shell version: 2.6.4
    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:
    2020-12-30T01:21:43.697+0800 [initandlisten]
    2020-12-30T01:21:43.697+0800 [initandlisten] ** WARNING: Readahead for /data is set to 4096KB
    2020-12-30T01:21:43.697+0800 [initandlisten] **          We suggest setting it to 256KB (512 sectors) or less
    2020-12-30T01:21:43.697+0800 [initandlisten] **          http://dochub.mongodb.org/core/readahead
    > show dbs
    admin  (empty)
    local  0.078GB
    
    [root@node01 yum.repos.d]# netstat -tulnp | grep mongo
    tcp        0      0 0.0.0.0:27017           0.0.0.0:*               LISTEN      1357/mongod
    
    [root@node01 yum.repos.d]# mongod --config /usr/local/mongodb/mongodb.conf --shutdown
    killing process with pid: 1357
    [root@node01 yum.repos.d]# netstat -tulnp | grep mongo
    

      

  • 相关阅读:
    05 redis中的Setbit位图法统计活跃用户
    04 redis list结构及命令详解
    03 redis之string类型命令解析
    02 redis通用命令操作
    Mesos提交任务没有被执行
    mesos的zookeeper变更
    VS Code使用git
    vs code 安装Scala
    打印正反读计算方式
    cloudera上面安装Spark2.0
  • 原文地址:https://www.cnblogs.com/orcl-2018/p/14207782.html
Copyright © 2011-2022 走看看