Сервис php-fpm не поддерживает chkconfig - PullRequest
0 голосов
/ 20 мая 2010

Все работает нормально.

Просто когда я chkconfig –add php-fpm

выдает ошибку Сервис php-fpm не поддерживает chkconfig

PHP-5.2.13 PHP-5.2.13-FPM-0.5.13.diff.gz

Ниже приведена конфигурация, которую я использую ./configure --enable-fastcgi --enable-fpm --build = x86_64-redhat-linux-gnu --host = x86_64-redhat-linux-gnu --target = x86_64-redhat-linux-gnu --program- префикс = --prefix = / usr --exec-prefix = / usr --bindir = / usr / bin --sbindir = / usr / sbin --sysconfdir = / etc --datadir = / usr / share --includedir = / usr / include --libdir = / usr / lib64 --libexecdir = / usr / libexec --localstatedir = / var --sharedstatedir = / usr / com --mandir = / usr / share / man --infodir = / usr / share / info --cache-file = .. / config.cache --with-libdir = lib64 --with-config-file-path = / etc --with-config-file-scan-dir = / etc / php.d --disable-debug --with-pic --disable-rpath --with-pear --with-bz2 --with-curl --with-exec-dir = / usr / bin --with-freetype -dir = / usr --with-png-dir = / usr --enable-gd-native-ttf --without-gdbm --with-gettext --with-gmp --with-iconv --with-jpeg- dir = / usr --with-openssl --with-png --with-expat-dir = / usr --with-pcre-regex = / usr --with-zlib --with-layout = GNU --enable- exif --enable-ftp --enable-magic-quotes --enable-sockets --enable-sysvsem --enable-sysvshm - -enable-sysvmsg --enable-track-vars --enable-trans-sid --enable-yp --enable-wddx --with-kerberos --enable-ucd-snmp-hack --with-unixODBC = shared, / usr --enable-memory-limit --enable-shmop --enable-calendar --enable-dbx --enable-dio --with-mime-magic = / usr / share / file / magic.mime --without -sqlite --with-libxml-dir = / usr --with-xml --with-system-tzdata --without-mysql --without-gd --without-odbc --disable-dom --disable-dba - -without-unixODBC --disable-pdo --disable-xmlreader --disable-xmlwriter

Ответы [ 3 ]

1 голос
/ 18 ноября 2010

В PHP 5.3.x уже есть файл php-5.3.3/sapi/fpm/init.d.php-fpm в исходном дистрибутиве, который просто необходимо переместить в папку /etc/rc.d/init.d. Сделайте его исполняемым с помощью chmod + x, и все готово, и вы можете выполнить его сейчас.

1 голос
/ 20 мая 2010

Есть ли сценарий php-fpm в /etc/init.d? Вот из чего работает chkconfig. Ищет комментарий в скрипте:

 # chkconfig: 345 26 74

, чтобы выяснить, какие уровни запуска должны быть настроены. Если нет сценария инициализации php-fpm или этот сценарий не содержит комментарий chkconfig, то chkconfig не с чем работать.

0 голосов
/ 06 сентября 2010
  1. vi /etc/init.d/php-fpm

    добавить эти строки сверху (при необходимости измените пути):

    # chkconfig: - 85 15
    # processname: php-cgi
    # config:      /usr/local/php-fpm/etc/php-fpm.conf
    # config:      /etc/sysconfig/php-fpm
    # pidfile:     /usr/local/php-fpm/logs/php-fpm.pid
    
  2. vi /etc/sysconfig/php-fpm

    паста:

    PHP-FPM_CONF_FILE=/usr/local/php-fpm/etc/php-fpm.conf
    
...