bigcat2005 发表于 2012-5-8 08:40:29

lnmp一键后,除了首页html,php的一律502错误,实在没办法了,先谢过!

服务器环境
# lsb_release -a
LSB Version:    :core-3.1-ia32:core-3.1-noarch:graphics-3.1-ia32:graphics-3.1-noarch
Distributor ID: RedHatEnterpriseServer
Description:    Red Hat Enterprise Linux Server release 5.5 (Tikanga)
Release:      5.5
Codename:       Tikanga


部分安装日志,附件中有完整日志

For more information please visit http://www.lnmp.org/
lnmp status manage: /root/lnmp {start|stop|reload|restart|kill|status}
default mysql root password:密码
phpinfo : http://zyl.zgsj.com/phpinfo.php
phpMyAdmin : http://zyl.zgsj.com/phpmyadmin/
Prober : http://zyl.zgsj.com/p.php
Add VirtualHost : /root/vhost.sh
The path of some dirs:
mysql dir:   /usr/local/mysql
php dir:   /usr/local/php
nginx dir:   /usr/local/nginx
web dir :   /home/wwwroot
=========================================================================
=========================================================================
Manager for LNMP V0.9,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}
=========================================================================
Nginx is runing!
php-fpm is stop!
MySQL running (22665)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State      
tcp      0      0 0.0.0.0:3306                0.0.0.0:*                   LISTEN      
tcp      0      0 0.0.0.0:1002                0.0.0.0:*                   LISTEN      
tcp      0      0 0.0.0.0:111               0.0.0.0:*                   LISTEN      
tcp      0      0 0.0.0.0:80                  0.0.0.0:*                   LISTEN      
tcp      0      0 127.0.0.1:631               0.0.0.0:*                   LISTEN      
tcp      0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN      
tcp      0      0 :::22                     :::*                        LISTEN      


重启php-fpm报错
# service php-fpm restart
Shutting down php_fpm warning, no pid file found - php-fpm is not running ?
Starting php_fpm /etc/init.d/php-fpm: line 61: /usr/local/php/bin/php-cgi: 没有那个文件或目录
failed

实在没办法了,下面是vps地址,除了首页html,php的一律502错误,再搞不好要被骂了,先谢过!
http://27.54.254.101/

fly785041 发表于 2012-5-8 09:33:48

我也有跟你一样过

后来发现问题原来是centOS的版本太低了。我之前用的5.3的不行。换成5.7的就可以了。

bigcat2005 发表于 2012-5-8 09:49:07

回复 2# 的帖子

可是我不是centOS的版本啊,
版本提示:是rhel,Description:    Red Hat Enterprise Linux Server release 5.5 (Tikanga)
不是centos啊,怎么办?

bigcat2005 发表于 2012-5-8 09:52:17

而且我是vps,怎么办?

licess 发表于 2012-5-8 10:04:24

php没有安装成功
你这个是RHEL
configure: error: libjpeg.(a|so) not found.

libjpeg可能没安装上,yum install libjpeg libjpeg-devel 安装后再按脚本configure make 这些试试

bigcat2005 发表于 2012-5-8 10:37:09

啊,惨了,我刚刚运行了 yum clean all ,还有救吗?

bigcat2005 发表于 2012-5-8 10:40:40

用了下面这个命令
# yum makecache
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
Metadata Cache Created

然后使用军哥的方法,没有package
# yum install libjpeg libjpeg-devel
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
No package libjpeg-devel available.
Nothing to do

我这vps咋要什么没什么,连screen都是自己装的

bigcat2005 发表于 2012-5-8 10:41:55

This system is not registered with RHN.
军哥,这个意思是不是系统没有注册?急啊!!

licess 发表于 2012-5-8 11:24:58

yum clean all 是清空缓存
This system is not registered with RHN.
你的是RHEL的非付费用户无法使用yum,按 https://bbs.vpser.net/thread-7553-1-1.html这个弄一下。

fly785041 发表于 2012-5-8 11:51:51

军哥哥你QQ的多少?

为什么我那个pureftp还是那样。可以登入但还是不能上传下载文件。第一次碰到这个问题。悲剧啊

bigcat2005 发表于 2012-5-8 12:35:04

军哥,按照你的方法做了一遍,好像有个xml跟新找不到,失败了,显示404,我看了下,路劲中少了个i386
流程如下:

# wget http://mirrors.kernel.org/centos/5/os/i386/CentOS/yum-3.2.22-39.el5.centos.noarch.rpm
--2012-05-08 12:26:43--http://mirrors.kernel.org/centos/5/os/i386/CentOS/yum-3.2.22-39.el5.centos.noarch.rpm
正在解析主机 mirrors.kernel.org... wget http://mirrors.kernel.org/centos/5/os/i386/CentOS/yum-metadata-parser-1.1.2-3.el5.centos.i386.rpm149.20.4.71
Connecting to mirrors.kernel.org|149.20.4.71|:80... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:1034902 (1011K)
Saving to: `yum-3.2.22-39.el5.centos.noarch.rpm'

100%[==========================================>] 1,034,902    247K/s   in 4.5s

2012-05-08 12:26:58 (223 KB/s) - `yum-3.2.22-39.el5.centos.noarch.rpm' saved

# wget http://mirrors.kernel.org/centos/5/os/i386/CentOS/yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm
--2012-05-08 12:26:58--http://mirrors.kernel.org/centos/5/os/i386/CentOS/yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm
正在解析主机 mirrors.kernel.org... 149.20.4.71
Connecting to mirrors.kernel.org|149.20.4.71|:80... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:21033 (21K)
Saving to: `yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm'

100%[==========================================>] 21,033      66.5K/s   in 0.3s

2012-05-08 12:27:09 (66.5 KB/s) - `yum-fastestmirror-1.1.16-21.el5.centos.noarch.rpm' saved

# wget http://mirrors.kernel.org/centos/5/os/i386/CentOS/yum-metadata-parser-1.1.2-3.el5.centos.i386.rpm
--2012-05-08 12:27:44--http://mirrors.kernel.org/centos/5/os/i386/CentOS/yum-metadata-parser-1.1.2-3.el5.centos.i386.rpm
正在解析主机 mirrors.kernel.org... 149.20.4.71
Connecting to mirrors.kernel.org|149.20.4.71|:80... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:26053 (25K)
Saving to: `yum-metadata-parser-1.1.2-3.el5.centos.i386.rpm'

100%[==========================================>] 26,053      78.7K/s   in 0.3s

2012-05-08 12:27:55 (78.7 KB/s) - `yum-metadata-parser-1.1.2-3.el5.centos.i386.rpm' saved

# rpm -qa|grep yum|xargs rpm -e --nodeps
# rpm -ivh yum-*
warning: yum-3.2.22-39.el5.centos.noarch.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
Preparing...                ###########################################
   1:yum-metadata-parser    ########################################### [ 33%]
   2:yum-fastestmirror      ########################################### [ 67%]
   3:yum                  ###########################################
# cat >/etc/yum.repos.d/CentOS-Base.repo<<eof
>
> name=CentOS-5 - Base
> baseurl=http://mirrors.kernel.org/centos/5/os/$basearch/
> gpgcheck=1
> gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
>
> #released updates
>
> name=CentOS-5 - Updates
> baseurl=http://mirrors.kernel.org/centos/5/updates/$basearch/
> gpgcheck=1
> gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
>
> #packages used/produced in the build but not released
>
> name=CentOS-5 - Addons
> baseurl=http://mirrors.kernel.org/centos/5/addons/$basearch/
> gpgcheck=1
> gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
> #additional packages that may be useful
>
> name=CentOS-5 - Extras
> baseurl=http://mirrors.kernel.org/centos/5/extras/$basearch/

name=CentOS-5 - Contrib
> gpgcheck=1
> gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
#packages in testing

name=CentOS-5 - Testing
baseurl=http://mirrors.kernel.org/centos/5/testing/$basearch/
>
> #additional packages that extend functionality of existing packages
>
> name=CentOS-5 - Plus
> baseurl=http://mirrors.kernel.org/centos/5/centosplus/$basearch/
> gpgcheck=1
> enabled=0
> gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
>
> #contrib - packages by Centos Users
>
> name=CentOS-5 - Contrib
> baseurl=http://mirrors.kernel.org/centos/5/contrib/$basearch/
> gpgcheck=1
> enabled=0
> gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
>
> #packages in testing
>
> name=CentOS-5 - Testing
> baseurl=http://mirrors.kernel.org/centos/5/testing/$basearch/
> gpgcheck=1
> enabled=0
> gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
> eof
# yum makecache
Loaded plugins: fastestmirror
Repository base is listed more than once in the configuration
Repository update is listed more than once in the configuration
Loading mirror speeds from cached hostfile
http://mirrors.kernel.org/centos/5/addons//repodata/repomd.xml: HTTP Error 404: Not Found
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: addons. Please verify its path and try again
#yum install libjpeg libjpeg-devel
Loaded plugins: fastestmirror
Repository base is listed more than once in the configuration
Repository update is listed more than once in the configuration
Loading mirror speeds from cached hostfile
http://mirrors.kernel.org/centos/5/addons//repodata/repomd.xml: HTTP Error 404: Not Found
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: addons. Please verify its path and try again
#

licess 发表于 2012-5-8 14:14:46

原来的那个文章里的/etc/yum.repos.d/CentOS-Base.repo 有点问题,已经更新,重新再更新一般/etc/yum.repos.d/CentOS-Base.repo 这个文件就行了

bigcat2005 发表于 2012-5-8 14:15:46

jpeg组件装好啦,在更新目录里加了i386 ,离目标又进一步,谢谢军哥,不过还没到终点

# yum makecache
Loaded plugins: fastestmirror
Repository base is listed more than once in the configuration
Repository update is listed more than once in the configuration
Determining fastest mirrors
addons                                                   | 1.9 kB   00:00
addons/filelists_db                                    |564 B   00:00
addons/other_db                                          |552 B   00:00
addons/primary_db                                        | 1.1 kB   00:00
base                                                   | 1.1 kB   00:00
base/filelists                                           | 3.0 MB   00:10
base/other                                             |10 MB   00:21
base/group                                             | 1.1 MB   00:01
base/primary                                             | 967 kB   00:01
extras                                                   | 2.1 kB   00:00
extras/filelists_db                                    | 213 kB   00:00
extras/other_db                                          | 419 kB   00:00
extras/group                                             | 9.7 kB   00:00
extras/primary_db                                        | 169 kB   00:00
update                                                   | 1.9 kB   00:00
update/filelists_db                                    | 1.1 MB   00:02
update/other_db                                          | 5.1 MB   00:16
update/primary_db                                        | 295 kB   00:01
base                                                                  2725/2725
base                                                                  2725/2725
base                                                                  2725/2725
Metadata Cache Created
#yum install libjpeg libjpeg-devel
Loaded plugins: fastestmirror
Repository base is listed more than once in the configuration
Repository update is listed more than once in the configuration
Loading mirror speeds from cached hostfile
Setting up Install Process
Package libjpeg-6b-37.i386 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package libjpeg-devel.i386 0:6b-37 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package               Arch         Version            Repository      Size
================================================================================
Installing:
libjpeg-devel         i386         6b-37            base         105 k

Transaction Summary
================================================================================
Install       1 Package(s)
Upgrade       0 Package(s)

Total download size: 105 k
Is this ok : y
Downloading Packages:
libjpeg-devel-6b-37.i386.rpm                           | 105 kB   00:01
warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID e8562897
base/gpgkey                                              | 1.5 kB   00:00
Importing GPG key 0xE8562897 "CentOS-5 Key (CentOS 5 Official Signing Key) <centos-5-key@centos.org>" from http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
Is this ok : y
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing   : libjpeg-devel                                          1/1

Installed:
libjpeg-devel.i386 0:6b-37

Complete!

bigcat2005 发表于 2012-5-8 14:17:56

刚看到回复,不过没有更新你最新的CentOS-Base.repo,如果还有问题再请教你!

谢谢谢谢谢谢谢谢老大!

bigcat2005 发表于 2012-5-8 14:27:45

为什么 lnmp restart 提示找不到命令?

# lnmp restart
-bash: lnmp: command not found
页: [1] 2
查看完整版本: lnmp一键后,除了首页html,php的一律502错误,实在没办法了,先谢过!