• 973阅读
  • 1回复

在Linux系统中安装LNMP出现的错误总结

楼层直达
1.安装nginx软件出现的错误 h| wdx(4  
+ls`;f  
collect2: ld returned 1 exit status -PSgBH[  
make[1]: *** [objs/nginx] Error 1 kI@<H<  
make[1]: Leaving directory `/root/nginx-1.3.13' K#X/j'$^  
make: *** [build] Error 2 Y.Z:H!P);$  
[root@centos nginx-1.3.13]# b$#b+G{y  
{dpDQP +!  
解决方法: a4 N f\7  
Bh cp=#  
[root@centos nginx-1.3.13]# yum install pcre-* sr&W+4T  
[root@centos nginx-1.3.13]# ./configure --user=nginx --group=nginx \ ;xzaW4(3  
--with-pcre  --without-http_gzip_module \ VlA]A,P}i  
--without-http_rewrite_module --without-http_proxy_module \ Q#H"Se  
--without-http_upstream_ip_hash_module \ N\|z{vn  
--without-http_upstream_least_conn_module \ 1a{r1([)  
--without-http_upstream_keepalive_module \ I(pq3_9$  
--with-http_stub_status_module --with-http_flv_module \ 4^2>K C_  
--with-http_mp4_module *{fs{gFw9  
MAFdJ +n#  
测试: '0q$qN  
`<se&IZE  
[root@centos nginx-1.3.13]# &U]/SFY  
..................................... naf ~#==vc  
-e "s|%%ERROR_LOG_PATH%%|/usr/local/nginx/logs/error.log|" \ \'j(@b,  
< man/nginx.8 > objs/nginx.8 <nbk lo  
make[1]: Leaving directory `/root/nginx-1.3.13' 2Wluc37  
[root@centos nginx-1.3.13]# echo $?      --没有错误 >{Hg+/  
0 $]E+E.P  
[root@centos nginx-1.3.13]# Zhfg  
wX]$xZ!s  
96V8R<   
)f:i4.M  
2.安装php出现对mysql的错误 I{(!h90  
xE<H@@w  
./configure --prefix=/usr/local/php5.2.17   --enable-fpm  \ hp'oiR;~w  
--enable-dba --enable-ftp  --with-gd  \ Pqya%j  
--with-jpeg-dir --with-png-dir  --with-ldap  \ ?(=|!`IoO  
--enable-mbstring   --with-mysql=/usr/local/mysql5.0/  \ ?tjEXg>ny  
--with-mysqli=/usr/local/mysql5.0/bin/mysql_config   \ ]z^jz#>um&  
--with-ncurses  --with-pdo-mysql --with-snmp  --enable-zip %@a;q?/?Nd  
........................................................................ U U_0@V<  
checking whether to enable PDO support... yes % E1r{`p  
checking for PDO_DBLIB support via FreeTDS... no PkDt-]G.  
checking for Firebird support for PDO... no %;QK5L   
checking for MySQL support for PDO... yes tB>!1}v  
checking for mysql_config... not found |(%<FY$  
configure: error: Cannot find MySQL header files under    --错误结果 ek]JzD~w$  
1M??@@X  
解决方法(没有mysql头文件): Gxe)5,G  
!u]@Ru34  
[root@centos bin]# yum install mysql-devel    --安装这个软件就可以了  <Y"RsW9  
ZXQ5fBx  
n}Z%D-b$  
Lld45Bayb  
3.启动php-fpm服务失败 ;?HP/dZLz  
p)B /(%  
[root@centos php-5.2.17]# /usr/local/php5.2.17/sbin/php-fpm start h623)C;  
Starting php_fpm Error in argument 1, char 1: no argument for option - D@uVb4uK  
Usage: php-cgi [-q] [-h] [-s] [-v] [-i] [-f <file>] e: Sd#H!  
php-cgi <file> [args...] >A{Dpsi\  
-a               Run interactively B;[ .u>f  
-C               Do not chdir to the script's directory Ox J0. "  
-c <path>|<file> Look for php.ini file in this directory `$jun  
-n               No php.ini file will be used Zm*d)</>  
-d foo[=bar]     Define INI entry foo with value 'bar' _}p [(sTV  
-e               Generate extended information for debugger/profiler Mu/(Xp62  
-f <file>        Parse <file>.  Implies `-q' LI.WcI3uS  
-h               This help ktfm  
-i               PHP information 9+9g(6  
-l               Syntax check only (lint) &X:;B'   
-m               Show compiled in modules fD[O tc  
-q               Quiet-mode.  Suppress HTTP Header output. AjEy@ /  
-s               Display colour syntax highlighted source. 1LS1 ZY  
-v               Version number X[ Ufq^fyA  
-w               Display source with stripped comments and whitespace. PY_8*~Z  
-z <file>        Load Zend extension <file>. j=T8 b  
................................... failed P `@Rt  
[root@centos php-5.2.17]# z<9C-  
5QK%BiDlr  
解决方法: V/H+9+B7Im  
 ^cw9Yjh6  
只看该作者 安逸沙发  发表于: 2019-10-16
4.nginx和php-fpm服务启动正常,测试页打不开 Os+ =}  
VQ`O;n6/`  
[root@node2 conf]# netstat -anp |grep -E 'nginx|php-fpm' aS 2 Y6  
tcp        0      0 0.0.0.0:80                  0.0.0.0:*                   LISTEN      24328/nginx VNPd L  
tcp        0      0 127.0.0.1:9000              0.0.0.0:*                   LISTEN      23844/php-fpm.conf) r&;AG@N/  
unix  3      [ ]         STREAM     CONNECTED     2421896 24328/nginx h~t]WN  
unix  3      [ ]         STREAM     CONNECTED     2421895 24328/nginx y0^FTSQ|  
unix  3      [ ]         STREAM     CONNECTED     2420554 23844/php-fpm.conf) 7#QH4$@1P  
unix  3      [ ]         STREAM     CONNECTED     2420553 23844/php-fpm.conf) K`3cH6"L6  
[root@node2 conf]# rKxk?}  
1??RX}8[L+  
wKioL1Nfc92B2fVZAAJTu4RWgnI287.jpg ( d.i np(  
L2%P  
解决方法: DJ.Ct4  
 'M{_S  
[root@node2 sbin]# vim ../conf/nginx.conf 2UquN0  
fastcgi_param  SCRIPT_FILENAME   /scripts$fastcgi_script_name; B~IOM  
修改为 B#}RMFIj  
fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name; KN=Orx7Gy  
[root@node2 sbin]# killall nginx O<*iDd`(e  
[root@node2 sbin]# ./nginx o2L/8q.  
&nYmVwi?"Q  
wKiom1NfdH2A8onKAANqa8R_lMM740.jpg 4^5s\ f B  
6lPGop]js]  
9}-,dgAB  
q$K~BgFzpZ  
5.缺少依赖包(postgresql-devel) 03xQ%"TU<  
G2rvi=8=  
2013-11-24 15:08 S}+n\pyQ  
configure: error: Cannot find libpq-fe.h. Please specify correct PostgreSQL installation path "o1/gV  
XjC+kH  
解决方法 v1: 5 r  
Vj_ $%0  
yum install postgresql-devel #Rs7Ieu+  
+um; eL7  
6^ ~& sA  
FKaY w  
6.启动nginx报错( [emerg]: unknown directive "fastcgi_pass" in /opt/nginx/conf/nginx.conf:67) (Az^st/_  
tqHXzmsjW  
[root@localhost conf]# ../sbin/nginx 2oN lQiE_  
[emerg]: unknown directive "fastcgi_pass"in /opt/nginx/conf/nginx.conf:67) -Iq#h)Q*  
[root@localhost conf]# ,[A} 86  
2 `#|;x^<  
解决方法: X%;,r 2g  
<4Ak$ E %"  
在配置,安装nginx时不要加--without-http_fastcgi_module选项 5ewQjwW0  
Dgdh3q;  
VRD2e ,K  
 p.zU9rID  
7.启动nginx报错(nginx: [emerg] unknown directive "proxy_pass"in /usr/local/tong/nginx/ #ujcT%1G  
r8@:Ko= a  
conf/nginx.conf:55) 0O[q6!&]  
ZV&=B%J bs  
[root@localhost conf]# ../sbin/nginx @mW0EJ8bb  
nginx: [emerg] unknown directive "proxy_pass" in /usr/local/tong/nginx/conf/nginx.conf:55 SMnbI .0  
[root@localhost conf]# w^dB1Y7c(W  
HgbJsv$  
解决方法: _))_mxV{  
o6'`W2P  
在配置,安装nginx时不要加 --without-http_proxy_module选项 GX(p7ZgB2  
<TDgv%eg0  
9-9`;Z  
F)!B%4  
8.启动nginx报错(nginx: [emerg] unknown directive "gzip" in /usr/local/tong/nginx/conf/nginx.conf:33) Lk`0z  
@eR>?.:&  
[root@localhost conf]# ../sbin/nginx Ktg6*L/  
nginx: [emerg] unknown directive "gzip" in /usr/local/tong/nginx/conf/nginx.conf:33 RfFeAg,]/  
[root@localhost conf]# ."cC^og  
v"\Q/5p  
解决方法: Z-Zox-I1}-  
?;!l-Dy  
在配置,安装nginx时不要加--without-http_gzip_module选项 , En D3 |  
nTp?  
{ +MqXeq  
}D{y u+)  
转载于:https://blog.51cto.com/tongcheng/1371466
快速回复

限100 字节
安逸网提示:批量上传需要先选择文件,再选择上传
 
认证码:
上一个 下一个