开发者

Using ./configure a 2nd time in Linux: Do I need to re-input previous options?

开发者 https://www.devze.com 2023-03-22 04:05 出处:网络
I am compiling PHP and PostgreSQL myself. I have got things working fine. There were about 25 options I added (using this method http://vladgh.com/blog/install-nginx-and-php-php-fpm-mysql-and-apc) for

I am compiling PHP and PostgreSQL myself. I have got things working fine. There were about 25 options I added (using this method http://vladgh.com/blog/install-nginx-and-php-php-fpm-mysql-and-apc) for the PHP compile.

If I want to add an option to PHP (e.g. pdo) do I need to re-enter those 25 and then enter the line for enabling pg_pdo, or are the previous options stored and I only need to enter the one new option? What I am getting at here is the ./configure method, not help for installing postgres. I don't understand how ./configure works or if it stores it's previous values and can just be added to.

Also, if I am upgrading PostgreSQL, is there even any need to recompile PHP if I am NOT changing options.

I hope thi开发者_Python百科s is clear. I have been searching for a day now and just can't seem to make headway. I probably don't know enough about the make process for linux. I am running Ubuntu 10.04LTS server.


Yes, you need to reenter them. The ./configure command will generate a new set of Makefile options, overwriting the previous one.

Luckily, the previous ./configure command should still be in your console's history so you can just press the up arrow key to find it.

Assuming your shell is bash on Ubuntu, you can also Ctrlr and start typing ./configure to search through your command history. Keep hitting Ctrlr to find the right one.


phpinfo()/php -i's output contains a copy of the full ./configure line used by that build. You can simply cut/paste and then modify for the rebuild. Assuming your PHP build finished, this is the best way to recreate its configuration.


"

The configure script should write a file named ‘config.status’ which describes which configuration options were specified when the program was last configured. This file should be a shell script which, if run, will recreate the same configuration " *(http://www.gnu.org/prep/standards/html_node/Configuration.html)*

Using this file (config.status) I can issue a ./configure again and add additional options as needed.

I think this is the best way to know what you configured the first time whilst adding to it.


I normally put ./configure --with-a-lot-of-options-I-dont-want-to-remember plus the make and make install in a shell script. This also allows to insert installation instructions for other packages that are needed (ssl, xml2, ...)

As a result, I get a shell script that can be rerun for an installation on a different machine (which may need even more additional packages :-[ )

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号