PowerRC's Blog

Posted by:
PowerRC

该同志还没添加个人介绍

4,422

how to compile php7 on fedora 23 with fpm enabled

1.Download source code from php.net ( I prefer bzip2 file , because it's smaller :p)

2.extract the file (assume the filename is

1
#tar xjvf php-7.0.0.tar.bz2

then you can find files are extract into a folder named php-7.0.0 under the same directory.

3.Need to prepare some devel package before you compile

1
#dnf install aspell-devel bzip2-devel freetype-devel gmp-devel libXpm-devel libcurl-devel libjpeg-turbo-devel libmcrypt-devel libpng-devel libxml2-devel libxslt-devel mariadb-devel recode-devel uw-imap-devel gcc openssl-devel  -y

4.Configure

1
2
#cd php-7.0.0
#./configure --prefix=/usr/local/php7 --with-zlib-dir --with-freetype-dir --enable-mbstring --with-libxml-dir=/usr --enable-soap --enable-calendar --with-curl --with-mcrypt --with-zlib --with-gd --disable-rpath --enable-inline-optimization --with-bz2 --with-zlib --enable-sockets --enable-sysvsem --enable-sysvshm --enable-pcntl --enable-mbregex --enable-exif --enable-bcmath --with-mhash --enable-zip --with-pcre-regex --with-mysqli --with-pdo-mysql --with-mysqli --with-jpeg-dir=/usr --with-png-dir=/usr --enable-gd-native-ttf --with-openssl --with-fpm-user=apache --with-fpm-group=apache --with-libdir=/usr/lib --enable-ftp --with-kerberos --with-gettext --with-xmlrpc --with-xsl --enable-opcache --enable-fpm

5.If you have any error into regarding missing package or libs, google it and install it. If you didn't meet any error , go to next step.

6.start to compile

1
#make && make install

7.then you can find compiled binary under the folder you set at step 4 (--prefix)

8.That's all about compiling.But in my case , I still need to copy some default conf file to make it work.

1
2
3
#cd /usr/local/php7/etc
#cp php-fpm.conf.default php-fpm.conf
#cp php-fpm.d/www.conf.default php-fpm.d/www.conf

php7

版权申明

若文中未注明,则本文由 PowerRC 原创,转载请注明出处。

分享

本文有评论 1 条

  1. :mrgreen: php out啦

    ceil April 17, 2016 at 12:27 pm Reply

Leave a Reply

*

code

back up ↑