Small blog about system administration.

Install PHP-GMP5 Library on WHM/cPanel server

GNU MP or GMP is a free library for arbitrary precision arithmetic, operating on signed integers, rational numbers, and floating point numbers. There is no practical limit to the precision except the ones implied by the available memory in the machine GMP runs on. GMP has a rich set of functions, and the functions have a regular interface.
The main target applications for GMP are cryptography applications and research, Internet security applications, algebra systems, computational algebra research, etc.
GMP is carefully designed to be as fast as possible, both for small operands and for huge operands. The speed is achieved by using fullwords as the basic arithmetic type, by using fast algorithms, with highly optimised assembly code for the most common inner loops for a lot of CPUs, and by a general emphasis on speed.
For install GMP library in cPanel server follow this instruction:

# cd /usr/local/src
# wget
# tar -xjvf gmp-5.1.0a
# cd gmp-5.1.0a
# ./configure
# make && make check && make install
Edit or create new file /var/cpanel/easy/apache/rawopts/all_php5

# vi /var/cpanel/easy/apache/rawopts/all_php5

and add this line:

Rebuild apache using this command:
# /scripts/easyapache --build
Check php-gmp is loaded using this command:
# php -i | grep -i gmp

gmp support => enabled
GMP version => 4.3.1  

No comments :

Post a Comment