CentOS 6.x 安装 WDCP v3 后前台无法访问

本贴最后更新于 2838 天前,其中的信息可能已经水流花落
##错误现象

CentOS6.8 安装 WDCP v3.0 后发现前台无法打开,后台 phpmyadmin 也无法访问。
检查后发现前台 Apache 启动失败。
手动重启 Apache 服务 service httpd restart 提示:

Starting httpd: httpd: Syntax error on line 54 of /www/wdlinux/httpd-2.2.22/conf/httpd.conf: Cannot load /www/wdlinux/httpd-2.2.22/modules/libphp5.so into server: libmhash.so.2: cannot open shared object file: No such file or directory
[FAILED]

##检查原因
估计是安装时某个依赖项没有安装成功,检查安装日志发现如下错误:

--2017-02-13 18:30:53-- http://dl.wdlinux.cn/rpms/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
Resolving dl.wdlinux.cn... 222.186.61.177
Connecting to dl.wdlinux.cn|222.186.61.177|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 12700 (12K) [text/plain]
Saving to: ?rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm?
100%[================================================================================>] 12,700 --.-K/s in 0.06s
2017-02-13 18:30:53 (204 KB/s) - ?rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm? saved [12700/12700]

warning: rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 6b8d79e6: NOKEY
Preparing... ########################################### [100%]
1:rpmforge-release ########################################### [100%]
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://apt.sw.be/redhat/el6/en/mirrors-rpmforge error was
14: PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"

  • base: mirrors.tuna.tsinghua.edu.cn
  • extras: mirrors.aliyun.com
  • updates: mirrors.aliyun.com
    http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
    Trying other mirror.
    To address this issue please refer to the below knowledge base article
    https://access.redhat.com/articles/1320623
    If above article doesn't help to resolve this issue please open a ticket with Red Hat Support.
    Error: Cannot retrieve repository metadata (repomd.xml) for repository: rpmforge. Please verify its path and try again

手动更新 yum update 也出现如下错误:

[root@cloud ~]# yum update
Loaded plugins: fastestmirror
Setting up Update Process
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://apt.sw.be/redhat/el6/en/mirrors-rpmforge error was
14: PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"

  • base: mirrors.tuna.tsinghua.edu.cn
  • extras: mirrors.aliyun.com
  • updates: mirrors.aliyun.com
    http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
    Trying other mirror.
    To address this issue please refer to the below knowledge base article

If above article doesn't help to resolve this issue please open a ticket with Red Hat Support.

Error: Cannot retrieve repository metadata (repomd.xml) for repository: rpmforge. Please verify its path and try again

内容都是 http://apt.sw.be/redhat/el6/en/mirrors-rpmforge 访问失败。

##解决方案
Google 后发现改地址已转移至 http://mirrorlist.repoforge.org/el6/mirrors-rpmforge [[1]][mirrors-rpmforge]
需要修改系统 yum 设置。
进入 /etc/yum.repos.d/ 目录

cd /etc/yum.repos.d/

修改 rpmforge.repo 文件

vi rpmforge.repo

文件原内容大概如下:

### Name: RPMforge RPM Repository for RHEL 6 - dag
### URL: http://rpmforge.net/
[rpmforge]
name = RHEL $releasever - RPMforge.net - dag
baseurl = http://apt.sw.be/redhat/el6/en/$basearch/rpmforge
mirrorlist = http://apt.sw.be/redhat/el6/en/mirrors-rpmforge
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge
enabled = 1
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1

[rpmforge-extras]
name = RHEL $releasever - RPMforge.net - extras
baseurl = http://apt.sw.be/redhat/el6/en/$basearch/extras
mirrorlist = http://apt.sw.be/redhat/el6/en/mirrors-rpmforge-extras
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge-extras
enabled = 0
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1

[rpmforge-testing]
name = RHEL $releasever - RPMforge.net - testing
baseurl = http://apt.sw.be/redhat/el6/en/$basearch/testing
mirrorlist = http://apt.sw.be/redhat/el6/en/mirrors-rpmforge-testing
#mirrorlist = file:///etc/yum.repos.d/mirrors-rpmforge-testing
enabled = 0
protect = 0
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag
gpgcheck = 1

文件中有三处需要修改:

mirrorlist = http://apt.sw.be/redhat/el6/en/mirrors-rpmforge-extras

修改为

mirrorlist = http://mirrorlist.repoforge.org/el6/mirrors-rpmforge

mirrorlist = http://apt.sw.be/redhat/el6/en/mirrors-rpmforge-extras

修改为

mirrorlist = http://mirrorlist.repoforge.org/el6/mirrors-rpmforge-extras

mirrorlist = http://apt.sw.be/redhat/el6/en/mirrors-rpmforge-testing

修改为

mirrorlist = http://mirrorlist.repoforge.org/el6/mirrors-rpmforge-testing

修改完成后按 Esc 然后保存退出 :wq
再次 yum update 即可成功。
由于之前 WDCP 安装过程中出错,所以有些组件没有安装成功,根据错误提示找到安装脚本中的相关内容如下:

if [ $v1 == 0 ];then
	RF="lanmp_wdcp-2-5.$arch.rpm";
elif [ $v2 == 0 ];then
	RF="lanmp_wdcp-2-5.el6.$arch.rpm";
	if [ $arch == "x86_64" ];then
		wget -c http://dl.wdlinux.cn/rpms/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
		rpm -ivh rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm 
	else
		wget -c http://dl.wdlinux.cn/rpms/rpmforge-release-0.5.2-2.el6.rf.i686.rpm
		rpm -ivh rpmforge-release-0.5.2-2.el6.rf.i686.rpm 
	fi
	yum install -y mhash-devel libmcrypt-devel
else
	echo
	echo "The current system does not support"
	echo
	exit

出错导致 mhash-devellibmcrypt-devel 没有安装,手动安装即可:

yum install -y mhash-devel libmcrypt-devel

安装成功后手动启动前台 Apache 服务:

[root@cloud ~]# service httpd start
Starting httpd: [  OK  ]

启动成功,前台与 phpmyadmin 都能正常打开了。
[mirrors-rpmforge]: Issue #378 · repoforge/rpms

相关帖子

欢迎来到这里!

我们正在构建一个小众社区,大家在这里相互信任,以平等 • 自由 • 奔放的价值观进行分享交流。最终,希望大家能够找到与自己志同道合的伙伴,共同成长。

注册 关于
请输入回帖内容 ...
  • alanfans

    厉害,wdcp 还没用过,有机会玩玩