Для себя напоминание, чтоб потом не париться:
./configure –prefix=/usr –with-apxs2=/usr/local/apache2/bin/apxs –with-openssl –with-zlib –enable-ftp –enable-gd –with-gd –with-jpeg-dir=/usr/lib –with-freetype-dir=/usr/lib –with-mysql=/usr/local –enable-sockets –with-gettext –with-iconv=/usr/local