欢迎来到天天文库
浏览记录
ID:8810120
大小:35.00 KB
页数:8页
时间:2018-04-08
《linuxphpmongodb环境搭建》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、Linux服务器开发环境搭建-Nginx+PHP+MongoDB所需安装包:eaccelerator-0.9.6.1.tar.bz2nginx-1.0.5.tar.gzphp-5.3.6.tar.gzmongodb-linux-i686-1.8.2.tgzmongodb-mongo-php-driver-1.0.10-0-g7ac74f1.tar.gz配置基本环境:mkdir-p/home/downloadmkdir-p/home/servermkdir-p/home/workspace1.安装Nginxcd/home/download;wg
2、ethttp://nginx.org/download/nginx-1.0.5.tar.gztarzxvfnginx-1.0.5.tar.gz;cd/home/download/nginx-1.0.5;./configure--prefix=/home/server/nginx-1.0.5;make;makeinstall;ln-s/home/server/nginx-1.0.5//home/nginxcd/home/nginx;注:如果出现./configure:error:theHTTPrewritemodulerequiresthePC
3、RElibrary.则执行下列脚本:wgetftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.12.tar.gztar-zvxfpcre-8.12.tar.gz;cdpcre-8.12./configuremake;makeinstall如果要安装purge模块cd/home/downloadwgethttp://labs.frickle.com/files/ngx_cache_purge-1.3.tar.gztarzxvfngx_cache_purge-1.3.tar.
4、gz./configure--prefix=/home/server/nginx-1.0.5--add-module=/home/download/ngx_cache_purge-1.3--with-http_stub_status_module2.安装PHPcd/home/download;wgethttp://cn.php.net/distributions/php-5.3.6.tar.gztarzxvfphp-5.3.6.tar.gz;cdphp-5.3.6;./configure--prefix=/home/server/php-5.
5、3.6--enable-fpm--enable-mbstring--enable-fastcgi--enable-force-cgi-redirectmake;makeinstall;ln-s/home/server/php-5.3.6//home/server/php;cd/home/server/php;cdetc;cpphp-fpm.conf.defaultphp-fpm.confviphp-fpm.conf,修改pm.start_servers,pm.min_spare_servers,pm.max_spare_servers.简单点
6、取消注释即可启动php:/home/server/php/sbin/php-fpm(安装过程可能出现缺少libxml2包和libxml2-devel)3.安装PHPeacceleratorcd/home/download;wgethttp://bart.eaccelerator.net/source/0.9.6.1/eaccelerator-0.9.6.1.tar.bz2tarjxvfeaccelerator-0.9.6.1.tar.bz2;cdeaccelerator-0.9.6.1;/home/server/php/bin/phpize.
7、/configure--enable-eaccelerator=shared--with-php-config=/home/server/php/bin/php-configmake;makeinstallmkdir/tmp/eacceleratorchmod0777/tmp/eacceleratorvi/home/server/php/lib/php.ini(如果没有,cp/home/download/php-5.3.6/php.ini-production/home/server/php/lib/php.ini)添加:extension=
8、"eaccelerator.so"eaccelerator.shm_size="16"eaccelerator.cache_dir="/tmp/eaccelerat
此文档下载收益归作者所有