2010-05-20 4 views
0

Tout fonctionne correctement.Service php-fpm ne prend pas en charge chkconfig

juste que quand je Chkconfig -add php-fpm

Il me renvoie une erreur service php-FPM ne prend pas en charge chkconfig

php-5.2.13 php-5.2.13-FPM -0.5.13.diff.gz

Voici la configuration que j'utilise ./configure --enable-fastcgi --enable-fpm --build = x86_64-redhat-linux-gnu --host = x86_64-redhat -linux-gnu --target = x86_64-redhat-linux-gnu --programme-préfixe = --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-fichier = ../config.cache --with-libdir = lib64 --with-config-file-path =/etc - avec-config-fichier-scan-dir =/etc/php.d --disable-debug --avec-pic --disable-rpath --avec-pear --with-bz2 --with-curl --avec-dir-exec =/usr/bin --avec-freetype-dir =/usr --avec-png-dir =/usr --enable-gd-native- ttf --without-gdbm - avec-gettext --with-gmp --with-iconv --avec-jpeg-dir =/usr --avec-openssl --avec -png --with-expat-dir =/usr --with-pcre-regex =/usr - avec-zlib --with-layout = GNU --able-exif --able-ftp --enable-magic-quotes --enable-sockets --enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-track-vars --enable-trans-sid --enable-yp --enable-wddx --avec-kerberos --enable-ucd-snmp-hack - avec-unixODBC = partagé,/usr --enable-memory-limit --enable-shmop --enable-calendrier --enable-dbx --enable-dio - avec-mime-magic =/usr/share/fichier/magic.mime --sans-sqlite --with-libxml-dir =/usr --with-xml - avec-system-tzdata - sans-mysql - sans-gd - sans-odbc --disable-dom --disable-dba - sans-unixODBC --disable-pdo --disable-xmlreader --disable-xmlwriter

Répondre

1

Existe-t-il un script php-fpm dans /etc/init.d? C'est ce que fait chkconfig. Il recherche un commentaire dans le script:

# chkconfig: 345 26 74 

pour déterminer quels niveaux d'exécution doivent être configurés. S'il n'y a pas de script d'initialisation php-fpm, ou que le script ne contient pas ce commentaire chkconfig, alors chkconfig n'a rien à faire.

0
  1. vi /etc/init.d/php-fpm

    ajouter ces lignes sur le dessus (chemins modifier le cas échéant):

    # 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

    pâte:

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

En PHP 5.3.x, il y a déjà un fichier php-5.3.3/sapi/fpm/init.d.php-fpm dans la distribution source qui doit juste être déplacé vers le dossier /etc/rc.d/init.d. Rendez-le exécutable par chmod + x et vous avez terminé et pouvez chkconfig maintenant.