CentOS 5.8 Server, manual install PHP 5.2.17

7,806

Ok, after few days research on this topic. I do know the parameter for what. That is the specify directory would like to install to it.

That's the reason I can't find the path is created.

For best practise, it good to do it like this way

if you prefer install inside apache folder

./configure --prefix=/usr/local/apache/php

or

./configure --prefix=/usr/local/php
Share:
7,806

Related videos on Youtube

Shiro
Author by

Shiro

Updated on September 18, 2022

Comments

  • Shiro
    Shiro over 1 year

    I would like manually install PHP 5.2.17. I manage to install httpd and mysql.

    But when I want to PHP 5.2.17, I could not found a proper guide. These the step I had done with a fresh installation of CentOS 5.8 x86_64 (server & server GUI)

    1. yum install httpd httpd-devel

    2. /etc/init.d start OK

    3. /etc/init.d stop OK

    4. yum install mysql mysql-server mysql-devel

    5. yum remove php

    6. yum groupinstall "Development Tools"

    7. yum install libxml2-devel

    8. wget http://museum.php.net/php5/php-5.2.17.tar.bz2 to get php5.2.17 (client requirement must use this version)

    9. cd php5.2.17

    10. ./configure --with-apxs2=/usr/sbin/apxs --with-mysql=/usr/local

    This is the area I confuse.

    I could not found the /usr/sbin/apxs in my system. I do another Google search on how to manually install PHP, they pointed using ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql

    Both localtion I also cannot find apxs or apache2. I scare I make any mistake on it. Please help and guide on this.

    I am newbie in CentOS

  • simbo1905
    simbo1905 almost 7 years
    folks should also pass --enable-force-cgi-redirect to configure which will silence a security warning when building the code