views:

191

answers:

2

Everything is working fine.

Just that when i chkconfig –add php-fpm

It throws me an error Service php-fpm does not support chkconfig

php-5.2.13 php-5.2.13-fpm-0.5.13.diff.gz

Below is the configuration i use ./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= --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

+1  A: 

Is there a php-fpm script in /etc/init.d? That's what chkconfig works off of. It looks for a comment in the script:

 # chkconfig: 345 26 74

to figure out which runlevels should be configured. If there's no php-fpm init script, or the script doesn't contain that chkconfig comment, then chkconfig has nothing to work off of.

Marc B
A: 

vi /etc/init.d/php-fpm

add these lines on top (modify paths where required):

# 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

vi /etc/sysconfig/php-fpm

paste:

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