Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- Oct 2009
How to install a "Made" package on a new Machine
I have created a custom-made php package which includes everything I need and I have spent two days, downloaded all the dependent packages, run ./configure 200 times to finally get the product right on the development machine.
Do I have to go through all the steps that I have gone through on the Production machine? Or there is a shortcut? e.g. make install <remote host> to install just the executables on the remote host....instead of doing the whole thing from scratch....
Your feed back will be greatly appreciated!
First of all:
Are you sure you need a custom build php stack?
It is not a one-time effort:
Installing on other machines
and keeping php and its dependancies up-to-date
is a time consuming job.
If possible, one should go with the php included in the package manager
of the linux distribution.
If you need your own php stack,
1) the best way would be to go the extra mile and build a (rpm|deb|whatever) package for it.
To do that, build a dedicated "build machine" before.
ie: a PC or virtual machine, that is very barebone and only used for
package building, so you get repeatable results.
2) Another way is: document the compile process and dependancies.
Write down every step you did to build the php stack and repeat it (or script it)
on the others.
3) It is possible to copy only the binaries and libs to another machine.
But this is the worst option.
You have to do it manually,
it is errorprone,
after a certain time you will have no clue, what you did back then and why.
Also, if the development machine differs from production (in terms of update status for example) php might not even work or not work correctly..
- Join Date
- Oct 2009
Thank you for your feed back. You are exactly right that it would be best if I can use some standard PHP package. However, the ecommerce package that I am going to port on the server doesn't like the standard PHP distribution.
Among the 3 options that you've mentioned, I like the 1st one better as I really want to do this once and just once and be able to deploy to multiple machines without the going through the grief doing the compilation all over again.
Can you give me some more information how I can do it? Even though I want to build a rpm, I need to find out what should be included in this rpm and where I should cp the files and essentially, I probably need to make sure the environmental variables are set up (e.g. PATH) correctly to point to the files that I need ... I know it is not going to be easy, that's why I am thinking if the Makefile can install the executables and library on one machine, may be it could install the same thing on a different machine. Another reason I am trying to do this is that it is a good practice NOT to install compiler on a production machine ...