1. Download
2. Unzip and configure
tar -zxvf php-7.4.13.tar.gz
cd php-7.4.13/
./configure
3. Compile
make
4. Install dependent packages
The compilation process may cause compilation errors due to the lack of dependent packages. You need to install the missing dependent packages and then recompile
yum install libxml2-devel
yum install sqlite-devel
make
5. Installation
Install after successful compilation
make install
6. Copy php.ini
View php.ini path
php -i | grep php.ini
Copy php.ini-development in the source decompression directory to /usr/local/lib as shown in the figure above and change the name to php.ini
cd php-7.4.13/
cp php.ini-production /usr/local/lib/php.ini
7. Installation test
php -i | grep php.ini
8. Version testing
php -v