Linux, PHP: How to install php_gmp module

Step 1: install php-gmp

[root@CentOS-75-64-minimal /]# yum install php-gmp
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base:
 * epel:
 * extras:
 * remi-php71:
 * remi-safe:
 * updates:
Resolving Dependencies
--> Running transaction check
---> Package php-gmp.x86_64 0:7.1.20-1.el7.remi will be installed
--> Finished Dependency Resolution

Dependencies Resolved

 Package        Arch          Version                   Repository         Size
 php-gmp        x86_64        7.1.20-1.el7.remi         remi-php71         67 k

Transaction Summary
Install  1 Package

Total download size: 67 k
Installed size: 134 k
Is this ok [y/d/N]: y
Downloading packages:
php-gmp-7.1.20-1.el7.remi.x86_64.rpm                       |  67 kB   00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : php-gmp-7.1.20-1.el7.remi.x86_64                             1/1
  Verifying  : php-gmp-7.1.20-1.el7.remi.x86_64                             1/1

  php-gmp.x86_64 0:7.1.20-1.el7.remi


Now you can see file and 20-gmp.ini

[root@CentOS-75-64-minimal /]# find -name
[root@CentOS-75-64-minimal /]# find -name *gmp.ini

Step 2 (optinal if not exists file /etc/php.d/20-gmp.ini): restart PHP-FPM

service php-fpm restart

now you can see gmp in phpinfo:


Leave a Reply