How to install GEOS on CentOS and directadmin

cd /usr/local/src
wget  # go here to find the latest version:
tar -xvjf geos-3.4.2.tar.bz2
cd geos-3.4.2
./configure --enable-php; make clean ; make
make install
vi /etc/

Add the following line if it doesn't already exist


Find the location of the newly installed


You'll get something like this:


Add the extension info to your php.ini

vi /usr/local/lib/php.ini

Add the following (somewhere around the rest of your extension, e.g. APC):

For PHP 5.3:

; GEOS extension
extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20090626/"

For PHP 5.4:

; GEOS extension
extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20100525/"

For PHP 5.5:

; GEOS extension
extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20121212/"