centos第三方remi源安装php安装指定版本
查看现在源

下载源(可以自己下载好放网盘下次用)
执行下载命令
wget http://www.taiww.com/phpsoft/linux/epel-release-latest-7.noarch.rpm wget http://www.taiww.com/phpsoft/linux/remi-release-7.rpm
原网址:wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
原网址:wget http://rpms.remirepo.net/enterprise/remi-release-7.rpm
或者:http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
或者:https://mirrors.tuna.tsinghua.edu.cn/remi/enterprise/remi-release-7.rpm
安装 epel-release-latest-7.noarch.rpm

安装remi-release-7.rpm
yum安装
yum install -y remi-release-7.rpm
安装后查看结果:
ll /etc/yum.repos.d/
rpm安装
rpm -ivh remi-release-7.rpm

安装PHP72
yum install -y php72 \ php72-php-fpm \ php72-php-mbstring \ php72-php-pdo_mysql \ php72-php-mysqlnd \ php72-php-pecl-redis \ php72-php-pecl-zip \ php72-php-gd \ php72-php-xml \ php72-php-bcmath \ php72-php-simplexml \ php72-php-pecl-swoole;
启动服务:
systemctl start php72-php-fpm版本7.2.34,配置目录:
/etc/opt/remi/php72/php.ini /etc/opt/remi/php72/php-fpm.d/www.conf/etc/opt/remi/php72/php-fpm.d/ycloud.conf(存放站点env环境变量)
查看版本:
/opt/remi/php72/root/usr/bin/php -v
查看模块:
/opt/remi/php72/root/usr/bin/php -m
扩展文件目录:
/opt/remi/php72/root/usr/lib64/php/modules/

