GNU MP (GMP) is a free, high-speed library for arbitrary precision arithmetic, widely used in cryptography, Internet security, and algebraic computations. It supports signed integers, rational numbers, and floating-point arithmetic with no practical precision limit, except for system memory constraints.
Need help? We offer server management and one-time installations – contact us here!
Step-by-Step Guide to Installing GMP 6 on cPanel
1. Download and Extract GMP
Start by accessing the server and navigating to the source directory:
cd /usr/local/src
Download the latest stable version of GMP:
wget https://gmplib.org/download/gmp/gmp-6.1.0.tar.bz2.sig
Extract the downloaded archive:
tar -xjvf gmp-*
Move into the extracted directory:
cd gmp-6.1.0
2. Compile and Install GMP
Configure the GMP installation:
./configure
Build the software:
make
Verify the build to ensure everything is working correctly:
make check
Install GMP on the server:
make install
3. Configure PHP to Use GMP
Edit or create a new file for EasyApache configuration:
vi /var/cpanel/easy/apache/rawopts/all_php5
Add the following line to enable GMP support in PHP:
--with-gmp
4. Install GMP Development Package
Install the GMP development package, which is required for PHP integration:
yum install gmp-devel
5. Rebuild Apache
Rebuild Apache using EasyApache to apply the new configuration:
/scripts/easyapache --build
6. Verify GMP Installation in PHP
Run the following command to check if GMP is successfully enabled in PHP:
php -i | grep -i gmp
If the output includes gmp
, the installation was successful. Et voilà!
Need Assistance?
If you encounter any issues while installing GMP, UnderHost’s expert support team is available 24/7. Contact us via @CustomerPanel for professional assistance.