Example of installation of mod_performance + php-fpm. Uses https://github.com/bayrepo/mod_performance/raw/master/php-fpm/php-5.4.30-fpm-fcgid-suphp-cgi.patch patch applied to the php-fpm. Now in repository bayrepo php-fpm 5.4.30 patched is available for EL5, EL6, EL7. Assume that php-fpm is installed and configured on the server already.

  • wget -O /etc/yum.repos.d/bayrepo-common.repo http://repo.bayrepo.net/bayrepo-common.repo
  • yum install php54-fpm (and all needed php extensions)
  • yum install mod_performance04 (how to build and install mod_performance described here)
  • in the file /etc/httpd/conf.d/mod_performance.conf
    1. uncomment string LoadModule performance_module /opt/lexvit/mod_performance04/mod_performance.so
    2. comment out string #PerformanceScript .php
    3. uncomment or add strings if not exists:
PerformanceDB /opt/performance/perfdb
PerformanceSocket /opt/performance/perfsock
PerformanceSocketPermType 777 NOPID
  • add to all php-fpm hosts(pools) where monitoring needed /etc/php-fpm.d/.conf next feature:
 env[MODPERFORMANCE_SOCKET]=/opt/performance/perfsock
  • service httpd restart
  • service php-fpm restart