Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

2 Answers

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
1  
Or you can use aptitude. –  phoebus Dec 3 '09 at 6:37
add comment

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
1  
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.