0

I have two CentOS 6.5 VMs/servers with Plesk 12 installed on both. On on of these servers, lets call it server 1, I have compiled PHP 5.2.17 - yes I know this is old etc. however two sites I host require it.

Now my query is this, can I simply copy that compiled source over to the other server and 'activate' it within Plesk - will I be missing dependencies if I do this? Or do I have to compile from source on each machine - in the case of PHP 5.2.17; don't get wrapped up in the Plesk element, it is not important.

Up to now both servers are virtually identical in setup and software installed, only server 1 has the compiler tools and software installed in order to compile PHP 5.2.17.

The reason I am asking this is that I want to move the few sites off Server 1 and shut it down, I can then invest the funding for that in the other server - upgrade it's resources etc..

#

The question is probably more specific than it needs to be really - the question applies to any compiled source where it is being moved to alike os environment.

Does my question make sense?

Thanks for your help in advance.

HopelessN00b
  • 53,385
  • 32
  • 133
  • 208
Anthony
  • 367
  • 1
  • 4
  • 14
  • Are you absolutely _certain_ these sites need PHP 5.2 and can't run on modern PHP? Almost everything that is that old has no business still being on the Internet. – Michael Hampton Nov 23 '14 at 23:35
  • [Administration panels are off topic](http://serverfault.com/help/on-topic). [Even the presence of an administration panel on a system,](http://meta.serverfault.com/q/6538/118258) because they [take over the systems in strange and non-standard ways, making it difficult or even impossible for actual system administrators to manage the servers normally](http://meta.serverfault.com/a/3924/118258), and tend to indicate low-quality questions from *users* with insufficient knowledge for this site. – HopelessN00b Feb 25 '15 at 07:48

1 Answers1

1

You would do better to build an RPM in the first server (the compiling, linking, installing would be steps in your RPM building workflow) and copy that RPM to the new server. Not only would this give you a more repeatable, reusable work-product, but it would better align with the OS standard for code distribution, and would enable you to use RPM's built-in versioning capabilities. I would recommend to look into installing it into a different build-location (like "/opt/mycompany/php-5" or similar) so it does not conflict with the OS-provided version. I would also recommend to look into the Red Hat / CentOS Software Collections to see how they solve a similar problem (multiple versions of compilers / middleware in a single machine).

DTK
  • 1,688
  • 10
  • 15