yum install yum-utils
yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
============================================================================================================================================================================================================
Package Arch Version Repository Size
============================================================================================================================================================================================================
Installing:
remi-release noarch 7.8-1.el7.remi /remi-release-7 28 k
Installing for dependencies:
epel-release noarch 7-13 epel 15 k
Transaction Summary
============================================================================================================================================================================================================
[root@192-168-31-103 ~]# yum repoinfo | grep Repo-filename
Repo-filename: /etc/yum.repos.d/base.repo
Repo-filename: /etc/yum.repos.d/epel.repo
Repo-filename: /etc/yum.repos.d/base.repo
Repo-filename: /etc/yum.repos.d/remi-safe.repo
Repo-filename: /etc/yum.repos.d/base.repo
rpm -ql remi-release
[root@192-168-31-103 /etc/yum.repos.d]# ls
base.repo epel.repo.rpmnew remi-glpi91.repo remi-glpi93.repo remi-modular.repo remi-php70.repo remi-php72.repo remi-php74.repo remi.repo
epel.repo epel-testing.repo remi-glpi92.repo remi-glpi94.repo remi-php54.repo remi-php71.repo remi-php73.repo remi-php80.repo remi-safe.repo
cat /etc/yum.repos.d/remi-php74.repo
yum-config-manager --enable remi-php74
cat /etc/yum.repos.d/remi-php74.repo
yum install php php-common php-opcache php-pecl-mcrypt php-cli \
php-gd php-curl php-mysqlnd php-devel php-embedded \
php-mbstring php-pdo php-xml php-fpm php-pecl-memcached \
php-pecl-redis5 php-pecl-mongodb
https://gitee.com/as4k/xdocs/blob/master/xfile/yum_install_php74.txt
[root@192-168-31-103 ~]# php -v
PHP 7.4.13 (cli) (built: Nov 24 2020 10:03:34) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.13, Copyright (c), by Zend Technologies
/etc/php-fpm.d/www.conf
...
user = nginx
...
group = nginx
...
listen = /run/php-fpm/www.sock
...
listen.owner = nginx
listen.group = nginx
systemctl status php-fpm
chown -R root:nginx /var/lib/php
参考nginx conf
=============
server {
# . . . other code
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/run/php-fpm/www.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
[root@192-168-31-100 /etc/yum.repos.d]# fgrep [ remi*
remi-glpi91.repo:[remi-glpi91]
remi-glpi92.repo:[remi-glpi92]
remi-glpi93.repo:[remi-glpi93]
remi-glpi94.repo:[remi-glpi94]
remi-modular.repo:[remi-modular]
remi-modular.repo:[remi-modular-test]
remi-php54.repo:[remi-php54]
remi-php70.repo:[remi-php70]
remi-php70.repo:[remi-php70-debuginfo]
remi-php70.repo:[remi-php70-test]
remi-php70.repo:[remi-php70-test-debuginfo]
remi-php71.repo:[remi-php71]
remi-php71.repo:[remi-php71-debuginfo]
remi-php71.repo:[remi-php71-test]
remi-php71.repo:[remi-php71-test-debuginfo]
remi-php72.repo:[remi-php72]
remi-php72.repo:[remi-php72-debuginfo]
remi-php72.repo:[remi-php72-test]
remi-php72.repo:[remi-php72-test-debuginfo]
remi-php73.repo:[remi-php73]
remi-php73.repo:[remi-php73-debuginfo]
remi-php73.repo:[remi-php73-test]
remi-php73.repo:[remi-php73-test-debuginfo]
remi-php74.repo:[remi-php74]
remi-php74.repo:[remi-php74-debuginfo]
remi-php74.repo:[remi-php74-test]
remi-php74.repo:[remi-php74-test-debuginfo]
remi-php80.repo:[remi-php80]
remi-php80.repo:[remi-php80-debuginfo]
remi-php80.repo:[remi-php80-test]
remi-php80.repo:[remi-php80-test-debuginfo]
remi.repo:[remi]
remi.repo:[remi-php55]
remi.repo:[remi-php56]
remi.repo:[remi-test]
remi.repo:[remi-debuginfo]
remi.repo:[remi-php55-debuginfo]
remi.repo:[remi-php56-debuginfo]
remi.repo:[remi-test-debuginfo]
remi-safe.repo:[remi-safe]
remi-safe.repo:[remi-safe-debuginfo]
https://linuxize.com/post/install-php-7-on-centos-7/
https://mirrors.tuna.tsinghua.edu.cn/remi/enterprise/7/php74/x86_64/
csdn 112163451