If you just got a clean server without PHP installed and you are trying to do this, you might receive the following error: configure: error: no acceptable cc found in $PATH. This means you don’t have c compiler installed. Just type in yum install gcc and install all the necessary libs. Then you might receive the following message while trying to configure PHP:
configure: error: xml2-config not found. Please check your libxml2 installation.
Type in: yum list | grep xml
Your outpout should be like this:
Then you need to install everything related to libxml2 that is not yet installed. The easiest way is to type: yum install libxml*.
Now you’re welcome to make PHP as usual.