VPS侦探论坛

 找回密码
 注册
查看: 11212|回复: 11

CentOS 32 安装LNMP V0.7问题:安装后启动php-cgi , php失败

[复制链接]
发表于 2011-6-14 03:21:46 | 显示全部楼层 |阅读模式

System CentOS 32, 安装后不能启动php-cgi , php失败。
请指教,如何解决。
谢谢

[root@vps5996 lnmp0.7]# php -v
-bash: php: command not found


[root@vps5996 lnmp0.7]# /root/lnmp restart
=========================================================================
Manager for LNMP V0.7  ,  Written by Licess
=========================================================================
LNMP is a tool to auto-compile & install Nginx+MySQL+PHP on Linux
This script is a tool to Manage status of lnmp
For more information please visit http://www.lnmp.org

Usage: /root/lnmp {start|stop|reload|restart|kill|status}
=========================================================================
Stoping LNMP...
Nginx program is stop
PHP-FPM program is not runing!
Shutting down MySQL. SUCCESS!
MySQL program is stop
Starting LNMP...
Nginx start successfully!
/root/lnmp: line 46: /usr/local/php/sbin/php-fpm: No such file or directory
PHP-FPM start successfully!
Starting MySQL. SUCCESS!

[ 本帖最后由 try88 于 2011-6-23 00:32 编辑 ]
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2011-6-14 10:16:48 | 显示全部楼层


php-fpm 好像是没打上补丁。手动编译试试吧
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2011-6-14 16:32:30 | 显示全部楼层

如何手动编译 请问 谢谢
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2011-6-14 17:39:48 | 显示全部楼层

回复 3# 的帖子




看centos.sh 里php那部分
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2011-6-15 16:24:54 | 显示全部楼层

[root@vps5996 php-5.2.17]# ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-iconv-dir --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-discard-path --enable-magic-quotes --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fastcgi --enable-fpm --enable-force-cgi-redirect --enable-mbstring --with-mcrypt --enable-ftp --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --without-pear --with-gettext --with-mime-magic


....
....
checking for fabsf... yes
checking for floorf... yes
checking for jpeg_read_header in -ljpeg... yes
checking for png_write_image in -lpng... yes
If configure fails try --with-xpm-dir=<DIR>
checking for FT_New_Face in -lfreetype... no
configure: error: Problem with freetype.(a|so). Please check config.log for more information.
[root@vps5996 php-5.2.17]# make ZEND_EXTRA_LIBS='-liconv'
make: *** No targets specified and no makefile found.  Stop.


请教如何解决?

军哥运维代购:http://shop63846532.taobao.com/

 楼主| 发表于 2011-6-15 16:42:55 | 显示全部楼层

手动安装freetype后,出现configure: error: GD build test failed. Please check the config.log for details.
发表于 2011-6-15 16:51:49 | 显示全部楼层

回复 6# 的帖子


再手动安装gd,如果已经安装了gd,还是找不到,则吧--with-gd 改成 --with-gd=gd路径
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2011-6-15 17:05:10 | 显示全部楼层

使用--with-gd=gd
configure: error: Unable to find gd.h anywhere under gd
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2011-6-15 17:22:26 | 显示全部楼层


安装GD
tar zxvf gd-2.0.33.tar.gz
cd gd-2.0.33
./configure -prefix=/usr/local/gd -with-jpeg=/usr/local/jpeg6 -with-png -with-zlib -with-freetype
make
make install


checking for gdImageString16 in -lgd... no
checking for gdImagePaletteCopy in -lgd... no
checking for gdImageCreateFromPng in -lgd... no
checking for gdImageCreateFromGif in -lgd... no
checking for gdImageGif in -lgd... no
checking for gdImageWBMP in -lgd... no
checking for gdImageCreateFromJpeg in -lgd... no
checking for gdImageCreateFromXpm in -lgd... no
checking for gdImageCreateFromGd2 in -lgd... no
checking for gdImageCreateTrueColor in -lgd... no
checking for gdImageSetTile in -lgd... no
checking for gdImageEllipse in -lgd... no
checking for gdImageSetBrush in -lgd... no
checking for gdImageStringTTF in -lgd... no
checking for gdImageStringFT in -lgd... no
checking for gdImageStringFTEx in -lgd... no
checking for gdImageColorClosestHWB in -lgd... no
checking for gdImageColorResolve in -lgd... no
checking for gdImageGifCtx in -lgd... no
checking for gdCacheCreate in -lgd... no
checking for gdFontCacheShutdown in -lgd... no
checking for gdFreeFontCache in -lgd... no
checking for gdFontCacheMutexSetup in -lgd... no
checking for gdNewDynamicCtxEx in -lgd... no
checking for gdImageCreate in -lgd... no
configure: error: GD build test failed. Please check the config.log for details.
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2011-6-15 19:46:00 | 显示全部楼层



按他的提示具体信息看config.log
 楼主| 发表于 2011-6-15 20:58:47 | 显示全部楼层

全部重新编译,搞定了
谢谢
发表于 2011-6-15 23:21:05 | 显示全部楼层

原帖由 try88 于 2011-6-15 17:05 发表
使用--with-gd=gd
configure: error: Unable to find gd.h anywhere under gd


使用--with-gd=gd路径

汗一个。。。。
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-20 18:52 , Processed in 0.029440 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表