How to install geoip on a Plesk installed server

 

  • Install required libraries and packages:
    For RHEL/CentOS and PHP 7.0:

    # yum install make plesk-php70-devel gcc glibc-devel GeoIP-devel zlib-devel
    

    For RHEL/CentOS and PHP 7.1:

    # yum install make plesk-php71-devel gcc glibc-devel GeoIP-devel zlib-devel

    For Debian/Ubuntu and PHP 7.0:

    # apt-get install plesk-php70-dev build-essential
    # apt-get install libgeoip-dev geoip-bin geoip-database

    For Debian/Ubuntu and PHP 7.1:

    # apt-get install plesk-php71-dev build-essential
    # apt-get install libgeoip-dev geoip-bin geoip-database
  • Install GeoIP v. 111 with PHP7 support:
    For PHP 7.0:

    # /opt/plesk/php/7.0/bin/pecl install http://pecl.php.net/get/geoip-1.1.1.tgz

    For PHP 7.1:

    # /opt/plesk/php/7.1/bin/pecl install http://pecl.php.net/get/geoip-1.1.1.tgz
  • Add ”
    extension=geoip.so"
    to php.ini file:
    For PHP 7.0 modify file /opt/plesk/php/7.0/etc/php.ini
    For PHP 7.1 modify file /opt/plesk/php/7.1/etc/php.ini

 

Check the installation:
For PHP 7.0:

# /opt/plesk/php/7.0/bin/php -m | grep geoip

For PHP 7.1:

# /opt/plesk/php/7.1/bin/php -m | grep geoip

 

Posts created 16

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Related Posts

Begin typing your search term above and press enter to search. Press ESC to cancel.

Back To Top