52AV手機A片王|52AV.one

 找回密碼
 立即註冊
查看: 1993|回復: 0

[網頁伺服器] Nginx + PHP-Fpm

[複製鏈接]
發表於 2015-1-11 00:18:11 | 顯示全部樓層 |閱讀模式
tid=211&《1》安裝nginx
1 V' z2 l9 R! e2 e2 |3 E- g3 _4 I yum install nginx& Q5 u0 P8 H- B; A  [: I  n( y3 ?
..........% y3 f) n* c% K5 J; }: G* R! l
Running Transaction& T/ x5 Y; w% ]: N6 i9 M/ t
  Installing : GeoIP-1.5.1-5.el6.x86_64                                               1/3( m+ t6 l# H* S0 D. m3 g% D
  Installing : nginx-filesystem-1.0.15-11.el6.noarch                                  2/3& T5 b9 {) p! T, S% F5 }; T& y
  Installing : nginx-1.0.15-11.el6.x86_64                                             3/3" o  U# `6 f4 ^9 B" V' [$ ~
  Verifying  : nginx-filesystem-1.0.15-11.el6.noarch                                  1/3
  V6 ^1 X  ~9 I6 `  Verifying  : nginx-1.0.15-11.el6.x86_64                                             2/3
8 S' R' |/ `  N1 _  Verifying  : GeoIP-1.5.1-5.el6.x86_64                                               3/37 a# r: B' o) H# c* x7 h
4 o) G+ V' D. Z: K6 s, e, @
Installed:. W) A, ], _" D5 Y8 y4 ~$ |! l
  nginx.x86_64 0:1.0.15-11.el63 K0 k/ [- r8 T' L$ `1 p
Dependency Installed:
  j( q* I0 e" x3 I  GeoIP.x86_64 0:1.5.1-5.el6            nginx-filesystem.noarch 0:1.0.15-11.el6
5 L$ H* n1 a9 R* h" G' A/ S  H4 tComplete!- A% G/ K0 R8 K& p- c% r, H

" x3 P  S+ l2 A  C4 h設定/etc/nginx/nginx.conf
5 A' m" H* H; i8 M8 k4 h
. A9 a% n1 K9 \+ D' C
《2》安裝php-fpm: 參考http://www.av4u.info/thread-201-1-1.html' e+ u* b3 Y, e2 ?6 m( r- p, V% |
設定 /etc/php-fpm.d/www.conf  user and group  = nginx (default  apache)  ==> still error. [$ N/ s* Z  @
, A( I. I1 `% L1 O1 t
啟動php-fpm service php-fpm start+ N. \2 s) u( B( U8 a& G
啟動nginx      
service nginx start2 Y% ^5 Q& e" r  k1 w# U5 O% a
結果$ P. W6 O" P# W. u$ Q# v" X
出現error :nginx:/usr/sbin/nginx: error while loading shared libraries: libgd.so.2: cannot open shared object file: No such file or directory

" t) V1 e5 ^. |0 \0 F6 j% h解決
/ g- D9 A  d  j. ?( Q( Z; @先找libgd.so.2 在何處(locate libgd.so.2*)
結果在/usr/lib64/libgd.backup所以cp /usr/lib64/libgd.backup/libgd.so.2*  /usr/lib64- X6 m/ w$ O$ k3 d
再一次啟動nginx
service nginx start
2 }$ y1 Q! t+ `7 ^
結果nginx: [emerg] unknown directive "upload_progress" in /etc/nginx/nginx.conf:46, H& v; W4 m; |; |6 m
先查看nginx 的configure /usr/sbin/nginx -V9 E* {: T) H! L: \
nginx version: nginx/1.0.15, K2 P) G' \/ n: n1 T
built by gcc 4.4.7 20120313 (Red Hat 4.4.7-11) (GCC)
' n4 Q1 X. \; k, G7 G# ^6 ?TLS SNI support enabled
7 H( d7 Q+ z# m; V3 U
configure arguments: --prefix=/usr/share/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/lib/nginx/tmp/client_body --http-proxy-temp-path=/var/lib/nginx/tmp/proxy --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi --http-uwsgi-temp-path=/var/lib/nginx/tmp/uwsgi --http-scgi-temp-path=/var/lib/nginx/tmp/scgi --pid-path=/var/run/nginx.pid --lock-path=/var/lock/subsys/nginx --user=nginx --group=nginx --with-file-aio --with-ipv6 --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_xslt_module --with-http_image_filter_module --with-http_geoip_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_degradation_module --with-http_stub_status_module --with-http_perl_module --with-mail --with-mail_ssl_module --with-debug --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' --with-ld-opt=-Wl,-E6 s4 M5 s1 S& C

4 I$ R+ l( K5 a# g

, ?2 D$ {! _8 \+ V啟動nginx       service nginx start   
  H) u: \4 q: I% w7 G1 Terror : : V0 q5 [- O! d& t/ A
nginx: [emerg] open() "/etc/nginx/conf.d/db52av.52av.tv.conf" failed (13: Permission denied) in /etc/nginx/nginx.conf:40+ @! u, E/ }2 w# V
nginx: configuration file /etc/nginx/nginx.conf test failed9 s, w. y# P/ Y) H. Z
解決
將/etc/sysconfig/selinux 內的 enforced  設成 disabled    then   reboot    就可以了
5 d7 [) d, P/ U' V" U. SSELINUX =  enforcing    改成   disabled 1 ]' X4 e' n% T5 F; }

5 s% h' ^$ y- L% B! G' v0 N' \

0 U5 g8 o8 o' t8 ^: L( e; @: I3 u1 L9 l+ ^0 A
3 f( J  N5 R' F6 w. E/ ?1 X' R# v
回復

使用道具 舉報

您需要登錄後才可以回帖 登錄 | 立即註冊

本版積分規則



中文酷站排行榜

本區塊內容依據『電腦網路內容分級處理辦法』為限制級網站,限定年滿18歲以上或達當地國家法定年齡人士方可進入,且願接受本站各項條款,未滿18歲 謝絕進入瀏覽。為防範未滿18歲之未成年網友瀏覽網路上限制級內容的圖文資訊,建議您可進行網路內容分級組織ICRA分級服務的安裝與設定。 (為還給愛護 本站的網友一個純淨的論壇環境,本站設有管理員)

QQ|小黑屋|手機板| 52AV手機A片王

GMT+8, 2026-5-7 21:21 , Processed in 0.073219 second(s), 16 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回復 返回頂部 返回列表