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
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.

- 23,756
- 2
- 59
- 69
-
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 06: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.

- 177
- 1
- 11
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:
ctrl-r
starts the reverse-search function on the history- Start typing part of the command you want to search for (e.g. "configure")
- Press
ctrl-r
again if you need to search farther back past the first result - 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.

- 2,178
- 14
- 14
-
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