참고
http://wiki.nginx.org/Pitfalls ( 서버설정 )
http://blog.haohtml.com/archives/5774 (인스톨 )
http://timwhitlock.info/blog/2010/08/17/php-fpm-5-3-3-under-nginx/ (설정 인스톨)
http://blog.sor.co.kr/32 (한글 인스톨.. )
http://daemoncoder.com/install/nginx-and-php-fpm-on-fedora-13 ( 이 주소 내용으로 설치했음)
nginx + php-fpm on fedora 13
Tue, 01/11/2011 - 23:54 — daemoncoder- Download php source from http://php.net/downloads.php and unpack it.
$ tar -xvjf php-5.3.5.tar.bz2
$ cd php-5.3.5
- Install autoconf 2.13, libxml2-devel and nginx and run the following commands
$ sudo yum install autoconf213 libxml2-devel nginx
$ export PHP_AUTOCONF=autoconf-2.13
$ export PHP_AUTOHEADER=autoheader-2.13
- Run the following commands
$ svn co http://svn.php.net/repository/php/php-src/trunk/sapi/fpm sapi/fpm
$ rm ./configure $ ./buildconf --force
$ ./configure --enable-fpm
$ make
$ sudo make install
- Link the php-fpm script to /usr/bin for easy access and configure php-fpm
$ sudo ln -s /usr/local/sbin/php-fpm /usr/bin/
$ sudo cp /usr/local/etc/php-fpm.conf.default /usr/local/etc/php-fpm.conf
$ sudo vi /usr/local/etc/php-fpm.conf
- Configure nginx
$ sudo vi /etc/nginx/nginx.conf
- So it'll now look like this:
location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html/$fastcgi_script_name;
include fastcgi_params; }
- Now start php-fpm and nginx
$ sudo php-fpm
$ sudo nginx
And you're all set!
(service nginx start)
/etc/init.d/nginx start
php-fpm
vi /etc/nginx/nginx.conf
PHP - configure & make, make install
./configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --target=x86_64-redhat-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --cache-file=../config.cache --with-libdir=lib64 --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --with-pic --with-bz2 --with-exec-dir=/usr/bin --with-freetype-dir=/usr --with-png-dir=/usr --with-xpm-dir=/usr --enable-gd-native-ttf --with-gettext --with-gmp --with-iconv --with-jpeg-dir=/usr --with-openssl --with-pcre-regex=/usr --with-zlib --with-layout=GNU --enable-exif --enable-ftp --enable-magic-quotes --enable-sockets --enable-sysvsem --enable-sysvshm --enable-sysvmsg --with-kerberos --enable-ucd-snmp-hack --enable-shmop --enable-calendar --with-libxml-dir=/usr --enable-xml --with-mysql --with-gd --enable-json --with-curl --with-mcrypt --enable-mbstring --enable-fpm --enable-soap --with-pear