一直都是用的apache,現在想弄nginx了。。性能高,穩定,爲什麼不試試呢
環境是apache換成nginx ,先把服務停了。。
現在nginx啊。。。
http://nginx.org/en/download.html
我的編譯參數
./configure
--prefix=/usr
--sbin-path=/usr/sbin/nginx
--conf-path=/etc/nginx/nginx.conf
--error-log-path=/var/log/nginx/error.log
--pid-path=/var/run/nginx/nginx.pid
--lock-path=/var/lock/nginx.lock
--user=nginx
--group=nginx
--with-http_ssl_module
--with-http_flv_module
--with-http_gzip_static_module
--http-log-path=/var/log/nginx/access.log
--http-client-body-temp-path=/var/tmp/nginx/client/
--http-proxy-temp-path=/var/tmp/nginx/proxy/
--http-fastcgi-temp-path=/var/tmp/nginx/fcgi/
make
make install
由於編譯時指定了默認用戶和組都爲 nginx,所以還要創建一下。
groupadd nginx
useradd -d /home/nginx -g nginx nginx
有關nginx的一個啓動腳本。。我的blog前幾天寫過。。傳送 http://blog.csdn.net/fbd2011/article/details/7292304
啓動試試,,看能不能正常啓動。。這裏也有個centos編譯nginx的文章,,http://www.centos.bz/2011/07/centos-compile-nginx-from-source/
前面我是看着的。。http://archive.raptium.net/2009/05/01/centos-nginx-php-config-howto/
啓動腳本按自己編譯的目錄 進行修改。。
加入開機啓動這類的。
2。下面開始編譯php 。nginx 要用到php-fpm 擴展。。。這個必須要裝
php編譯參數我以前都寫過。。。。
這時候你可能會遇到錯。。。
這些是說解決錯誤的
http://www.ixpub.net/thread-2749223-1-1.html
http://bbs.phpchina.com/thread-207724-1-1.html
在貼幾篇參考
http://archive.raptium.net/2009/05/01/centos-nginx-php-config-howto/
http://zhanglzh1.blog.163.com/blog/static/142266667201166113030486/
http://vv15.com/2010/12/centos-install-nginx-php-mysql/
http://www.centos.bz/2011/07/centos-compile-nginx-from-source/