Heim  >  Artikel  >  Backend-Entwicklung  >  CentOS中 MongoDB不能在php启动

CentOS中 MongoDB不能在php启动

WBOY
WBOYOriginal
2016-06-06 20:46:08932Durchsuche

需要在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数据目录权限

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn