linux下wdcp中一个nginx 502 bad gateway问题解决

背景是我一个朋友是新网的销售,然后给客户卖了台vps,客户抱怨他的vps有问题

然后朋友让我帮他看看服务器是什么问题,启动启动service nginxd restart 报错,显示缺少2个文件,然后我在自己的服务器上面拷贝了2个文件给他,重启成功,网站也不再报502错误。下面是代码全纪录,然后有附图

login as: root
root@119.10.11.41's password:
Access denied
root@119.10.11.41's password:
Last login: Tue Jul 21 16:49:50 2015 from 59.173.251.234
[root@ZWCN2K--10744 ~]# dir
anaconda-ks.cfg lanmp_wdcp_ins.sh
install.log rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
install.log.syslog vmware-tools-distrib
lanmp_wdcp-2-5.el6.x86_64.rpm wdcp_v2.5.tar.gz
[root@ZWCN2K--10744 ~]# service nginx restart
nginx: δ±»Ê¶±ðµÄ·þÎñ
[root@ZWCN2K--10744 ~]# cd /www/wdlinux/
[root@ZWCN2K--10744 wdlinux]# dir
apache init.d nginx_php tmp wdphp
apache_php mysql nginx_php-5.2.17 tools Zend
apache_php-5.2.17 mysql-5.1.63 php wdapache
etc nginx pureftpd wdcp
httpd-2.2.22 nginx-1.0.15 pureftpd-1.0.35 wdcp_bk
[root@ZWCN2K--10744 wdlinux]# service nginxd restart
Í£Ö¹ nginx£º [È·¶¨]
Shutting down php_fpm warning, no pid file found - php-fpm is not running ?
ÕýÔÚÆô¶¯ nginx£º [È·¶¨]
Starting php_fpm /www/wdlinux/nginx_php-5.2.17/bin/php-cgi: error while loading shared libraries: libmhash.so.2: cannot open shared object file: No such file or directory
failed
[root@ZWCN2K--10744 wdlinux]# cd /usr/lib/
[root@ZWCN2K--10744 lib]# dir
anaconda-runtime jvm-exports libmysqlclient.so.16
bonobo jvm-private libmysqlclient.so.16.0.0
ConsoleKit libdbug.a libmysqld.a
cups libheap.a libmystrings.a
games libiconv.so libmysys.a
gcc libiconv.so.2 libvio.a
java libiconv.so.2.5.1 locale
java-1.3.1 libmyisam.a lsb
java-1.4.0 libmyisammrg.a plugin
java-1.4.1 libmysqlclient.a python2.6
java-1.4.2 libmysqlclient.la rpm
java-1.5.0 libmysqlclient_r.a sendmail
java-1.6.0 libmysqlclient_r.la sendmail.postfix
java-1.7.0 libmysqlclient_r.so sendmail.sendmail
java-ext libmysqlclient_r.so.16 vmware-tools
jvm libmysqlclient_r.so.16.0.0 yum-plugins
jvm-commmon libmysqlclient.so
[root@ZWCN2K--10744 lib]# cd /usr/local/lib
[root@ZWCN2K--10744 lib]# dir
[root@ZWCN2K--10744 lib]# vi /etc/ld.so.conf
[root@ZWCN2K--10744 lib]# cd /
[root@ZWCN2K--10744 /]# find -name 'libmhash.so'
[root@ZWCN2K--10744 /]# find -name 'libmhash.so.2'
[root@ZWCN2K--10744 /]# cd /usr/lib/
[root@ZWCN2K--10744 lib]# dir
anaconda-runtime jvm-exports libmysqlclient.so.16
bonobo jvm-private libmysqlclient.so.16.0.0
ConsoleKit libdbug.a libmysqld.a
cups libheap.a libmystrings.a
games libiconv.so libmysys.a
gcc libiconv.so.2 libvio.a
java libiconv.so.2.5.1 locale
java-1.3.1 libmyisam.a lsb
java-1.4.0 libmyisammrg.a plugin
java-1.4.1 libmysqlclient.a python2.6
java-1.4.2 libmysqlclient.la rpm
java-1.5.0 libmysqlclient_r.a sendmail
java-1.6.0 libmysqlclient_r.la sendmail.postfix
java-1.7.0 libmysqlclient_r.so sendmail.sendmail
java-ext libmysqlclient_r.so.16 vmware-tools
jvm libmysqlclient_r.so.16.0.0 yum-plugins
jvm-commmon libmysqlclient.so
[root@ZWCN2K--10744 lib]# uname -a
Linux ZWCN2K--10744 2.6.32-358.el6.x86_64 #1 SMP Fri Feb 22 00:31:26 UTC 2013 x8 6_64 x86_64 x86_64 GNU/Linux
[root@ZWCN2K--10744 lib]# find -name 'libmhash.so.2'
[root@ZWCN2K--10744 lib]# cd /
[root@ZWCN2K--10744 /]# find -name 'libmhash.so.2'
[root@ZWCN2K--10744 /]# cd /usr/lib/
[root@ZWCN2K--10744 lib]# dir
anaconda-runtime java-1.7.0 libmysqlclient.a libvio.a
bonobo java-ext libmysqlclient.la locale
ConsoleKit jvm libmysqlclient_r.a lsb
cups jvm-commmon libmysqlclient_r.la plugin
games jvm-exports libmysqlclient_r.so python2.6
gcc jvm-private libmysqlclient_r.so.16 rpm
java libdbug.a libmysqlclient_r.so.16.0.0 sendmail
java-1.3.1 libheap.a libmysqlclient.so sendmail.postfix
java-1.4.0 libiconv.so libmysqlclient.so.16 sendmail.sendmail
java-1.4.1 libiconv.so.2 libmysqlclient.so.16.0.0 vmware-tools
java-1.4.2 libiconv.so.2.5.1 libmysqld.a yum-plugins
java-1.5.0 libmyisam.a libmystrings.a
java-1.6.0 libmyisammrg.a libmysys.a
[root@ZWCN2K--10744 lib]# wget http://www.zjjbmw.com/libmhash.so.2
--2015-07-21 17:26:24-- http://www.zjjbmw.com/libmhash.so.2
ÕýÔÚ½âÎöÖ÷»ú www.zjjbmw.com... 218.240.43.99
ÕýÔÚÁ¬½Ó www.zjjbmw.com|218.240.43.99|:80... ÒÑÁ¬½Ó¡£
ÒÑ·¢³ö HTTP ÇëÇó£¬ÕýÔڵȴý»ØÓ¦... 200 OK
³¤¶È£º353123 (345K) [application/octet-stream]
ÕýÔÚ±£´æÖÁ: ¡°libmhash.so.2¡±

100%[==================================================>] 353,123 345K/s in 1.0s

2015-07-21 17:26:30 (345 KB/s) - Òѱ£´æ ¡°libmhash.so.2¡± [353123/353123])

[root@ZWCN2K--10744 lib]# find -name 'libmhash.so.2'
./libmhash.so.2
[root@ZWCN2K--10744 lib]# service nginxd restart
Í£Ö¹ nginx£º [È·¶¨]
Shutting down php_fpm warning, no pid file found - php-fpm is not running ?
ÕýÔÚÆô¶¯ nginx£º [È·¶¨]
Starting php_fpm /www/wdlinux/nginx_php-5.2.17/bin/php-cgi: error while loading shared libraries: libmhash.so.2: cannot open shared object file: No such file or directory
failed
[root@ZWCN2K--10744 lib]# cat /etc/ld.so.conf
include ld.so.conf.d/*.conf
[root@ZWCN2K--10744 lib]# echo "/usr/lib" >> /etc/ld.so.conf
[root@ZWCN2K--10744 lib]# ldconfig
[root@ZWCN2K--10744 lib]# service nginxd restart
Í£Ö¹ nginx£º [È·¶¨]
Shutting down php_fpm warning, no pid file found - php-fpm is not running ?
ÕýÔÚÆô¶¯ nginx£º [È·¶¨]
Starting php_fpm /www/wdlinux/nginx_php-5.2.17/bin/php-cgi: error while loading shared libraries: libmcrypt.so.4: cannot open shared object file: No such file or directory
failed
[root@ZWCN2K--10744 lib]# cd /usr/lib/
[root@ZWCN2K--10744 lib]# wget http://www.zjjbmw.com/libmcrypt.so.4
--2015-07-21 17:32:52-- http://www.zjjbmw.com/libmcrypt.so.4
ÕýÔÚ½âÎöÖ÷»ú www.zjjbmw.com... 218.240.43.99
ÕýÔÚÁ¬½Ó www.zjjbmw.com|218.240.43.99|:80... ÒÑÁ¬½Ó¡£
ÒÑ·¢³ö HTTP ÇëÇó£¬ÕýÔڵȴý»ØÓ¦... 200 OK
³¤¶È£º552366 (539K) [application/octet-stream]
ÕýÔÚ±£´æÖÁ: ¡°libmcrypt.so.4¡±

100%[==================================================>] 552,366 565K/s in 1.0s

2015-07-21 17:32:59 (565 KB/s) - Òѱ£´æ ¡°libmcrypt.so.4¡± [552366/552366])

[root@ZWCN2K--10744 lib]# service nginxd restart
Í£Ö¹ nginx£º [È·¶¨]
Shutting down php_fpm warning, no pid file found - php-fpm is not running ?
ÕýÔÚÆô¶¯ nginx£º [È·¶¨]
Starting php_fpm /www/wdlinux/nginx_php-5.2.17/bin/php-cgi: error while loading shared libraries: libmcrypt.so.4: cannot open shared object file: No such file or directory
failed
[root@ZWCN2K--10744 lib]# cat /etc/ld.so.conf
include ld.so.conf.d/*.conf
/usr/lib
[root@ZWCN2K--10744 lib]# ldconfig
[root@ZWCN2K--10744 lib]# cat /etc/ld.so.conf
include ld.so.conf.d/*.conf
/usr/lib
[root@ZWCN2K--10744 lib]# service nginxd restart
Í£Ö¹ nginx£º [È·¶¨]
Shutting down php_fpm warning, no pid file found - php-fpm is not running ?
ÕýÔÚÆô¶¯ nginx£º [È·¶¨]
Starting php_fpm . done
[root@ZWCN2K--10744 lib]#

 

posted @ 2015-07-21 18:05  liugx  阅读(3867)  评论(0编辑  收藏  举报