nginx+php 安裝手冊

來源:互聯網
上載者:User

標籤:style   blog   http   tar   com   get   

1: wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.13.1.tar.gz

tar -zxvf libiconv-1.13.1.tar.gz
cd libiconv-1.13.1
./configure --prefix=/usr/local/libiconv
make
make install

2.擷取安裝檔案: http://www.php.net/downloads.php php-5.4.tar.gz(版本最新)
3 ./configure --prefix=/usr/local/php --disable-fileinfo --enable-maintainer-zts --with-
iconv=/usr/local/share/doc/libiconv --enable-fastcgi --enable-fpm --with-config-file-
path=/usr/local/php/etc --enable-force-cgi-redirect

4 make make install

 cp php-5.3.8/php.ini.dist /usr/local/php/lib/php.ini

(如果沒有php.ini.dist 則把php.ini-development php.ini-production中的任何一個重新命名為
php.ini.dist即可。)

  修改php.ini檔案 register_globals = On


cp php-fpm.conf.default php-fpm.conf
vim php-fpm.conf
去掉下列變數前面的注釋,以避免啟動php-fpm時報錯
pm.start_servers = 20
pm.min_spare_servers = 5
pm.max_spare_servers = 35
pm.max_requests = 500

裡面有個listen:9000預設

http://www.360doc.com/content/11/0719/12/5907545_134467868.shtml 【nginx安裝】

nginx.conf配置
#keepalive_timeout 0;
keepalive_timeout 65;
fastcgi_connect_timeout 600;
fastcgi_send_timeout 600;
fastcgi_read_timeout 600;
fastcgi_buffer_size 512k;
fastcgi_buffers 32 512k;
fastcgi_busy_buffers_size 1024k;
fastcgi_temp_file_write_size 1024k;


location ~ \.php$ {
root /usr/local/nginx/html;
fastcgi_pass 127.0.0.1:8088;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /usr/local/nginx/html$fastcgi_script_name;
include fastcgi_params;
}

 

 

 

http://www.jb51.net/article/42716.htm php-fpm重啟
http://blog.csdn.net/stuartjing/article/details/6909319 nginx重啟

 

 

報錯

configure error xml2-config not found. please check your libxml2 installation

http://hi.baidu.com/weiokx/item/9039e4db3ccbc8ed785daac5

 

 

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.