安装 EPEL 软件包:
yum install epel-release
安装 remi 源:
yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
安装 yum 扩展包:
yum install yum-utils
安装及安装扩展
yum install -y php74
yum install -y php74-php-fpm php74-php-gd php74-php-json php74-php-mbstring php74-php-mysqlnd php74-php-xml php74-php-xmlrpc php74-php-opcache
yum install -y php74-php-devel
添加启动
systemctl start php74-php-fpm
systemctl enable php74-php-fpm
常规路径
PHP 扩展安装路径
find / -name phpize
/opt/remi/php74/root/usr/bin/phpize
扩展所在目录,下载扩展最好放在此目录
php74 -i | grep extension_dir
/opt/remi/php74/root/usr/lib64/php/modules
安装配置所在目录
find / -name php-config
/opt/remi/php74/root/usr/bin/php-config
配置文件地址
find / -name php.ini
/etc/opt/remi/php74/php.ini
添加扩展模块地址
如果PHP.INI里面有这段话。需要在PHP.D下面添加相应的INI文件即可。
1、把模块放入上面模块目录下
2、在 /etc/opt/remi/php74/php.d 目录下创建以ini后缀文件
3、内容为模块的名称,参考其它文件格式