zoukankan      html  css  js  c++  java
  • Mongodb之使用rpm包安装配置启动

      下载rpm包

    wget https://mirrors.aliyun.com/mongodb/yum/redhat/7Server/mongodb-org/3.2/x86_64/RPMS/mongodb-org-3.2.2-1.el7.x86_64.rpm
    wget https://mirrors.aliyun.com/mongodb/yum/redhat/7Server/mongodb-org/3.2/x86_64/RPMS/mongodb-org-tools-3.2.20-1.el7.x86_64.rpm
    wget https://mirrors.aliyun.com/mongodb/yum/redhat/7Server/mongodb-org/3.2/x86_64/RPMS/mongodb-org-shell-3.2.20-1.el7.x86_64.rpm
    wget https://mirrors.aliyun.com/mongodb/yum/redhat/7Server/mongodb-org/3.2/x86_64/RPMS/mongodb-org-server-3.2.20-1.el7.x86_64.rpm
    wget https://mirrors.aliyun.com/mongodb/yum/redhat/7Server/mongodb-org/3.2/x86_64/RPMS/mongodb-org-mongos-3.2.20-1.el7.x86_64.rpm
    

      安装

    rpm -ivh mongodb-org-3.2.20-1.el7.x86_64.rpm         mongodb-org-server-3.2.20-1.el7.x86_64.rpm  mongodb-org-tools-3.2.20-1.el7.x86_64.rpm
    mongodb-org-mongos-3.2.20-1.el7.x86_64.rpm  mongodb-org-shell-3.2.20-1.el7.x86_64.rpm
    

      修改配置文件/etc/mongod.conf

    systemLog:
      destination: file
      logAppend: true
      path: /var/log/mongodb/mongod.log
    storage:
      dbPath: /data/mongo
      journal:
        enabled: true
    processManagement:
      fork: true  # fork and run in background
      pidFilePath: /var/run/mongodb/mongod.pid  # location of pidfile
    net:
      port: 27017
      bindIp: 127.0.0.1  # Listen to local interface only, comment to listen on all interfaces.
    

      启动

     systemctl start mongod
    

      连接

    mongo --host 127.0.0.1:27017
    

  • 相关阅读:
    如何在Altium中下载并添加软件没有的苦文件【转】
    20121124
    变量作用域&函数作用域
    http相关知识
    函数声明和函数表达式
    js中constructor和prototype
    委托模式
    js跨域
    原型和原型链
    javascript 数据类型
  • 原文地址:https://www.cnblogs.com/minseo/p/9145906.html
Copyright © 2011-2022 走看看