
fastnmp
The Fast Nginx+php+mysql+python+memcached+eaccelerator for Centos
PHP 5.3.6 MYSQL 5.5.10 PYTHON 2.7 memcached 1.45 eaccelerator 0.96 CENTOS 5.5 within 32bit
software list:
mkdir -p /www/software
wget http://www.rarsoft.com/rar/rarlinux-4.0.0.tar.gz
wget http://monkey.org/~provos/libevent-2.0.10-stable.tar.gz
wget http://nginx.org/download/nginx-0.8.54..tar.gz
wget http://www.php.net/get/php-5.2.17.tar.gz/from/this/mirror
wget http://php-fpm.org/downloads/php-5.2.17-fpm-0.5.14.diff.gz
wget http://ftp.gnu.org/gnu/bison/bison-2.4.3.tar.gz
wget http://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.10.tar.gz/from/http://mysql.he.net/
wget http://www.cmake.org/files/v2.8/cmake-2.8.4.tar.gz
wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.13.1.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.8.tar.gz?modtime=1194463373&big_mirror=0"
wget http://pecl.php.net/get/memcache-2.2.6.tgz
wget "http://downloads.sourceforge.net/mhash/mhash-0.9.9.9.tar.gz?modtime=1175740843&big_mirror=0"
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.12.tar.gz
wget http://bart.eaccelerator.net/source/0.9.6.1/eaccelerator-0.9.6.1.tar.bz2
wget http://pecl.php.net/get/PDO_MYSQL-1.0.2.tgz
wget ftp://mirror.aarnet.edu.au/pub/imagemagick/ImageMagick-6.6.9-3.tar.gz
wget http://pecl.php.net/get/imagick-3.0.1.tgz
wget http://labs.frickle.com/files/ngx_cache_purge-1.2.tar.gz
wget http://labs.frickle.com/files/ngx_slowfs_cache-1.5.tar.gz
wget http://www.php.net/get/php-5.3.6.tar.gz/from/this/mirror
wget http://memcached.googlecode.com/files/memcached-1.4.5.tar.gz
wget http://acelnmp.googlecode.com/files/webbench-1.5.tar.gz
wget http://downloads.zend.com/optimizer/3.3.9/ZendOptimizer-3.3.9-linux-glibc23-i386.tar.gz
wget http://google-perftools.googlecode.com/files/google-perftools-1.7.tar.gz
wget ftp://vsftpd.beasts.org/users/cevans/vsftpd-2.3.4.tar.gz
yum -y update
sudo -s
LANG=C
yum -y install gcc gcc-c++ gcc-g77 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 openldap openldap-devel nss_ldap openldap-clients openldap-servers unzip samba yum-fastestmirror flex bison libtool libtool-libs kernel-devel libpng10 libpng10-devel gd gd-devel fonts-chinese gettext gettext-devel pspell-devel
yum remove Deployment_Guide-en-US finger cups-libs cups
bluez-libs desktop-file-utils ppp rp-pppoe wireless-tools irda-utils
nfs-utils nfs-utils-lib rdate fetchmail eject ksh mkbootdisk mtools
syslinux tcsh startup-notification talk apmd rmt dump setserial portmap yp-tools ypbind gnome* -y
``` The webserver for nginx 502 Bad Gateway and 504 Gateway Time-out Perfect solution must copy php-fpm.conf three and the /etc/init.d/php-fpm copy three nginx configure file (nginx.conf) Add the following upstream fastcgi_php { server 127.0.0.1:9100 weight=1 ; server 127.0.0.1:9102 weight=2 ; server 127.0.0.1:9103 weight=3 ; }
server Inside Add the following
location ~ .*\.(php|php5)?$ {
fastcgi_next_upstream error timeout invalid_header http_500 http_503 http_404;
fastcgi_pass fastcgi_php;
fastcgi_index index.php;
include fastcgi_params;
}
lsof -i tcp:9100
form nginx website fastcgi_next_upstream Notes
This directive defines in which cases request will be passed to the next serve
So After I used this method There have not been 502 and 504
http://www.tlfcd.com you can call me help qq:858099909
The demo website http://www.qinday.com http://www.hichou.com was this method
Finally, I wish you success Thank you for reading my article
All relative paths in this config are relative to php's install prefix
```