Build the apache binary centrally.

Hi,

Generally we will run

to install, configure apache 2.x on Solaris machine, but dont want to follow these on the remaining machines.

I want to build the apache binary centrally, so that i can untar the tar file on remaining machines. Please suggest on how to prepare this file and when i installed apache the directory is /usr/local/apache2 . So do i need to tar up apache2 directory or only gather binary and lib files?

Please assist.

Thanks

When Gentoo builds packages, it sets ./configure's PREFIX to /var/tmp/portage/package-name/. After make install is done, it copies only the bits it wants from /var/tmp/portage/ onto the system at large. You can probably use the same trick.

Most builds just need the files that went out in the make install to /usr/local, or wherever you set the configure --prefix, that you put in an archive to keep the set together and unpack on the other machines. If they are clone servers, you might rsync the files out so just new stuff moves.

So can i tar up all the directories under /usr/local/apache2?

---------- Post updated at 02:21 PM ---------- Previous update was at 02:19 PM ----------

I have used

---------- Post updated at 02:25 PM ---------- Previous update was at 02:21 PM ----------

So do i need to gather all files under /usr/local/apache2 or just gather the files from make install output? Please assist on how to identify the files from the below output.

Well, what's in /usr/local/apache2 ? You probably need most or all of it, but you should see what it is first...

May be i can look in the /usr/local/apache2/bin

Thanks

Hmmm, that's going to be a problem -- your symbolic links are all wrong...

All lib files under /usr/local/apache2/lib have been modified as part of installtion but other files beyond /usr/local/apache2 have not been updated when i installed apache, which is correct. Generally apache installation wont mess up all files which were outside /usr/local/apache.

Btw here none of the symbolic links were wrong because apache is working good on the machine i installed and the apache process started without any errors.

Oh, well, if you actually intend to run it from /usr/local/apache2, then they're fine.

If you mean output of the "ldd" command - those are not symbolic links :stuck_out_tongue:

Can someone guide me how to just identify the binary and lib files in a tar file, so then i would not run configure, make and make install on other machines or should i tar up entire directory (i.e) /usr/local/apache?

If I were you I would first try to copy just "/usr/local/apache2" to the other server and see if it starts properly. If it won't, then it will probably complain about some missing libraries. Those can't (or shouldn't) be simply copied between servers. If there will be some library issues, you will have to install missing packages there.

When an application like apache keeps things it its own little subtree, which is a best practice that makes for easy upgrade, as opposed to copying to /usr/local/lib and bin or worse to /usr/lib and bin or /lib and /bin, mixed with the OS tools, you need to have $PATH and $LD_LIBRARY_PATH (or whatever environment variable ld() on your O/S likes) extended to find the subtree apps and libs, respectively. I like keeping things separated, O/S, apps, bought, built, written and if possible configuration varied files all in separate direcories or subtrees. Then, you can change a package without touching the config. Vendors supporting their product do not have other people's files under foot. Custom code is not masquerading as stock.