PHP应用   

基于MongoDB的php应用开发环境配置

时间:2012-02-10 00:07:24

1:下载MongoDB安装包(http://www.mongodb.org/downloads),以及php mongoDB 扩展(https://github.com/mongodb/mongo-php-driver/downloads;
    VC6 is for Apache (VC9 is for IIS)  )注意下载与自己操作系统一置的版本

2:创建MongoDB的数据文件和日志文件,在d盘建立目录D:\MongoDB,在MongoDB下面建立data文件夹,data下建立db和log两个文件夹,最后在log文件下建立log.txt

3:安装MongoDB,将第一步下载的MongoDB安装包文件解压到D:\MongoDB目录下 ,windows的命令行输入cmd,进入到D:\MongoDB\bin目录下面运行如下命令
mongod --install --serviceName mongodb --logpath d:\mongodb\data\log\log.txt --logappend --dbpath d:\mongodb\data\db --directoryperdb

4:net start mongodb 启动mongodb

5:如果成功的进入mongo的shell环境(参见下图)那么就说明MongoDB已经安装成功了

6:解压php mongoDB 扩展 到php的ext目录下,同时在php.ini目录下加入extension=php_mongo.dll,重新启动web服务器就ok

 

来源:红黑联盟

Notice: Constant RUNTIME already defined in /srv/html/srccn/news/config.php on line 15 Notice: Constant ROOTDIR already defined in /srv/html/srccn/news/config.php on line 16 Notice: Constant SITEDIR already defined in /srv/html/srccn/news/config.php on line 17 Notice: Constant DATAURL already defined in /srv/html/srccn/news/config.php on line 20 Notice: Constant VERSION already defined in /srv/html/srccn/news/system/kernel.php on line 17 Notice: Constant COREDIR already defined in /srv/html/srccn/news/system/kernel.php on line 18 Fatal error: require(): Cannot redeclare class mysql in /srv/html/srccn/news/system/kernel.php on line 22