nginx_笔记分享_1_安装篇(nginx-1.0.5 php-fpm5.3.6 mysql)
作者 佚名技术
来源 Linux系统
浏览
发布时间 2012-03-29
gz cd php*/ ./configure --prefix=/usr/local/php --with-config-file-path=/etc/ --with-mysql=/usr/local/mysql \ --with-mysqli=/usr/local/mysql/bin/mysql_config --with-curl=/usr/local/curl \ --with-libxml-dir=/usr/include/libxml2 --with-gd --with-jpeg-dir=/usr/local/libjpeg --with-png-dir=/usr/local/libpng \ --with-bz2 --with-freetype-dir=/usr/local/freetype --with-iconv-dir=/usr/local/libiconv \ --with-zlib-dir --enable-soap --enable-gd-native-ttf --enable-mbstring --enable-exif \ --enable-dba --disable-ipv6 --disable-cgi --enable-bcmath --enable-sockets --enable-mbstring --enable-fpm make && make install cd ../ 拷贝配置文件 ! grep ''php'' /etc/profile && echo "export PATH=\$PATH:/usr/local/php/bin" >> /etc/profile && source /etc/profile ! grep ''php-fpm'' /etc/profile && echo "export PATH=\$PATH:/usr/local/php/sbin" >> /etc/profile && source /etc/profile cp php*/php.ini-development /etc/php.ini cp php*/sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm && chmod 755 /etc/init.d/php-fpm sed -i ''s/;pm.start_servers = 20/pm.start_servers = 20/'' /usr/local/php/etc/php-fpm.conf.default sed -i ''s/;pm.min_spare_servers = 5/pm.min_spare_servers = 5/'' /usr/local/php/etc/php-fpm.conf.default sed -i ''s/;pm.max_spare_servers = 35/pm.max_spare_servers = 35/'' /usr/local/php/etc/php-fpm.conf.default sed -i ''s/;pm.max_requests = 500/pm.max_requests = 500/'' /usr/local/php/etc/php-fpm.conf.default cp /usr/local/php/etc/php-fpm.conf.default" /usr/local/php/etc/php-fpm.conf" 四 nginx 与 php 整合 编辑 /usr/local/nginx/conf/nginx.conf 类似下面 server { listen 80; server_name localhost; location / { root html; index index.html index.htm; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } location ~ \.php$ { root html; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /usr/local/nginx/html$fastcgi_script_name; include fastcgi_params; } } 五 常用的基础命令 [root@slave logs]# nginx -h nginx: nginx version: nginx/1.0.5 nginx: Usage: nginx [-?hvVtq] [-s signal] [-c filename] [-p prefix] [-g directives] Options: -?,-h : this help #使用帮助 -v : show version and exit #版本号 -V : show version and configure options then exit #显示configure 的配置参数 -t : test configuration and exit #测试配置文件是否正确 ........... 测试 nginx /usr/local/nginx/sbin/nginx -t 启动 nginx /usr/local/nginx/sbin/nginx 关闭 nginx /usr/local/nginx/sbin/nginx -s stop 重载 nginx /usr/local/nginx/sbin/nginx -s reload [root@slave logs]# /etc/init.d/php-fpm Usa |
凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢! |
你可能对下面的文章感兴趣
上一篇: Linux Command - sendmail下一篇: 升级linux内核到3.0.0
关于nginx_笔记分享_1_安装篇(nginx-1.0.5 php-fpm5.3.6 mysql)的所有评论