• yum安装MangoDB


    1:操作系统信息

    2:yum命令查看MongoDB的包信息

    3:配置yum源

    #vi /etc/yum.repos.d/10gen.repo

    4:查看mongoDB的服务器包的信息

    5:安装MongoDB的服务器端和客户端工具

    #yum install mongo-10gen-server

    #yum install mongo-10gen

    卸载:

    #yum -y remove mongo-10gen-server

     

    6:启动MongoDB服务(以后有更新了,停掉mongodb,执行#yum update mongo-10gen mongo-10gen-server 即可)

    #service mongod start

    7:MongoDB配置文件

    # mongo.conf
    
    #where to log
    logpath=/var/log/mongo/mongod.log
    
    logappend=true
    
    # fork and run in background
    fork = true
    
    #port = 27017
    
    dbpath=/var/lib/mongo
    
    # location of pidfile
    pidfilepath = /var/run/mongodb/mongod.pid
    
    # Disables write-ahead journaling
    # nojournal = true
    
    # Enables periodic logging of CPU utilization and I/O wait
    #cpu = true
    
    # Turn on/off security.  Off is currently the default
    #noauth = true
    #auth = true
    
    # Verbose logging output.
    #verbose = true
    
    # Inspect all client data for validity on receipt (useful for
    # developing drivers)
    #objcheck = true
    
    # Enable db quota management
    #quota = true
    
    # Set oplogging level where n is
    #   0=off (default)
    #   1=W
    #   2=R
    #   3=both
    #   7=W+some reads
    #diaglog = 0
    
    # Ignore query hints
    #nohints = true
    
    # Disable the HTTP interface (Defaults to localhost:27018).
    #nohttpinterface = true
    
    # Turns off server-side scripting.  This will result in greatly limited
    # functionality
    #noscripting = true
    
    # Turns off table scans.  Any query that would do a table scan fails.
    #notablescan = true
    
    # Disable data file preallocation.
    #noprealloc = true
    
    # Specify .ns file size for new databases.
    # nssize = <size>
    
    # Accout token for Mongo monitoring server.
    #mms-token = <token>
    
    # Server name for Mongo monitoring server.
    #mms-name = <server-name>
    
    # Ping interval for Mongo monitoring server.
    #mms-interval = <seconds>
    
    # Replication Options
    
    # in replicated mongo databases, specify here whether this is a slave or master
    #slave = true
    #source = master.example.com
    # Slave only: specify a single database to replicate
    #only = master.example.com
    # or
    #master = true
    #source = slave.example.com
  • 相关阅读:
    php底层HashTable的实现
    【问底】徐汉彬:PHP7和HHVM的性能之争
    linux查找系统中占用磁盘空间最大的文件
    深入理解Yii2.0(yii学习的经典博客)
    梦想天空(关注前端开发技术 html5+css3)
    风雪之隅(Laruence PHP开发组成员, Zend兼职顾问, Yaf, Yar, Yac, Opcache等项目作者、维护者.)
    阿里云收集服务器性能指标的python脚本
    简单5步,释放Mac磁盘空间
    我是如何自学Android,资料分享(2015 版)
    查询tensorflow中的函数用法
  • 原文地址:https://www.cnblogs.com/xiaoit/p/3851789.html
Copyright © 2020-2023  润新知