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?


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.

| improve this answer | |
  • 1
    +1: Also (assuming configure was generated by autoconf), you can reconfigure using the same flags by running $ config.status --recheck. – William Pursell Mar 16 '10 at 6:58

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.

| improve this answer | |

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.

| improve this answer | |
  • This is not evangelical, this is just how that works ;) Unfortunately, RPM versions don't satisfy that case. – Vladislav Rastrusny Mar 15 '10 at 13:33
  • This is the usual "I'm running CentOS but I need more recent versions of everything" case? – Ophidian Mar 15 '10 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. – Vladislav Rastrusny Mar 17 '10 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 '10 at 13:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.