duanji8615 2013-08-31 09:12
浏览 69

在PHP 5.4中设置PHP-FPM

My configuration is like this:
Centos 6.3
Plesk 11.5
PHP 5.4.18
Apache 2.2.15
PHP API: 20100412 Server API: CGI/FastCGI  

I use php as fastcgi. But I want to use APC or XCache. And it seems like FastCGI doesn't work well with opcache. So I read that it is better to use PHP-FPM. So how can I enable or install PHP-FPM ?

I read some tutorials and they offer to compile apache with fpm but it seems like a big risk for me. I'm not well-informed in servers.

I'm not sure whether I use mod_fastcgi or mod_fcgid. In my /etc/httpd/conf.d/ folder I have fcgid.conf file. So I think I use fcgid. Is it correct?

My Plesk has this setting: http://s11.postimg.org/pgqxwmmr7/fast.jpg
I'm curious if I install php-fpm can it brak my webserver or will any other problem occur ?

  • 写回答

1条回答 默认 最新

  • duanjie2940 2013-09-03 18:55
    关注

    When dealing with Apache and FPM you should be using mod_fastcgi and not mod_fcgid.

    I created this documentation a while ago and it seems to have helped quite a few people in the past, so perhaps it will also help you -> https://gist.github.com/diemuzi/3849349

    As for breaking the web server... That's an iffy question. Since FPM is a standalone and does not need Apache to run, it possible that your current Apache setup might need some additional "tweaking" to make it work the right way again. Furthermore, since you are running Plesk and as it does not currently offer FPM support, there is also a good chance that you could possibly break your Plesk setup.

    If you were not using some proprietary control panel software to manage your server and did things the old fashioned way by manually installing (or even using packages from your distro) then all of this would be a very simple solution for you.

    评论

报告相同问题?

悬赏问题

  • ¥15 华为ensp模拟器中S5700交换机在配置过程中老是反复重启
  • ¥15 java写代码遇到问题,求帮助
  • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?
  • ¥15 加热介质是液体,换热器壳侧导热系数和总的导热系数怎么算
  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计