今天第一時間試了一下老大的這個系統(tǒng) 。 很不錯。很給力 。。馬上到 我buyvm 的vps 上面試了
安裝很快 因為都是rpm安裝的。。因為openvps 還是有很多限制
爆這個錯誤
502 bad gateway 看了一下 是php-fpm沒起來
[root@yuefuzhuji init.d]# ./php-fpm start Starting php_fpm eAccelerator: Could not allocate 67108864 bytes, the maximum size the kernel allows is 33554432 bytes. Lower the amount of memory request or increase the limit in /proc/sys/kernel/shmmax. PHP Warning: [eAccelerator] Can not create shared memory area in Unknown on line 0 PHP Fatal error: Unable to start eAccelerator module in Unknown on line 0 failed
[root@yuefuzhuji init.d]# echo 67108864 > /proc/sys/kernel/shmmax 這樣還是沒解決問題
[root@yuefuzhuji init.d]# ./php-fpm Usage: ./php-fpm {start|stop|quit|restart|reload|logrotate}
[root@yuefuzhuji init.d]# ./php-fpm start Starting php_fpm eAccelerator: Could not allocate 67108864 bytes, the maximum size the kernel allows is 33554432 bytes. Lower the amount of memory request or increase the limit in /proc/sys/kernel/shmmax. PHP Warning: [eAccelerator] Can not create shared memory area in Unknown on line 0 PHP Fatal error: Unable to start eAccelerator module in Unknown on line 0 failed
后來修改php.ini文件 注釋全部 eaccelerator 不要他了。 我也試過修改他的eaccelerator.shm_size="10" 大少 還是不行。
有好的方法大家討論把
這個應該是和openvz本身限制有關,我在512內存的虛擬機上,也是這樣這樣的錯誤,后
echo 67108864 > /proc/sys/kernel/shmmax
就正常了,可保存重新生效,加入到/etc/sysctl.conf中
kernel.shmmax = 67108864
用這個試試
echo 10240000 > /proc/sys/kernel/shmmax
?502 ?bad ?gateway
502 bad gateway 是php5-fpm沒運行成功,原因可能為eaccelerator共享內存受shammx共享內存限制太小
更改設置:
1、 sudo nano /proc/sys/kernel/shmmax
#kernel.domainname = example.com (添加下面一行)
kernel.shmmax = 4294967295
3、sudo nano /etc/php5/fpm/php.ini
eaccelerator.shm_size="128" (一開始我設置的是16)
最后重新啟動下php5-fpm 、 nginx即可
sudo service php5-fpm restart
sudo service nginx restart