1. [root@GFS_Server etc]# ulimit -SHn 65535                           
  2. [root@GFS_Server etc]# /data/webserver/php/sbin/php-fpm start 
  3. Starting php_fpm eAccelerator: shmmax should be at least 2MBPHP Warning: [eAccelerator] Can not create shared memory area in Unknown on line 0 
  4. PHP Fatal error: Unable to start eAccelerator module in Unknown on line 0 
  5. failed 
  6.  
  7. 解析: 
  8.  
  9. Starting php_fpm eAccelerator: shmmax should be at least 2MBPHP 
  10.  
  11. 看到了吗?要求是至少2MB以上 
  12.  
  13. [eAccelerator] Can not create shared memory area in Unknown on line 0 
  14. 其实就是共享池的不足原因导致 
  15.  
  16. PHP Fatal error: Unable to start eAccelerator module in Unknown on line 0 
  17. failed 
  18.  
  19. 解决办法: 
  20.  
  21. #echo "67108864" > /proc/sys/kernel/shmmax 
  22.  
  23. #cat /proc/sys/kernel/shmmax 
  24. 67108864 
  25.  
  26. 如果想让它每次开机都执行一样的,那么就改: 
  27.  
  28. #vi /etc/sysctl.conf   
  29.  
  30. 加下面一行: 
  31. kernel.shmmax = 67108864 
  32.  
  33. #/sbin/sysctl -p   (让其快速生效) 
  34.  
  35. 重启后: 
  36.  
  37. [root@GFS_Server etc]# ulimit -SHn 65535                           
  38. [root@GFS_Server etc]# /data/webserver/php/sbin/php-fpm start 
  39. Starting php_fpm done 
  40.     
  41. OK,Problem is solved! 
  42.  
  43. [root@GFS_Server etc]# ps aux |grep php-fcgi |wc -l 
  44. 302