wdcp采用RPM包安装,安装好以后启动httpd报错如下:
Stopping httpd: [FAILED]
Starting httpd: httpd: Syntax error on line 55 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]
报错提示无法加载库文件,首先查看/www/wdlinux/httpd-2.2.22/modules/目录,libphp5.so文件存在,find搜索libmhash.so.2文件,库文件不存在,应该是RPM包安装php的时候,相应的依赖扩展没有安装,于是准备手动安装mhash,结果yum报错:
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: ftp.cuhk.edu.hk
* extras: ftp.cuhk.edu.hk
* updates: ftp.cuhk.edu.hk
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.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: rpmforge. Please verify its path and try again
原来是yum源出现了问题,于是使用aliyun的yum源
#cd /etc/yum.repos.d/
#mv rpmforge.repo rpmforge.repo.bak
#vim aliyum.repo
添加如下几行,然后wq保存退出
[aliyun]
name=Centos epel
baseurl=http://mirrors.aliyun.com/epel/$releasever/$basearch/
gpgcheck=0
#yum install mhash mhash-devel -y
#/etc/init.d/httpd restart
此时重启httpd又报错:
Stopping httpd: [FAILED]
Starting httpd: httpd: Syntax error on line 55 of /www/wdlinux/httpd-2.2.22/conf/httpd.conf: Cannot load /www/wdlinux/httpd-2.2.22/modules/libphp5.so into server: libmcrypt.so.4: cannot open shared object file: No such file or directory
[FAILED]
提示找不到libmcrypt.so.4库文件,应该是wdcp安装的时候没有安装成功,手动安装。
#yum install mcrypt -y
#service httpd restart
[root@amd5.cn ~]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]