CentOS 5.4 + Building PHP 4.4.9

xdivenx

[H]ard|Gawd
Joined
Mar 4, 2008
Messages
1,941
Ok, I am a total Linux noob and was trying to setup LAMP on my CentOS VPS. I was using www.lamphowto.com, but just recently ran into a problem. To configure PHP, I use

./configure \
--with-apxs2=/usr/local/apache/bin/apxs \
--disable-debug \
--enable-ftp \
--enable-inline-optimization \
--enable-magic-quotes \
--enable-mbstring \
--enable-mm=shared \
--enable-safe-mode \
--enable-track-vars \
--enable-trans-sid \
--enable-wddx=shared \
--enable-xml \
--with-dom \
--with-gd \
--with-gettext \
--with-mysql=/usr/local/mysql \
--with-regex=system \
--with-xml \
--with-zlib-dir=/usr/lib

However, I get:

checking if the location of ZLIB install directory is defined... /usr/lib
configure: error: Cannot find libz

Could anyone help me with this?
 
You're doing it the hard way. Use yum to install mysql-server, httpd-server, php-mysql, php.
 
You're doing it the hard way. Use yum to install mysql-server, httpd-server, php-mysql, php.

Agree. Unless you have a good reason to create a custom build, you should always use the package management system and repositories provided by your distribution. Or at least their package building infrastructure. Maintaining a system with software hand built and manually installed over a period of years becomes a nightmare very quickly, at least without careful planning.
 
Ok, Ill try that. Should I remove MySQL and HTTPD and use yum to reinstall those too?
 
Yes. I think both httpd and mysqld have an uninstall target, so it should be a simple matter of make uninstall.
 
Back
Top