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
    

  • 相关阅读:
    WPF 常用path示例
    Grid之 Gridlength 解析
    Binding Relative 示例
    Grid之 好玩的GridSplitter
    Blend 制作水晶按钮
    DockPanel—最守规矩布局控件
    万恶之源python介绍
    04.基本数据类型(list,tuple)
    02.万恶之源python 运算符和编码
    基本数据类型(int, bool, str)
  • 原文地址:https://www.cnblogs.com/minseo/p/9145906.html
Copyright © 2011-2022 走看看