• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 223
  • Last Modified:

Compile on testbox then move to production

Hi,
Im looking for information on how to compile software on a test box then move it to our production servers.  This software would include Apache, PHP, FreeTDS and others.  I know how to compile and install all this software, but I want to avoid having to have the compile tools (make etc) on the production servers.
Can anyone tell me how I can compile on a test box, then move the binaries and required files to the production servers.
Thanks!
D.
0
maunded
Asked:
maunded
  • 2
  • 2
1 Solution
 
TintinCommented:
A very common method is to package up the tools using whatever packaging tool you prefer, eg: RPM, YUM, etc.  That way you can build in the dependencies and any pre/post install/uninstall steps.
0
 
wesly_chenCommented:
If the OS on the testbox has the same version as the OS on the production server,
then I would suggestion you compile and install them on a separate directory ( usually default path is /usr/local).

You can refer what I did for gcc in other post.
http://www.experts-exchange.com/Operating_Systems/Linux/Q_21400079.html

Basically, say you install then all under /opt/local with
./configure --prefix=/opt/local/<package name>   # <===pacakge name like apache213, php411...
Then you make the symbolic link from /opt/local/<package name>/bin/<executeable filename> to /opt/local/bin
such as
cd /opt/local/bin
ln -s ../apache213/bin/httpd  .    # <=== use related path instead of absolutely path.

If everything test ok, then you just copy over /opt/local to the production server.
Or put /opt/local on NFS server and mount on the production as /opt/local.
0
 
maundedAuthor Commented:
Excellent!  So is it safe to assume, that if I, for example, compile Apache without the --prefix switch, that ALL the required files will be in /usr/local/apache2?  Will using the prefix switch build a directory structure, that, like PHP for example, puts files in other directorys?  Like /usr/lib etc.
0
 
wesly_chenCommented:
> compile Apache without the --prefix switch, that ALL the required files will be in /usr/local/apache2
As my experience, no.
It will install in /usr/local, not /usr/local/apache2.
You need to specify as --prefix=/usr/local/apache2

> puts files in other directorys?  Like /usr/lib etc.
Most of cases, no. They are all under /usr/local/php4....
Only glibc is different, as I know.
0
 
maundedAuthor Commented:
Fantastic, thank you very much
0

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now