ubuntu下配置mongodb 错误
配置步骤 错误 MongoDB: exception in initAndListen: 20 Attempted to create a lock file on a read-only directory: /data/db,terminating The problem is that the directory you created,/data/db is owned by and only writable by the root user,but you are running mongod as yourself. There are several ways to resolve this,but ultimately,you must give the directory in question the right permissions. If this is for production,I would advise you to check the docs and think this over carefully – you probably want to take special care. However,if this is just for testing and you just need this to work and get on with it,you could try this,which will make the directory writable by everyone:
(编辑:岳阳站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |