Nginx 0.7.x + PHP 5.2.8(FastCGI)搭建胜过Apache十倍的Web服务器(第4版)二

 安装步骤:
  (系统要求:Linux 2.6+ 内核,本文中的Linux操作系统为CentOS 5.1,另在RedHat AS4上也安装成功)

  一、获取相关开源程序:
  1、【适用CentOS操作系统】利用CentOS Linux系统自带的yum命令安装、升级所需的程序库(RedHat等其他Linux发行版可从安装光盘中找到这些程序库的RPM包,进行安装):
sudo -s
LANG=C
yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel


  2、【适用RedHat操作系统】RedHat等其他Linux发行版可从安装光盘中找到这些程序库的RPM包(事先可通过类似“rpm -qa | grep libjpeg”的命令查看所需的RPM包是否存在,通常是“xxx-devel”不存在,需要安装)。RedHat可以直接利用CentOS的RPM包安装,以下是RPM包下载网址:
  ①、RedHat AS4 & CentOS 4
  http://mirror.be10.com/centos/4/os/i386/CentOS/RPMS/
  http://mirror.be10.com/centos/4/os/x86_64/CentOS/RPMS/

  ②、RedHat AS5 & CentOS 5
  http://mirror.be10.com/centos/5/os/i386/CentOS/
  http://mirror.be10.com/centos/5/os/x86_64/CentOS/

  ③、RPM包搜索网站
  http://rpm.pbone.net/
  http://www.rpmfind.net/

  ④、RedHat AS4 系统环境,通常情况下缺少的支持包安装:
  Ⅰ、i386 系统
wget   http://blog.s135.com/soft/linux/nginx_php/rpm/i386/libjpeg-devel-6b-33.i386.rpm
rpm -ivh libjpeg-devel-6b-33.i386.rpm
wget   http://blog.s135.com/soft/linux/nginx_php/rpm/i386/freetype-devel-2.1.9-1.i386.rpm
rpm -ivh freetype-devel-2.1.9-1.i386.rpm
wget   http://blog.s135.com/soft/linux/nginx_php/rpm/i386/libpng-devel-1.2.7-1.i386.rpm
rpm -ivh libpng-devel-1.2.7-1.i386.rpm

  Ⅱ、x86_64 系统
wget   http://blog.s135.com/soft/linux/nginx_php/rpm/x86_64/libjpeg-devel-6b-33.x86_64.rpm
rpm -ivh libjpeg-devel-6b-33.x86_64.rpm
wget   http://blog.s135.com/soft/linux/nginx_php/rpm/x86_64/freetype-devel-2.1.9-1.x86_64.rpm
rpm -ivh freetype-devel-2.1.9-1.x86_64.rpm
wget   http://blog.s135.com/soft/linux/nginx_php/rpm/x86_64/libpng-devel-1.2.7-1.x86_64.rpm
rpm -ivh libpng-devel-1.2.7-1.x86_64.rpm


  3、【适用CentOS、RedHat及其它Linux操作系统】下载程序源码包:
  本文中提到的所有开源软件为截止到2009年1月15日的最新稳定版。
  ①、从软件的官方网站下载:
mkdir -p /data0/software
cd /data0/software
wget   http://sysoev.ru/nginx/nginx-0.7.30.tar.gz
wget   http://www.php.net/get/php-5.2.8.tar.gz/from/this/mirror
wget   http://php-fpm.anight.org/downloads/head/php-5.2.8-fpm-0.5.10.diff.gz
wget   http://dev.mysql.com/get/Downloads/MySQL-5.1/mysql-5.1.30.tar.gz/from/http://mirrors.24-7-solutions.net/pub/mysql/
wget   http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.12.tar.gz
wget "http://downloads.sourceforge.net/mcrypt/libmcrypt-2.5.8.tar.gz?modtime=1171868460&big_mirror=0"
wget "http://downloads.sourceforge.net/mcrypt/mcrypt-2.6.7.tar.gz?modtime=1194463373&big_mirror=0"
wget   http://pecl.php.net/get/memcache-2.2.4.tgz
wget "http://downloads.sourceforge.net/mhash/mhash-0.9.9.tar.gz?modtime=1175740843&big_mirror=0"
wget   ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-7.8.tar.gz
wget   http://bart.eaccelerator.net/source/0.9.5.3/eaccelerator-0.9.5.3.tar.bz2
wget   http://pecl.php.net/get/PDO_MYSQL-1.0.2.tgz

  ②、从blog.s135.com下载(比较稳定,只允许在本站,或者在Linux/Unix下通过Wget、Curl等命令下载以下软件):
mkdir -p /data0/software
cd /data0/software
wget   http://blog.s135.com/soft/linux/nginx_php/nginx/nginx-0.7.30.tar.gz
wget   http://blog.s135.com/soft/linux/nginx_php/php/php-5.2.8.tar.gz
wget   http://blog.s135.com/soft/linux/nginx_php/phpfpm/php-5.2.8-fpm-0.5.10.diff.gz
wget   http://blog.s135.com/soft/linux/nginx_php/mysql/mysql-5.1.30.tar.gz
wget   http://blog.s135.com/soft/linux/nginx_php/libiconv/libiconv-1.12.tar.gz
wget   http://blog.s135.com/soft/linux/nginx_php/mcrypt/libmcrypt-2.5.8.tar.gz
wget   http://blog.s135.com/soft/linux/nginx_php/mcrypt/mcrypt-2.6.7.tar.gz
wget   http://blog.s135.com/soft/linux/nginx_php/memcache/memcache-2.2.4.tgz
wget   http://blog.s135.com/soft/linux/nginx_php/mhash/mhash-0.9.9.tar.gz
wget   http://blog.s135.com/soft/linux/nginx_php/pcre/pcre-7.8.tar.gz
wget   http://blog.s135.com/soft/linux/nginx_php/eaccelerator/eaccelerator-0.9.5.3.tar.bz2
wget   http://blog.s135.com/soft/linux/nginx_php/pdo/PDO_MYSQL-1.0.2.tgz

你可能感兴趣的:(apache,Web,nginx,服务器,fastcgi)