wdcp php-fpm,wdcp安装好后出现502 Bad Gateway的解决办法

解决方法:(2个文件我自己的百度云盘里面也有,在linux相关文件夹)

一、先查看一下php-fpm的启动情况:(到底是不是这个问题造成的)

[[email protected] ~]# find / -name php-fpm       #查看php-fpm

/www/wdlinux/init.d/php-fpm

/www/wdlinux/nginx_php-5.2.17/sbin/php-fpm

[[email protected] ~]# /www/wdlinux/init.d/php-fpm start  #启动一下php-fpm 下面报错了(缺少包mhash)

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

二、下载mhash包:

百度分享地址:http://pan.baidu.com/s/1bpkk3td    当然也可以去网上搜索下载!

下载完成后上传到服务器或虚拟机上,xftp服务器连接软件下载!

上传完成,回到终端上:

[[email protected] ~]# ls        #查看一下上传的包

mhash-0.9.9.9.tar.gz

[[email protected] ~]# tar xf mhash-0.9.9.9.tar.gz    #解压mhash-0.9.9.9.tar.gz包

[[email protected] ~]# cd mhash-0.9.9.9               #进入到解压后生成的mhash-0.9.9.9目录中去

[[email protected] mhash-0.9.9.9]# ./configure        #配置,检测安装环境

[[email protected] mhash-0.9.9.9]# make && make install         #编译 && 安装

[[email protected] mhash-0.9.9.9]# ln -s /usr/local/lib/libmhash.so.2 /usr/lib/libmhash.so.2

[[email protected] mhash-0.9.9.9]# vim /etc/ld.so.conf.d/mhash.conf #新建的一个配置文件,往里写入:/usr/lib/

#以上这里特别说明:输入以上命令后需要手动输入 /usr/lib/,写好后需要输入命令 :wq 才能出来,具体可以百度 vim命令

[[email protected] mhash-0.9.9.9]# cat /etc/ld.so.conf.d/mhash.conf     #里面就只有:/usr/lib/

/usr/lib/

[[email protected] mhash-0.9.9.9]# ldconfig

[[email protected] mhash-0.9.9.9]# /www/wdlinux/init.d/php-fpm start  #再启动一下php-fpm,还是报缺少包

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

三、下载mcrypt包:

百度分享地址:http://pan.baidu.com/s/1dEEYrkt    当然也可以去网上搜索下载!

下载完成后上传到服务器或虚拟机上,xftp服务器连接软件下载!

上传完成,回到终端上:

[[email protected] ~]# ls                           #查看一下上传的包

libmcrypt-2.5.8.tar.gz

[[email protected] ~]# tar xf libmcrypt-2.5.8.tar.gz       #解压libmcrypt-2.5.8.tar.gz包

[[email protected] ~]# cd libmcrypt-2.5.8                  #进入到解压后生成的libmcrypt-2.5.8目录中去

[[email protected] libmcrypt-2.5.8]# ./configure           #配置,检测安装环境

[[email protected] libmcrypt-2.5.8]# make && make install  #编译 && 安装

[[email protected] libmcrypt-2.5.8]# ln -s /usr/local/lib/libmcrypt.so.4 /usr/lib/libmcrypt.so.4

[[email protected] libmcrypt-2.5.8]# ln -s /usr/local/lib/libmcrypt.so.4 /usr/lib64/libmcrypt.so.4

[[email protected] libmcrypt-2.5.8]# /www/wdlinux/init.d/php-fpm start  #再次启动php-fpm,成功

Starting php_fpm  don

[[email protected] libmcrypt-2.5.8]# reboot   #重新开机

此文转自:http://www.youhutong.com/index.php/article/index/97.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值