今天说搭建起来玩玩,还算顺利,把过程记录下来,方便以后查询。vps装的是ubuntu,是在digitalocean购买的,他有优势是什么?价格便宜,速度还行。(广告了) 1、Nginx 参考:https://www.digitalocean.com/community/articles/how-to-set-up-nginx-virtual-
今天说搭建起来玩玩,还算顺利,把过程记录下来,方便以后查询。vps装的是ubuntu,是在digitalocean购买的,他有优势是什么?价格便宜,速度还行。(广告了)
1、Nginx
参考:https://www.digitalocean.com/community/articles/how-to-set-up-nginx-virtual-hosts-server-blocks-on-ubuntu-12-04-lts–3
2、PHP 后半部分是装PHP
参考:https://www.digitalocean.com/community/articles/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-12-04
3、MongoDB
参考:https://www.digitalocean.com/community/articles/how-to-install-mongodb-on-ubuntu-12-04
4、PHP的驱动
在http://pecl.php.net/package/mongo下载1.2.12(wget、axel等),然后执行如下命令:
在php.ini文件中增加extension=mongo.so(根据配置注意是否需要路径,我是直接加上路径的)
5、用phpinfo();查看结果
原文地址:VPS上搭建Nginx+PHP+MongoDB环境, 感谢原作者分享。
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号