Copy compiled php5 to another machine

Discussion in 'Installation/Configuration' started by cooljai, Oct 11, 2007.

  1. cooljai

    cooljai New Member

    Hi,

    I'm using both php4 and php5 on CentOS 4.5 machine by loading appropriate module in Apache as needed.
    I installed php4 by using "yum install php" and compiled php5 (as installing php5 through yum will
    overwrite php4).

    here is the configure command for php5:

    Code:
    ./configure --prefix=/usr/share --with-config-file-path=/etc/php5 --datadir=/usr/share/php --bindir=/usr/bin --with-apxs2=/usr/sbin/apxs --libdir=/usr/share --includedir=/usr/include --bindir=/usr/bin --enable-mbstring --with-gd --enable-mbregex --with-mysql --with-zlib-dir=/usr/lib --enable-ftp --enable-memory-limit --enable-safe-mode --enable-bcmath --enable-calendar --enable-ctype --with-ftp --with-bz2 --enable-inline-optimization --with-iconv --with-pear=/usr/share/pear -with-kerberos --with-ldap=shared --with-mysql=shared,/usr --with-pgsql=shared
    I want to copy the installed/compiled php5 from my current machine to new machine(s). I will be thankful if anybody suggest whether its possible or not, if yes then which dir(s) /file(s) needs to be copied to new machine.

    Thanks

    Jai
     
  2. Ben

    Ben HowtoForge Supporter

    Why do you want to copy the stuff instead of compiling php5 on the other machines? I mean the time is not that long?
     
  3. cooljai

    cooljai New Member

    I want to copy because its a part of some package and needs to be installed in other machines (all machines are identical, having CentOS 4.5). Therefore, instead of consuming time to perform compilation every time, its better if we can copy it.
     
  4. ebal

    ebal New Member

    its not a good idea

    but you can rsync the folder that contains the php5 source to the other
    machine and run again a simple make install

    But you should check that all necessary libs are already installed.
     
  5. cooljai

    cooljai New Member

    Your suggestions enables me to improve my package. Thanks. I think, I can zip (tgz) the folder, copy it to target machine, extract it and then issue "make install" to implement it.
     

Share This Page