Remi安装命令自动生成工具
安装步骤
安装epel的yum源
$ yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
安装Remi的yum源
$ yum install -y https://rpms.remirepo.net/enterprise/remi-release-7.rpm
安装yum-utils工具
$ yum install -y yum-utils
先禁用所有php版本的yum下载源
$ yum-config-manager --disable 'remi-php*'
再启用php 7.4的yum下载源
$ yum-config-manager --enable remi-php74
$ yum repolist
$ yum update
安装php 7.4
$ yum install -y php php-devel
安装php扩展-swoole等扩展
$ yum install -y php-swoole php-zip
安装php扩展-phptars
$ cd /tmp \
&& wget https://github.com/TarsPHP/tars-extension/archive/master.zip \
&& unzip master.zip \
&& cd tars-extension-master \
&& phpize \
&& ./configure \
&& make \
&& make install \
&& echo "extension=phptars.so" > /etc/php.d/phptars.ini
查看php版本与已加载扩展
$ php -v
$ php -m