Build PHP From Scratch On Fedora/RHEL/CentOS

From TYO Lab Wiki
Revision as of 05:16, 14 July 2015 by Amonlee (Talk | contribs) (Dependencies)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

As Google App Engine only supports PHP 5.5 at the time of writing this article, you may find the latest Fedora version already provides 5.6 which won't make the GAE's tool set happy. If you decide to build PHP 5.5 from scratch, here is the pieces you may need.

Dependencies[edit]

sudo dnf install libxslt-devel libtidy-devel net-snmp* postgresql-devel libmcrypt-devel openldap-devel openldap-clients mod_ldap libX11-devel libXpm-devel libXft-devel libXext-devel libjpeg-turbo-devel httpd-devel gd-devel

Configure[edit]

./configure --enable-opcache --prefix=/opt/php55 --with-apxs2=/usr/bin/apxs --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pgsql=/usr --with-tidy=/usr --with-curl=/usr/bin --with-openssl-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-pdo-pgsql=/usr --with-pdo-mysql=mysqlnd --with-xsl=/usr --with-ldap --with-xmlrpc --with-iconv-dir=/usr --with-snmp=/usr --enable-exif --enable-calendar --with-bz2=/usr --with-mcrypt=/usr --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-freetype-dir=/usr --enable-mbstring --enable-zip --with-pear --with-gd --with-config-file-path=/opt --with-libdir=lib64 --enable-bcmath

or with mysqlclient library:

./configure --enable-opcache --prefix=/opt/php55 --with-apxs2=/usr/bin/apxs --with-mysql=/usr --with-mysqli=mysqlnd --with-pgsql=/usr --with-tidy=/usr --with-curl=/usr/bin --with-openssl-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-pdo-pgsql=/usr --with-pdo-mysql=mysqlnd --with-xsl=/usr --with-ldap --with-xmlrpc --with-iconv-dir=/usr --with-snmp=/usr --enable-exif --enable-calendar --with-bz2=/usr --with-mcrypt=/usr --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-freetype-dir=/usr --enable-mbstring --enable-zip --with-pear --with-gd=/usr/include/ --with-config-file-path=/opt --with-libdir=lib64 --enable-bcmath