17

I am upgrading LAMP stack on customer's server and need to ./configure mysql and apache with exact last settings they were compiled with last time. Where do I get these? PHP configure string can be got by php -i. What about others?

3 Answers 3

22

Was the decompressed source directory kept around? If so, the configure flags would typically be in config.status or config.log.

This differs slightly depending on the software and whether or not autoconf was used.

1
  • 1
    +1: Also (assuming configure was generated by autoconf), you can reconfigure using the same flags by running $ config.status --recheck. Mar 16, 2010 at 6:58
5

config.status has a --config flag to print out the last configuration. I found it by running ./config.status --help

--config     print configuration, then exit

So just run ./config.status --config, and it will print out all the configure parameters.

0

Depending on how long ago they were compiled, the command line entries used may still be in your shell's history. Under bash, you search back in the history via the following procedure:

  1. ctrl-r starts the reverse-search function on the history
  2. Start typing part of the command you want to search for (e.g. "configure")
  3. Press ctrl-r again if you need to search farther back past the first result
  4. Hit enter to execute command line once you've found it (right arrow typically brings back the prompt with the found command string without actually executing it)

Not to be all evangelical, but it's generally really bad idea to be compiling a lot of software yourself rather than using the packages provided by your distro.

4
  • This is not evangelical, this is just how that works ;) Unfortunately, RPM versions don't satisfy that case. Mar 15, 2010 at 13:33
  • This is the usual "I'm running CentOS but I need more recent versions of everything" case?
    – Ophidian
    Mar 15, 2010 at 14:29
  • No. Different reasons. CentOS version of Apache does not support worker mpm for example. Being torrent tracker, server needed worker mpm. etc. Mar 17, 2010 at 11:02
  • I suppose you could rebuild the source rpm with support turned on... A patch on the spec might be easier to maintain. You probably need to have your own, higher epoch set up so that system updates to httpd don't override yours.
    – Ophidian
    Mar 17, 2010 at 13:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .