美文网首页
mongodb守护进程启动

mongodb守护进程启动

作者: weylau | 来源:发表于2019-07-20 16:50 被阅读0次

    新增配置文件

    mongodb.conf

    port=27017 #端口
    dbpath=/data/mongodb #数据存储目录
    logpath=/usr/local/mongodb/log/mongodb.log #日志存储位置
    logappend=true 
    fork=true #常驻进程
    

    启动

    ./bin/mongod -f mongodb.conf

    报错处理

    mongodb]# ./bin/mongod -f mongodb.conf
    about to fork child process, waiting until server is ready for connections.
    forked process: 19590
    ERROR: child process failed, exited with error number 1
    To see additional information in this output, start without the "--fork" option.
    

    发现是配置的log文件夹没有创建,创建log文件夹后重新执行正常启动

    mongodb]# ./bin/mongod -f mongodb.conf
    about to fork child process, waiting until server is ready for connections.
    forked process: 19622
    child process started successfully, parent exiting
    

    相关文章

      网友评论

          本文标题:mongodb守护进程启动

          本文链接:https://www.haomeiwen.com/subject/aaeulctx.html