Skip to content
  • Solutions
    By Role
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    By Infrastructure
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
  • Product
    • Plesk Features
    • Plesk Editions
    • What’s new
    • Pricing
    • Roadmap
    • Lifecycle Policy
    • Extensions Catalogue
  • Pricing
  • Extensions
    Featured Extensions
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    Bundles and packs:
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack

    See all Extensions

  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
Plesk 360 login
Free Trial

Knowledge Base

How to install GeoIP php extension for PHP 7.0 and PHP 7.1 supplied by Plesk?

 
centosdatabasedebianinstall pleskphp

Question

How to install GeoIP php extension for PHP 7.0 and PHP 7.1 supplied by Plesk?

Answer

  1. Connect to the server via SSH.
  2. 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

  3. 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

  4. Add "
    extension=geoip.so"
    to the PHP's configuration (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
  5. 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

Note: for PHP versions other that 7.0 and 7.2, specify corresponding version in each step. For example:

# apt-get install plesk-php72-dev build-essential
# /opt/plesk/php/7.2/bin/php -m | grep geoip

Tweet
Share
Share
Email
0 Shares
Read the full article
Related Posts

Ruby on Rails vs PHP: Which one’s right for your needs?

Read More »

Plesk with Centralized Database and Network File System

Read More »

Recommended OSs for Plesk

Read More »
Knowledge Base

Mail accounts cannot log into Plesk web interface if password is encrypted

Read More »

How to install/uninstall memcached PHP extension for Plesk PHP handlers

Read More »

How to install the OAuth PHP extension for PHP versions provided by Plesk

Read More »

 How to install ‘sqlsrv’ extension for Plesk PHP handlers?

Read More »

Hosting Wiki

  • Server Redundancy
  • Bare Metal Server
  • PhpMyAdmin
  • phpPgAdmin
  • Oracle VM Server
  • Server Virtualization Software
  • Windows Server
  • Linux
  • PHP
  • Plesk
  • SQL database
  • NoSQL Database
  • Web Server
  • DNS Server
  • SSH
X-twitter Linkedin Youtube Reddit Github
  • Product
  • Login
  • Pricing
  • Editions
  • For Partners
  • Partner Program
  • Contributor Program
  • Affiliate Program
  • Plesk University
  • Company
  • Blog
  • Careers
  • Events
  • About Plesk
  • Our Brand
  • Resources
  • User and Admin guides
  • Help Center
  • Migrate to Plesk
  • Contact Us
  • Hosting Wiki
  • Forum
  • Legal
  • Legal
  • Privacy Policy
  • Imprint

© 2025 WebPros International GmbH

Part of the WebPros®  Family