Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I installed LAMP on ubuntu. But it has only basic setting with php. i want to recompile php with all options

HOw can i recompile php using /configure

I used to compile and build using cpanel easy apache . it has all the options and i usually checked that.

Now i have the full command text of cpanel php build which i want to use

'./configure' '--enable-bcmath' '--enable-calendar' '--enable-ftp' '--enable-gd-native-ttf' '--enable-libxml' '--enable-magic-quotes' '--enable-mbstring' '--enable-pdo=shared' '--enable-soap' '--enable-sockets' '--enable-zend-multibyte' '--enable-zip' '--prefix=/usr/local' '--with-apxs2=/usr/local/apache/bin/apxs' '--with-curl=/opt/curlssl/' '--with-curlwrappers' '--with-freetype-dir=/usr' '--with-gd' '--with-gettext' '--with-imap=/opt/php_with_imap_client/' '--with-imap-ssl=/usr' '--with-jpeg-dir=/usr' '--with-kerberos' '--with-libdir=lib64' '--with-libxml-dir=/opt/xml2' '--with-libxml-dir=/opt/xml2/' '--with-mcrypt=/opt/libmcrypt/' '--with-mhash=/opt/mhash/' '--with-mime-magic' '--with-mm=/opt/mm/' '--with-mysql=/usr' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-openssl=/usr' '--with-openssl-dir=/usr' '--with-pdo-mysql=shared' '--with-pdo-sqlite=shared' '--with-pgsql=/usr' '--with-pic' '--with-png-dir=/usr' '--with-sqlite=shared' '--with-ttf' '--with-xpm-dir=/usr' '--with-zlib' '--with-zlib-dir=/usr'

Can i just copy and paste that and it will gave me the same option as php build by cpanel

share|improve this question

closed as off-topic by HopelessN00b, Ward, HBruijn Feb 22 at 7:05

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 1 down vote accepted

sudo apt-get install package1 package2 package3 and so forth will allow you to perform multiple package installs at once so that you don't have to use this roundabout fashion of avoiding one-by-one package installs.

share|improve this answer
Or you can use aptitude. – phoebus Dec 3 '09 at 6:37

Why are you compiling php? Is there something wrong with the php that you can install from the Ubuntu repositories? Unless there's a very good reason to install from source, you'll save yourself many headaches going forward by just installing as many packages as possible via synaptic/apt-get/etc.

If you need additional modules for php, nearly all that you may need are available in the apt repositories.

What specific modules do you require?

share|improve this answer
Actually i need pear , pdo for postgresql , mysqli , mcrypt , curl , soap etc. Now i have to do this very often on diff machines so if the aboove configure method works then i can just copy and paste and then all configuration will be done , othwise i have to install each pacakage one by one – John Dec 3 '09 at 5:58
You know you can just request all the modules with a single apt-get right? – phoebus Dec 3 '09 at 6:05
no i didn't knw that , whhat is that command – John Dec 3 '09 at 6:23
See my added answer. – phoebus Dec 3 '09 at 8:07