linux yum 安装php7.2

// 1. 添加安装源
# rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
# rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
# yum localinstall –nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-7.noarch.rpm
# yum search php72
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * epel: mirrors.tuna.tsinghua.edu.cn
 * rpmfusion-free-updates: mirrors.ustc.edu.cn
 * webtatic: us-east.repo.webtatic.com
==================================================================================== N/S matched: php72 =====================================================================================
mod_php72w.x86_64 : PHP module for the Apache HTTP Server
php72w-bcmath.x86_64 : A module for PHP applications for using the bcmath library
php72w-cli.x86_64 : Command-line interface for PHP
php72w-common.x86_64 : Common files for PHP
php72w-dba.x86_64 : A database abstraction layer module for PHP applications
php72w-devel.x86_64 : Files needed for building PHP extensions
php72w-embedded.x86_64 : PHP library for embedding in applications
php72w-enchant.x86_64 : Enchant spelling extension for PHP applications
php72w-fpm.x86_64 : PHP FastCGI Process Manager
php72w-gd.x86_64 : A module for PHP applications for using the gd graphics library
php72w-imap.x86_64 : A module for PHP applications that use IMAP
php72w-interbase.x86_64 : A module for PHP applications that use Interbase/Firebird databases
php72w-intl.x86_64 : Internationalization extension for PHP applications
php72w-ldap.x86_64 : A module for PHP applications that use LDAP
php72w-mbstring.x86_64 : A module for PHP applications which need multi-byte string handling
.....


// 2.安装php及扩展(根据需求安装相关扩展包)
# yum install php72w-common php72w-fpm php72w-opcache php72w-gd php72w-mysqlnd php72w-mbstring php72w-pecl-redis php72w-pecl-memcached php72w-devel

// php配置文件
# find / -name php.ini
/etc/php.ini

// php配置文件
# find / -name php-fpm.conf
/etc/php-fpm.conf
/usr/lib/tmpfiles.d/php-fpm.conf

 

你可能感兴趣的:(php)