nixCraft Linux / UNIX / Shell Scripting Forum

nixCraft

Linux / UNIX Tech Support Forum

Redhat upgrade php

This is a discussion on Redhat upgrade php within the CentOS / RHEL / Fedora forums, part of the Linux Distribution category; I need latest php version on redhat 5 server. How can I upgrade php on rhel 5 server using command ...


Register free or login to your account to remove all advertisements.

Go Back   nixCraft Linux / UNIX / Shell Scripting Forum > Linux Distribution > CentOS / RHEL / Fedora

Linux answers from nixCraft.


CentOS / RHEL / Fedora Discussion about Redhat Enterprise Linux or CentOS or Fedora Linux related problems.

Reply

 

Thread Tools Display Modes
  #1 (permalink)  
Old 30th September 2009, 02:37 PM
chiku's Avatar
Member
 
Join Date: Feb 2005
OS: Fedora
Posts: 86
Thanks: 10
Thanked 1 Time in 1 Post
Rep Power: 6
chiku is on a distinguished road
Angry Redhat upgrade php

I need latest php version on redhat 5 server. How can I upgrade php on rhel 5 server using command line. No gui is here.
__________________
There's no place like 127.0.0.1
Reply With Quote
  #2 (permalink)  
Old 30th September 2009, 05:06 PM
nixcraft's Avatar
Never say die
 
Join Date: Jan 2005
Location: BIOS
OS: RHEL
Scripting language: Bash, Perl, Python
Posts: 3,195
Thanks: 13
Thanked 394 Times in 292 Posts
Rep Power: 10
nixcraft has a reputation beyond reputenixcraft has a reputation beyond reputenixcraft has a reputation beyond reputenixcraft has a reputation beyond reputenixcraft has a reputation beyond reputenixcraft has a reputation beyond reputenixcraft has a reputation beyond reputenixcraft has a reputation beyond reputenixcraft has a reputation beyond reputenixcraft has a reputation beyond reputenixcraft has a reputation beyond repute
Default

Not possible. Redhat runs and patch only stable php version that was first shipped with v5.0. You may compile latest PHP5 and install everything. The following is from my internal wiki and tested on CentOS and RHEL 64 bit v5.4:

Grab php latest tar bar from php.net:
Code:
wget php.net/get/php-5.2.11.tar.bz2/from/us.php.net/mirror
Untar it:
Code:
tar -jxvf php-5.2.11.tar.bz2
cd php-5.2.11
Configure php:
Code:
./configure --with-libdir=lib64 --with-gd --with-mysql  --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --cache-file=../config.cache --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d  --enable-fastcgi --enable-force-cgi-redirect --with-openssl
Compile php:
Code:
make
Remove current php rpm using rpm or yum command:
Code:
rpm -qa | grep php
rpm -e php
rpm -e php-module-names
Install your latest php version:
Code:
make install
Verify it:
Code:
php -v
Enjoy!
__________________
Vivek Gite
Be proud RHEL user, and let the world know about your enterprise choices! Join RedHat user group.
Do you run a Linux? Let's face it, you need help!
Cricket & IPL News Blog

Last edited by nixcraft; 30th September 2009 at 05:06 PM. Reason: typo
Reply With Quote
  #3 (permalink)  
Old 4th October 2009, 09:04 AM
Junior Member
 
Join Date: Sep 2009
OS: RHEL/Fedora
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
palerider is on a distinguished road
Default

Another option is use SRPM from Red Hat Web Application Stack, the version is much closer to latest upstream release than the one shipped with RHEL.

Code:
ftp://ftp.redhat.com/pub/redhat/linux/enterprise/5Server/en/RHWAS/SRPMS/
simply rebuild it using "rpmbuild --rebuild" and install.

Personally I prefer RPM packaged application for my servers.
Reply With Quote
  #4 (permalink)  
Old 4th October 2009, 03:16 PM
Member
 
Join Date: Sep 2005
Posts: 30
Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 0
charvi
Default

RPMs are also available via yum command. Try using 3rd party repos.
Reply With Quote
Reply

Tags
centos install php 5.2.11, linux, php, redhat, redhat install php 5.2.11, rhel 5 php, rhel install php 5.2.11, rpm, yum


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
advice to upgrade to NFS4 samengr File Servers 0 5th March 2009 05:23 PM
best way to upgrade glibc? samengr CentOS / RHEL / Fedora 4 18th February 2009 04:01 PM
DNS broken after Fedora 10 upgrade woodson2 CentOS / RHEL / Fedora 0 3rd December 2008 08:06 PM
DNS broken after Fedora 10 upgrade woodson2 Domain Name Server 0 3rd December 2008 08:05 PM
How To Upgrade PHP sweta Ubuntu / Debian 0 2nd May 2008 11:18 PM


All times are GMT +5.5. The time now is 09:03 PM.


Powered by vBulletin® Version 3.8.6 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2010 nixCraft. All rights reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40