今天第一時(shí)間試了一下老大的這個(gè)系統(tǒng) 。 很不錯(cuò)。很給力 。。馬上到 我buyvm 的vps 上面試了
安裝很快 因?yàn)槎际莚pm安裝的。。因?yàn)閛penvps 還是有很多限制
爆這個(gè)錯(cuò)誤
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" 大少 還是不行。
有好的方法大家討論把
這個(gè)應(yīng)該是和openvz本身限制有關(guān),我在512內(nèi)存的虛擬機(jī)上,也是這樣這樣的錯(cuò)誤,后
echo 67108864 > /proc/sys/kernel/shmmax
就正常了,可保存重新生效,加入到/etc/sysctl.conf中
kernel.shmmax = 67108864
用這個(gè)試試
echo 10240000 > /proc/sys/kernel/shmmax
能詳細(xì)點(diǎn)說說如何操作嗎 貌似遇到這個(gè)問題的人不少呢
?502 ?bad ?gateway
502 bad gateway 是php5-fpm沒運(yùn)行成功,原因可能為eaccelerator共享內(nèi)存受shammx共享內(nèi)存限制太小
更改設(shè)置:
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" (一開始我設(shè)置的是16)
最后重新啟動(dòng)下php5-fpm 、 nginx即可
sudo service php5-fpm restart
sudo service nginx restart