LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   PHP manual configuration VS yum (http://www.linuxquestions.org/questions/linux-software-2/php-manual-configuration-vs-yum-800499/)

yoachan 04-07-2010 12:31 AM

PHP manual configuration VS yum
 
Dear all,

Currently I'm building a new box using CentOS 5.4. As most of you already know, CentOS 5.4 comes with PHP 5.16 and I want to upgrade to 5.26. (I already know how to do that using yum)

What makes me wonder is http://php.net/ only provide it's source code. So my question is:
  1. what's the benefit and/or lost of using source code + self compile than using the RPM files?
  2. If I use RPM files, any time when needed I can easily add PHP modules by installing separate rpm files (e.g. php-mysql, php-xml, etc). Can I do this with the source code pack, or do I have to reconfigure and recompile everything from scratch?
  3. How can I uninstall PHP that was created using source code + self compile? (I think "rpm -e" won't work here...)
  4. If I use the source code + self compile, and someday I want to upgrade to the latest PHP at that time, should I firstly remove my previous compiled PHP, or I can just configure and compile the latest PHP (with a hope that it'll overwrite previous PHP)?

Thanks for your trouble answering my questions. :)

Regards,

YoChan

bakdong 04-07-2010 02:11 AM

Quote:

Originally Posted by yoachan (Post 3927030)
Dear all,
  1. what's the benefit and/or lost of using source code + self compile than using the RPM files?
  2. If I use RPM files, any time when needed I can easily add PHP modules by installing separate rpm files (e.g. php-mysql, php-xml, etc). Can I do this with the source code pack, or do I have to reconfigure and recompile everything from scratch?
  3. How can I uninstall PHP that was created using source code + self compile? (I think "rpm -e" won't work here...)
  4. If I use the source code + self compile, and someday I want to upgrade to the latest PHP at that time, should I firstly remove my previous compiled PHP, or I can just configure and compile the latest PHP (with a hope that it'll overwrite previous PHP)?

With source code you are in complete control over the version, patches, dependencies, and destination of the files installed. With RPM the builder has already dictated all of this for your distribution. You can use the RPM to remove the package (because it knows where it put the files) With source code, only you know where you told it to put the files, so you have to go in there and take them out yourself.

For the same reason, you can easily update RPMs, but you would have to start from scratch with source code. Lots of problems are caused by having two versions of the same software accessible at the same time. (Specially php)

knudfl 04-07-2010 03:29 AM

PHP version 5.2.6 : 158 packages, Fedora 10 : Lots of SRC RPMS
available for rpm rebuild, for the most extras.
php526 http://www.linuxquestions.org/questi...-5-2-a-791943/
Post # 4 , etc.

LQ info : http://www.linuxquestions.org/questions/search.php
>>> 'Tag Name' = php5 :
Your questions 1....4, may already have been answered in one
of the other threads ?
.....

yoachan 04-07-2010 08:22 AM

@bakdong: Thanks for the answers. I think it covers everything :)
I'll write everything down again, and CMIIW :)
Q:
Quote:

Originally Posted by yoachan (Post 3927030)
what's the benefit and/or lost of using source code + self compile than using the RPM files?

A:
Quote:

Originally Posted by bakdong (Post 3927103)
With source code you are in complete control over the version, patches, dependencies, and destination of the files installed. With RPM the builder has already dictated all of this for your distribution.

Q:
Quote:

Originally Posted by yoachan (Post 3927030)
If I use RPM files, any time when needed I can easily add PHP modules by installing separate rpm files (e.g. php-mysql, php-xml, etc). Can I do this with the source code pack, or do I have to reconfigure and recompile everything from scratch?

A:
Quote:

Originally Posted by bakdong (Post 3927103)
For the same reason, you can easily update RPMs, but you would have to start from scratch with source code.

Q:
Quote:

Originally Posted by yoachan (Post 3927030)
How can I uninstall PHP that was created using source code + self compile? (I think "rpm -e" won't work here...)

A:
Quote:

Originally Posted by bakdong (Post 3927103)
You can use the RPM to remove the package (because it knows where it put the files) With source code, only you know where you told it to put the files, so you have to go in there and take them out yourself.

Q:
Quote:

Originally Posted by yoachan (Post 3927030)
If I use the source code + self compile, and someday I want to upgrade to the latest PHP at that time, should I firstly remove my previous compiled PHP, or I can just configure and compile the latest PHP (with a hope that it'll overwrite previous PHP)?

A:
Quote:

Originally Posted by bakdong (Post 3927103)
Lots of problems are caused by having two versions of the same software accessible at the same time. (Specially php)

@knudfl: I've tried to search before posting. But still can't find what I'm looking for. But I'll be more careful next time :)


All times are GMT -5. The time now is 07:53 PM.