分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > 技术分享

PHP-5.3.27源码安装及nginx-fastcgi配置

发布时间:2023-09-06 01:10责任编辑:蔡小小关键词:PHP配置nginx

源码安装php

cat /etc/redhat-releaseuname -rmwget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-6.repoyum install -y zlib-devel libxml2-devel libjpeg-turbo-devel freetype-devel libpng-devel gd-devel libcurl-devel libxslt-devel openssl-devel libmcrypt-develmkdir /server/tools -pcd /server/toolswget https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.15.tar.gz 或者 wget http://60.205.224.143/source/libiconv-1.15.tar.gztar -xf libiconv-1.15.tar.gzcd libiconv-1.15./configure --prefix=/usr/local/libiconvmake make installrpm -qa zlib-devel libxml2-devel libjpeg-turbo-devel libmcrypt-devel freetype-devel libpng-devel gd-devel libcurl-devel libxslt-devel openssl-develcd ..wget http://mirrors.sohu.com/php/php-5.3.27.tar.gztar xf php-5.3.27.tar.gzcd php-5.3.27./configure --prefix=/application/php-5.3.27 --with-mysql=mysqlnd --with-iconv-dir=/usr/local/libiconv --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fpm --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --enable-short-tags --enable-zend-multibyte --enable-static --with-xsl --with-fpm-user=nginx --with-fpm-group=nginx --enable-ftp #--with-mysql=mysqlnd ?此参数表示使用php自带的mysql客户端makemake installln -s /application/php-5.3.27/ /application/phpcp php.ini-production /application/php/lib/php.inicd /application/php/etc/cp php-fpm.conf.default php-fpm.conf/application/php/sbin/php-fpmps -ef | grep php-fpmlsof -i :9000

 配置nginx fastcgi模块

vim /application/nginx/conf/extra/www.confserver { ???????listen ??????80; ???????server_name ?www.peterwang.com; ???????root html/www; ???????index index.php index.html index.htm; ???????error_page ??500 502 503 504 ?/50x.html; ???????access_log logs/access_www.log main; ???????location / { ???????????????} ???????location ~.*\.(php|php5)?$ { ???????fastcgi_pass 127.0.0.1:9000; ???????fastcgi_index index.php; ???????include fastcgi.conf;}}/application/nginx/sbin/nginx -t/application/nginx/sbin/nginx -s reloadcd /application/nginx/html/wwwecho "<?php phpinfo(); ?>" > test_info.phpcat test_info.php#打开浏览器,输入http://10.0.0.8/test_info.php

PHP-5.3.27源码安装及nginx-fastcgi配置

原文地址:http://www.cnblogs.com/Peter2014/p/7512496.html

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved