Wednesday, 08 February 2012
jayeshjayan.com
Main Menu
Home
Tech Blog
Sweet Memories
Flash Album
Discussions
News
Links
Search
News Feeds
Contact Me
Home arrow Tech Blog
Newsflash

Technical Blog

Installing PHP5 along with working php4 on Redhat server 

April 16th, 2006

Below are the steps to install php5 on a redhat server. We are going to install php 5.1.2 current satble php5 version.

1) cd /usr/local/src

2 ) wget http://us2.php.net/get/php-5.1.2.tar.bz2/from/this/mirror (or any other mirror)

3 ) tar -jxvf php-5.1.2.tar.bz2

4 ) cd php-5.1.2/

5 ) PHP=’/usr/local/bin/php’ ( result of which php )

6 ) CFG=`$PHP -i | grep configure | sed “s/–prefix=\/usr\/local//g” | sed “s/’//g” | sed “s/\.\/configure \(.*\)–with-apxs.*apxs \(.*\)/\1 \2/”`

7 ) CFGLINE=”${CFG##* => } –prefix=/usr/local/php5 –exec-prefix=/usr/local/php5 –enable-force-cgi-redirect –enable-discard-path”

8 ) ./configure $CFGLINE

9 ) make

10 ) make install

11 ) cp /usr/local/php5/bin/php /usr/local/cpanel/cgi-sys/php5

12 ) chown root:wheel /usr/local/cpanel/cgi-sys/php5

13 ) cp -f php.ini-recommended /usr/local/php5/lib/php.ini

14 ) Edit /usr/local/apache/conf/httpd.conf to add the below enteries

Action application/x-httpd-php5 “/cgi-sys/php5″
AddType application/x-httpd-php5 .php5

15 ) Restart the httpd service.

Reference : - http://devel.webonce.com/php5.txt

Leave a Reply

You must be logged in to post a comment.



© 2012 jayeshjayan.com
Joomla! is Free Software released under the GNU/GPL License.