Home  >  Article  >  Backend Development  >  CentOS中 MongoDB不能在php启动

CentOS中 MongoDB不能在php启动

WBOY
WBOYOriginal
2016-06-06 20:46:08933browse

需要在mongodb conf里怎么设置吗CentOS中 MongoDB不能在php启动

CentOS中 MongoDB不能在php启动

CentOS中 MongoDB不能在php启动

而且好像没有错误没有写进mongodb.log

回复内容:

需要在mongodb conf里怎么设置吗CentOS中 MongoDB不能在php启动

CentOS中 MongoDB不能在php启动

CentOS中 MongoDB不能在php启动

而且好像没有错误没有写进mongodb.log

你应该自己查查文档:
Connection String URI Format
PHP MongoClient

如果是apache你需要:/usr/sbin/setsebool -P httpd_can_network_connect 1

检查一下 /etc/mongod.conf的权限是给了mongod吗?

mongodb设置了密码?

检查下mongo数据目录权限

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn