Jump to content

compiling php from source on CentOS 5


Recommended Posts

I am trying to compile php 5.2.6 on CentOS 5.0 but i don't know how to start.

at the moment i have extracted the archive into /tmp/php/ but i don't know if this is right or how to run the configure script with all the dirs it needs

any help or a possible tutorial would be great.

 

Scott.

Link to comment
Share on other sites

Any particular reason you want / need to compile from source. It really isn't nessasray these days.

 

Anyway, it doesn't matter where you unpack the source tree, you just need to execute the last command (make install) as root.

 

The basic process is (where $src is the php source tree you just unpacked)....

 

cd $src
$ ./configure --help
$ ./configure --with-all-options-you-require
$ make
$ sudo make install

 

Make sure you read the README file within thge source tree, also be sure to check ./configure --help before doing any building. If you get an error while compoiling due to unsatisfied dependencies, install the dependency then come back into the $src directory, clean it and start again. eg;

 

cd $src
$ make clean
$ sudo make install

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.