How-to build RC1 under RedHat

From: Date: Thu, 20 Apr 2000 19:14:12 +0000
Subject: How-to build RC1 under RedHat
Groups: php.version4 
Request: Send a blank email to php-version4+get-13830@lists.php.net to get a copy of this message
Compiling PHP 4.0 RC1 from the official source tar file under RedHat and RedHat derivatives The following is my experience compiling RC1 under Mandrake 7.0, which is based on RedHat 6.1. This should work on any recent RedHat or RedHat derivative, but has not been tested. This may also apply to other systems using RPM or other packaging methods. NB: I've erred on the side of caution with the packages listed. Some of them may be overkill, but I know this particular combination works. At a minimum, you will need the following packages installed: apache apache-devel If you want to compile in MySQL, you will also need: MySQL MySQL-client MySQL-devel If you want to compile in gd support: gd gd-devel If the version of gd you have installed is one of the newer version that support png, you will also need: libpng libpng-devel In general, I've found that for every option you want to add to PHP (zlib, etc), make sure you not only have that package installed, but also the -devel package. This seems to be what most people trying to build PHP on RedHat boxen are missing. Under RedHat, place the php.ini file in /etc/httpd/conf, and be sure to use the following options for configure: --with-apxs=/usr/sbin/apxs --prefix=/usr --with-config-file-path=/etc/httpd/ conf And, for those of you who are curious, here's the complete ./configure command that I used to build RC1 on Mandrake 7.0 (line breaks added for readability): ./configure --with-apxs=/usr/sbin/apxs --prefix=/usr --with-gd --with-mysql --with-zlib --with-dbase --with-filepro --with-ndbm --with-config-file-path=/etc/httpd/conf --with-fdftk=no --disable-debug --enable-magic-quotes --enable-track-vars --enable-safe-mode --with-exec-dir=/usr/bin --with-system-regex The --disable-debug is in there so I can use the Zend optimizer. I hope this helps other people trying to build on RedHat, and I give permission for this to be used as part of the PHP documentation, as long as credit is given. Dave Weiner

« previous php.version4 (#13830) next »