Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Building PHP 5.4.3 from source under RHEL 5/6.
## Building PHP 5.4.3 under Red Hat Linux 5/6 for php CLI and php-fpm (FastCGI for Nginx/etc.)
## Adjust your included PHP modules to suit.
$ yum install libxml2-devel libcurl-devel libjpeg-devel libpng-devel libmcrypt-devel
- Note: package 'libcurl-devel' is named 'curl-devel' under RHEL 5
$ mkdir /php/compile/path
$ cd /php/compile/path
$ wget http://au2.php.net/get/php-5.4.3.tar.gz/from/au.php.net/mirror
$ tar xvf php-5.4.3.tar.gz
$ cd php-5.4.3
- Now configure
./configure \
--with-curl=/usr/bin \
--with-curlwrappers \
--with-gd \
--with-iconv-dir=/usr \
--with-jpeg-dir=/usr \
--with-mcrypt \
--with-mysqli \
--with-pdo-mysql \
--with-png-dir=/usr \
--enable-fpm \
--enable-mbstring \
--enable-soap \
--disable-cgi \
--disable-debug \
--disable-fileinfo \
--disable-filter \
--disable-phar \
--disable-simplexml \
--disable-tokenizer \
--disable-xmlreader \
--disable-xmlwriter \
--without-pdo-sqlite \
--without-pear \
--without-sqlite3 \
--with-config-file-path=/etc/php5
$ make
$ make install
- Done!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.