LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 11-03-2009, 08:13 AM   #1
primeaup
LQ Newbie
 
Registered: Nov 2005
Posts: 5

Rep: Reputation: 0
Question Need RPM package for PHP version 5.2.7 and up on redhat 5.1


I am looking to upgrade php from 5.2.5 to a more secure version like minimum 5.2.7 I am working on RedHat 5.1.

I have tried to look for RPM's on rpm.pbone.net and rpm.find.net and no luck.

I now a can donwload the source code from PHP but I am not sure if I can compile on linux redhat. I have compiled the source code for solaris
but not linux.

Does anyone now where I can get my hand on the RPM.
The Arch is i386, Redhat 5.1.

Thanks
 
Old 11-03-2009, 09:47 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,551

Rep: Reputation: 2512Reputation: 2512Reputation: 2512Reputation: 2512Reputation: 2512Reputation: 2512Reputation: 2512Reputation: 2512Reputation: 2512Reputation: 2512Reputation: 2512
A similar question was asked a short time ago, so I made
some build instructions ( for 5.3.0 ) here, post # 3
http://www.linuxquestions.org/questi...?highlight=php

It it very easy, just open the terminal and type 1) su
2 ) rpmbuild -bb /usr/src/redhat/SPECS/php.spec
... and wait .. to the packages are ready.
.....

And version 5.2.9 is here
http://download.fedora.redhat.com/pu...2.fc11.src.rpm
.....

Last edited by knudfl; 11-03-2009 at 09:55 AM.
 
Old 11-03-2009, 11:11 AM   #3
primeaup
LQ Newbie
 
Registered: Nov 2005
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks for the info

Quote:
Originally Posted by knudfl View Post
A similar question was asked a short time ago, so I made
some build instructions ( for 5.3.0 ) here, post # 3
http://www.linuxquestions.org/questi...?highlight=php

It it very easy, just open the terminal and type 1) su
2 ) rpmbuild -bb /usr/src/redhat/SPECS/php.spec
... and wait .. to the packages are ready.
.....

And version 5.2.9 is here
http://download.fedora.redhat.com/pu...2.fc11.src.rpm
.....

Just a little question regarding 5.2.9, can I use the fedora rpm for EL 5.1 (RedHat)

Thanks
 
Old 11-03-2009, 11:41 AM   #4
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,362

Rep: Reputation: 171Reputation: 171
RHEL5.X was based on FC6. There have been tons of changes between FC6 and F11. So while you might shoe horn it into your system it is likely not to function correctly. Rebuilding the RPM is the way to go.
 
Old 11-03-2009, 02:14 PM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,551

Rep: Reputation: 2512Reputation: 2512Reputation: 2512Reputation: 2512Reputation: 2512Reputation: 2512Reputation: 2512Reputation: 2512Reputation: 2512Reputation: 2512Reputation: 2512
As lazlow says : Yes. The package shown is not an RPM package.

It is an SRC.RPM , no rpm , just source code.
' src.rpm ' just tells : "ready to build with rpmbuild
to get rpm packages"
Unpacking src.rpm's to /usr/src/redhat/SOURCES/ :
# rpm -i <package>src.rpm

And I actually did build the packages ( 5.3.0 ) on EL 5.

And no : you cannot use a Fedora binary rpm package on EL5,
only the Fedora SRC.RPM's, thus tailoring EL 5 packages.
.....

Last edited by knudfl; 11-03-2009 at 03:10 PM.
 
Old 11-04-2009, 07:06 AM   #6
primeaup
LQ Newbie
 
Registered: Nov 2005
Posts: 5

Original Poster
Rep: Reputation: 0
MySQL version needed when compiling with PHP 5.3

Quote:
Originally Posted by knudfl View Post
As lazlow says : Yes. The package shown is not an RPM package.

It is an SRC.RPM , no rpm , just source code.
' src.rpm ' just tells : "ready to build with rpmbuild
to get rpm packages"
Unpacking src.rpm's to /usr/src/redhat/SOURCES/ :
# rpm -i <package>src.rpm

And I actually did build the packages ( 5.3.0 ) on EL 5.

And no : you cannot use a Fedora binary rpm package on EL5,
only the Fedora SRC.RPM's, thus tailoring EL 5 packages.
.....

Thanks for the feedback,

I was wondering what dependencies did you use with PHP 5.3 when it comes
to MySQL.

Thanks in advance.
 
Old 11-04-2009, 08:27 AM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,551

Rep: Reputation: 2512Reputation: 2512Reputation: 2512Reputation: 2512Reputation: 2512Reputation: 2512Reputation: 2512Reputation: 2512Reputation: 2512Reputation: 2512Reputation: 2512
Quote:
I was wondering what dependencies did you use with PHP 5.3
when it comes to MySQL.
' mysql-devel '
I just added it to the long dependency list in the reference thread, post # 3
http://www.linuxquestions.org/questi...?highlight=php
Code:
# yum install mysql-devel firebird-devel libicu-devel enchant-devel bzip2-devel curl-devel db4-devel gmp-devel httpd-devel pam-devel pcre-devel libc-client-devel cyrus-sasl-devel openldap-devel postgresql-devel unixODBC-devel libxml2-devel libxslt-devel libxml2-devel libXpm-devel libjpeg-devel libpng-devel freetype-devel t1lib-devel libmcrypt-devel mhash-devel libtidy-devel freetds-devel aspell-devel recode-devel
..... ..... Good luck .....
.....
P.S. : You can read the "Build Requires" in the file ' php.spec '.
.....

Last edited by knudfl; 11-04-2009 at 08:32 AM.
 
Old 11-07-2009, 04:06 PM   #8
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,139
Blog Entries: 54

Rep: Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791
Quote:
Originally Posted by knudfl View Post
2 ) rpmbuild -bb /usr/src/redhat/SPECS/php.spec
Nobody needs to build these packages as root account user: use an unprivileged account instead.
 
1 members found this post helpful.
Old 11-07-2009, 08:10 PM   #9
John VV
Guru
 
Registered: Aug 2005
Posts: 12,834

Rep: Reputation: 1709Reputation: 1709Reputation: 1709Reputation: 1709Reputation: 1709Reputation: 1709Reputation: 1709Reputation: 1709Reputation: 1709Reputation: 1709Reputation: 1709
I would just let yum update the rhel 5.1 to rhel 5.4 and be done with it .
 
Old 11-08-2009, 04:48 AM   #10
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,551

Rep: Reputation: 2512Reputation: 2512Reputation: 2512Reputation: 2512Reputation: 2512Reputation: 2512Reputation: 2512Reputation: 2512Reputation: 2512Reputation: 2512Reputation: 2512
@ unSpawn # 8 ... Sorry ...
.. I see that mentioned every week .. without a 'how to do it' ..
.. It's easy to describe : a 'one liner' file '.rpmmacros' will create the
rpm's to e.g. /home/'name'/rpms/ , using 'rpmbuild' as ordinary user :
The line is : %_topdir /home/<username>/rpms

The commands to get it done :
Code:
mkdir -p --verbose $HOME/rpms/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
mkdir -p --verbose $HOME/rpms/RPMS/{athlon,i386,i486,i586,i686,noarch}
echo "%_topdir `echo $HOME/rpms`" > $HOME/.rpmmacros
And ' rpm -i <package.src.rpm> ' will then copy the source code tar ball to
/home/<username>/rpms/SOURCES , and the <file>.spec to
/home/<username>/rpms/SPECS.
.....

Last edited by knudfl; 11-08-2009 at 10:53 AM.
 
1 members found this post helpful.
Old 11-15-2009, 06:00 PM   #11
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,139
Blog Entries: 54

Rep: Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791
NP about the unpriv. As far as HOWTO's go I used to point to docs like IBM DeveloperWorks (as seen here), but they're probably getting old now and I know Fedora has way more up to date docs and rules. I'd add some sane defaults to ~/.rpmmacros following your example (notice: tmp under rpms/):
Code:
%_topdir        $HOME/rpms
%_builddir      %{_topdir}/BUILD
%_rpmdir        %{_topdir}/RPMS
%_sourcedir     %{_topdir}/SOURCES
%_specdir       %{_topdir}/SPECS
%_srcrpmdir     %{_topdir}/SRPMS
%_tmppath       %{_topdir}/tmp
One could add an ~/.rpmrc for tweaking build flags.
 
1 members found this post helpful.
Old 11-16-2009, 08:19 AM   #12
primeaup
LQ Newbie
 
Registered: Nov 2005
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks all for you feedback.

I have decided to migrate the systems from this env (Virtuozzo with EL5)
Moving them to ESX hosts. I have already setup my repository for upgrades of PHP, MySQL...
I am going to usr YUM to do upgrades.
 
Old 11-17-2009, 10:30 AM   #13
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,551

Rep: Reputation: 2512Reputation: 2512Reputation: 2512Reputation: 2512Reputation: 2512Reputation: 2512Reputation: 2512Reputation: 2512Reputation: 2512Reputation: 2512Reputation: 2512
# 11, @ unSpawn : Thank you ..

Seems, this simplified explanation does the job :
Code:
mkdir -p --verbose $HOME/rpms/{BUILD,RPMS,SOURCES,SPECS,SRPMS,tmp} &&
mkdir -p --verbose $HOME/rpms/RPMS/{athlon,i386,i486,i586,i686,noarch}
+ this file ... ' ~.rpmmacros ' :
Code:
%_topdir     /home/<username>/rpms

%_tmppath     %{_topdir}/tmp

Last edited by knudfl; 01-20-2010 at 06:22 AM.
 
  


Reply

Tags
rpmbuild


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
is there any latest gcc version available in .rpm package anushineforever Linux - Software 1 01-04-2009 01:20 AM
Not able to upgrade the version of the rpm package manohare Red Hat 1 08-16-2007 08:40 AM
rpm package install in RedHat rafiqul Linux - Newbie 4 02-03-2006 11:08 AM
How to rebuild php rpm package for oci8 in RHLE 4.0 nui Linux - Enterprise 2 08-01-2005 02:18 AM
is the a package of ndiswrapper-1.1 version in rpm golpemortal Linux - Wireless Networking 2 03-28-2005 09:04 PM


All times are GMT -5. The time now is 10:17 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration