Download the PHP source from It will be in compressed format, so decompress it using the related utility for whichever compression format you choose to download.

From the root of the decompressed folder, type the command below and append whatever additional parameters are needed to configure the installation to your liking.


Any issues at this point should be the result of not having needed packages installed for any additional configurations you specified earlier. Install packages and repeat this process as necessary until the process completes successfully.

Now type:


You have two options at this point:

1) This is the recommended method, as it allows for easy uninstallation. Make sure the checkinstall package is installed, then type:

sudo checkinstall

2) Type:

sudo make install

Once this is done, type this:

ln -s /usr/local/bin/php /usr/bin/php

Not doing this will result in an error similar to the following.

bash: /usr/bin/php: No such file or directory

Once this is done, you should be able to use PHP normally.

PHP5FromSource (last edited 2008-08-06 16:14:11 by localhost)