VPS侦探论坛

 找回密码
 注册
查看: 12962|回复: 15

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

[复制链接]
发表于 2012-5-8 08:40:29 | 显示全部楼层 |阅读模式

服务器环境
[root@localhost ~]# 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报错
[root@localhost ~]# 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/

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2012-5-8 09:33:48 | 显示全部楼层

我也有跟你一样过



后来发现问题原来是centOS的版本太低了。我之前用的5.3的不行。换成5.7的就可以了。
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2012-5-8 09:49:07 | 显示全部楼层

回复 2# 的帖子


可是我不是centOS的版本啊,
版本提示:是rhel,Description:    Red Hat Enterprise Linux Server release 5.5 (Tikanga)
不是centos啊,怎么办?
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2012-5-8 09:52:17 | 显示全部楼层



而且我是vps,怎么办?
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2012-5-8 10:04:24 | 显示全部楼层

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

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

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

 楼主| 发表于 2012-5-8 10:37:09 | 显示全部楼层

啊,惨了,我刚刚运行了 yum clean all ,还有救吗?
 楼主| 发表于 2012-5-8 10:40:40 | 显示全部楼层

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

然后使用军哥的方法,没有package
[root@localhost ~]# 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都是自己装的
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2012-5-8 10:41:55 | 显示全部楼层

This system is not registered with RHN.
军哥,这个意思是不是系统没有注册?急啊!!
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 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这个弄一下。

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

发表于 2012-5-8 11:51:51 | 显示全部楼层

军哥哥你QQ的多少?




为什么我那个pureftp还是那样。可以登入但还是不能上传下载文件。第一次碰到这个问题。悲剧啊
 楼主| 发表于 2012-5-8 12:35:04 | 显示全部楼层

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

[root@localhost ~]# wget http://mirrors.kernel.org/centos ... 5.centos.noarch.rpm
--2012-05-08 12:26:43--  http://mirrors.kernel.org/centos ... 5.centos.noarch.rpm
正在解析主机 mirrors.kernel.org... wget http://mirrors.kernel.org/centos ... i386.rpm149.20.4.71
Connecting to mirrors.kernel.org|149.20.4.71|:80... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:1034902 (1011K) [application/x-rpm]
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 [1034902/1034902]

[root@localhost ~]# wget http://mirrors.kernel.org/centos ... 5.centos.noarch.rpm
--2012-05-08 12:26:58--  http://mirrors.kernel.org/centos ... 5.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) [application/x-rpm]
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 [21033/21033]

[root@localhost ~]# wget http://mirrors.kernel.org/centos ... el5.centos.i386.rpm
--2012-05-08 12:27:44--  http://mirrors.kernel.org/centos ... 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) [application/x-rpm]
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 [26053/26053]

[root@localhost ~]# rpm -qa|grep yum|xargs rpm -e --nodeps
[root@localhost ~]# rpm -ivh yum-*
warning: yum-3.2.22-39.el5.centos.noarch.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
Preparing...                ########################################### [100%]
   1:yum-metadata-parser    ########################################### [ 33%]
   2:yum-fastestmirror      ########################################### [ 67%]
   3:yum                    ########################################### [100%]
[root@localhost ~]# cat >/etc/yum.repos.d/CentOS-Base.repo<<eof
> [base]
> 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
> [update]
> 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
> [addons]
> 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
> [extras]
> name=CentOS-5 - Extras
> baseurl=http://mirrors.kernel.org/centos/5/extras/$basearch/
[contrib]
name=CentOS-5 - Contrib
> gpgcheck=1
> gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
#packages in testing
[testing]
name=CentOS-5 - Testing
baseurl=http://mirrors.kernel.org/centos/5/testing/$basearch/
>
> #additional packages that extend functionality of existing packages
> [centosplus]
> 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
> [contrib]
> 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
> [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
[root@localhost ~]# 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: [Errno 14] 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
[root@localhost ~]#  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: [Errno 14] 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
[root@localhost ~]#
发表于 2012-5-8 14:14:46 | 显示全部楼层

原来的那个文章里的/etc/yum.repos.d/CentOS-Base.repo 有点问题,已经更新,重新再更新一般/etc/yum.repos.d/CentOS-Base.repo 这个文件就行了
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2012-5-8 14:15:46 | 显示全部楼层

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

[root@localhost ~]# 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
[root@localhost ~]#  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/N]: 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/N]: 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!
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2012-5-8 14:17:56 | 显示全部楼层

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

谢谢谢谢谢谢谢谢老大!

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

 楼主| 发表于 2012-5-8 14:27:45 | 显示全部楼层

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

[root@localhost ~]# lnmp restart
-bash: lnmp: command not found
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-9-22 23:26 , Processed in 0.031880 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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