中身は5.5と代わり有りません
OPcache導入と合わせて整理 ・disable-allを使いたかったが、pherやsimplexmlもNGとなるため断念 // yumは5.4流用(一部足りないものがあるはず) # yum install make gcc gcc-c++ pcre-devel openssl-devel subversion autoconf \ libevent-devel libxml2-devel bzip2-devel libcurl-devel libjpeg-devel libpng-devel \ freetype-devel gmp-devel libmcrypt-devel aspell-devel libxslt-devel expat-devel libtool-ltdl-devel expat-devel libmcrypt-devel //RPMforgeの設定 // epelでも可 #yum install yum-conf-rpmforge.x86_64 #yum --enablerepo=rpmforge install libmcrypt-devel これ以外にphalcon,xhprofモジュール導入
CFLAGS="-march=native -O3 -m64 -pipe -fomit-frame-pointer -mfpmath=sse -msse4 -msse4.1 -msse4.2" \ CXXFLAGS="-march=native -O3 -m64 -pipe -fomit-frame-pointer -mfpmath=sse -msse4 -msse4.1 -msse4.2" \ ./configure \ --host=x86_64-redhat-linux-gnu \ --build=x86_64-redhat-linux-gnu \ --target=x86_64-redhat-linux \ --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-dba \ --disable-debug \ --disable-rpath \ --disable-short-tags \ --enable-bcmath \ --enable-calendar \ --enable-dom \ --enable-exif \ --enable-fpm \ --enable-ftp \ --enable-gd-native-ttf \ --enable-json \ --enable-libxml \ --enable-mbregex \ --enable-mbstring \ --enable-mysqlnd \ --enable-opcache \ --enable-pdo \ --enable-shmop \ --enable-soap \ --enable-sockets \ --enable-sysvmsg \ --enable-sysvsem \ --enable-sysvshm \ --enable-wddx \ --enable-xml \ --enable-xmlreader \ --enable-xmlwriter \ --enable-zip \ --with-curl \ --with-freetype-dir=/usr \ --with-gd \ --with-gettext \ --with-gmp \ --with-iconv \ --with-jpeg-dir=/usr \ --with-kerberos \ --with-layout=GNU \ --with-libexpat-dir=/usr \ --with-libxml-dir=/usr \ --with-mcrypt \ --with-mhash \ --with-mysql=mysqlnd \ --with-mysqli=mysqlnd \ --with-pdo-mysql=mysqlnd \ --with-openssl \ --with-pcre-regex \ --with-pic \ --with-png-dir \ --with-png-dir=/usr \ --with-unixODBC=shared,/usr \ --with-xsl \ --with-zlib \ --without-gdbm \ --without-unixODBC \
//ユーザ/グループは適宜修正 --with-fpm-group=nginx \ --with-fpm-user=nginx
// openSUSEだとdevelがなくてNG --with-bz2 --with-pspell
-----------------------------------------
systemdで起動するためのスクリプト
# cat /usr/lib/systemd/system/php-fpm.service
[Unit] Description=The PHP FastCGI Process Manager After=syslog.target network.target [Service] Type=forking PIDFile=/var/run/php-fpm.pid EnvironmentFile=/etc/sysconfig/php-fpm ExecStart=/usr/sbin/php-fpm -D ExecReload=/bin/kill -USR2 $MAINPID PrivateTmp=true [Install] WantedBy=multi-user.target
-----------------------------------------
これで行けるはず
/etc/sysconfig/php-fpmが無いとエラーなのでtouchしてファイルを作成するか、
EnvironmentFileを空にする
またPIDFileはphp-fpm.confと合わせておくか--pidオプションで指定する