Forum Moderators: coopster
I can get around the command line ok, but haven't done alot of configuration. The install instructions at [php.net...] include steps on compiling apache -- do I really need to do that?
Thanks!
Another easy way is to install Webmin. Webmin is great for administrating linux servers. Install it if you can and then view / install / packages from the Software Packages section.
If you want to compile php5 manually here are the steps.
1. As root download, unzip and untar latest php5
2. change to php5 directory (php-5.2.4)
3. Create a batch file called phpconf.sh and paste
CPPFLAGS="-I/usr/local/include"
LDFLAGS="-L/usr/local/lib -lstdc++"
./configure --prefix=/usr \
--with-config-file-path="/etc" \
--with-apxs2="/usr/sbin/apxs" \
--enable-track-vars \
--enable-calendar \
--enable-magic-quotes \
--enable-trans-sid \
--enable-inline-optimization \
--enable-memory-limit \
--enable-soap \
--with-zlib \
--with-curl="/usr" \
--with-openssl="/usr" \
--enable-bcmath \
--with-gettext="/usr" \
--with-mysql \
--with-iconv \
--with-gd \
Now this is the bit where it could get tricky as you may need different configurations to the above - apache may be a different version / installed differently.
4. chmod 755 phpconf.sh
5. ./phpconf.sh
6. If no errors make
7. If no errors make install
8. You may need to edit your httpd.conf or php.conf file in the httpd/conf.d directory
9. Make a backup copy of your existing /etc/php.ini file. Copy the template php.ini file in the install directory to /etc/php.ini and edit as necessary.
[edited by: Frank_Rizzo at 9:26 am (utc) on Oct. 6, 2007]
rpm --rebuild php-5.1.#*$!x.src.rpm
That'll generate proper packages that are known to work with RedHat, which you can then upgrade.
You'll need the -devel rpms for the web server (httpd-devel or apache-devel, I don't remember that far back). The rebuild stage above will complain with what you ned.
I've used this technique on several older servers, though not that old :)
Sean