Article Source: https://www.cnblogs.com/hello-tl/p/9404655.html
Share a more perfect Php7.2yum installation
0. Replace the Yum original
# yum Install epel--UVH https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
1. Install PHP
# yum Install php72w
2. Install PHP extensions to suit your needs
php72w-CLI php72w-Common php72w-devel php72w-Embedded php72w-fpm php72w-GD php72w-mbstring php72w-Mysqlnd php72w-Opcache php72w-PDO php72w-XML php72w php72w-Bcmath php72w-dba php72w-enchant php72w-IMAP PHP72W-interbasephp72w-Intl php72w-LDAP php72w-MCrypt php72w-ODBC php72w-pdo_dblib php72w-Pear php72w-pecl-APCU php72w-pecl-Imagick php72w-pecl-Xdebug php72w-Pgsql php72w-phpdbg php72w-Process php72w-Pspell php72w-Recode php72w-SNMP php72w-Soap php72w-Tidy php72w-Xmlrpc php72w-pecl-igbinary php72w-Intl php72w-memcached php72w-pecl-mongodb
3. View PHP Version
[Email protected] ~]# php-vphp7.2.7(CLI) (Built:jul1 2018 ,: A: -) (NTS) Copyright (c)1997-2018The PHP groupzend Engine v3.2.0, Copyright (c)1998-2018Zend Technologies with Zend opcache v7.2.7, Copyright (c)1999-2018, by Zend Technologies with Xdebug v2.6.0, Copyright (c)2002-2018, by Derick Rethans
4. Location of the configuration file
PHP.ini /etc/php.iniphp loading INI file /etc/php.d/*. iniphp-fpm.conf /etc/ php-fpm.conf php-fpm.pid /var/run/php-fpm/php-fpm.pidphp-fpm start php-fpm
5. Extended Swoole
1) Install dependent packages
-y install postgresql-devel # yum install glibc-headers gcc-c++ git-core gcc autoconf cmake libcurl4-openssl-dev OpenSSL libssl-dev build-essential zlibc zlib-bin libidn11-dev libidn11 minizip openssl--zxvf nghttp2# CD ng http2#. /-zxvf hiredis# CD hiredis# make# make install
2) Install Swoole
# pecl Install Swoole
3) Choose Yes or No in accordance with your own circumstances. This demonstration is all selected as Yes
Warning:channel"pecl.php.net"has updated it protocols, use"pecl channel-update pecl.php.net"To updatedownloading swoole-4.0.3. tgz. Starting to download Swoole-4.0.3. tgz (903,874bytes) ... what ... what ...????????????????????? ... done:903,874bytes304source files, buildingrunning:phpizeconfiguring for:P hp Api Version:20170718Zend Module Api No:20170718Zend Extension Api No:320170718Enable Debug/trace log support?[No]: Yesenable sockets supports?[No]: yesenable OpenSSL support?[No]: yesenable HTTP2 Support?[No]: yesenableAsync-redis support?[No]: yesenable mysqlnd Support?[No]: yesenable PostgreSQL coroutine Client support? [No]:
4. Installation Complete
Build complete. Don't forget to run'Make Test'.Running:make Install_root="/var/tmp/pear-build-rootpmvff4/install-swoole-4.0.3"installinstalling Shared extensions:/var/tmp/pear-build-rootpmvff4/install-swoole-4.0.3/usr/lib64/php/modules/Installing header files:/var/tmp/pear-build-rootpmvff4/install-swoole-4.0.3/usr/include/php/Running:find"/var/tmp/pear-build-rootpmvff4/install-swoole-4.0.3"| Xargs LS-Dils266121 4Drwxr-xr-x3Root root4096The1 at:xx/var/tmp/pear-build-rootpmvff4/install-swoole-4.0.3266172 4Drwxr-xr-x4Root root4096The1 at:xx/var/tmp/pear-build-rootpmvff4/install-swoole-4.0.3/usr526626 4Drwxr-xr-x3Root root4096The1 at:xx/var/tmp/pear-build-rootpmvff4/install-swoole-4.0.3/usr/include526627 4Drwxr-xr-x3Root root4096The1 at:xx/var/tmp/pear-build-rootpmvff4/install-swoole-4.0.3/usr/include/PHP526628 4Drwxr-xr-x3Root root4096The1 at:xx/var/tmp/pear-build-rootpmvff4/install-swoole-4.0.3/usr/include/php/ext526629 4Drwxr-xr-x3Root root4096The1 at:xx/var/tmp/pear-build-rootpmvff4/install-swoole-4.0.3/usr/include/php/ext/Swoole526631 8-rw-r--r--1Root root4300The1 at:xx/var/tmp/pear-build-rootpmvff4/install-swoole-4.0.3/usr/include/php/ext/swoole/config.h526630 4Drwxr-xr-x2Root root4096The1 at:xx/var/tmp/pear-build-rootpmvff4/install-swoole-4.0.3/usr/include/php/ext/swoole/include526623 4Drwxr-xr-x3Root root4096The1 at:xx/var/tmp/pear-build-rootpmvff4/install-swoole-4.0.3/usr/lib64526624 4Drwxr-xr-x3Root root4096The1 at:xx/var/tmp/pear-build-rootpmvff4/install-swoole-4.0.3/usr/lib64/PHP526625 4Drwxr-xr-x2Root root4096The1 at:xx/var/tmp/pear-build-rootpmvff4/install-swoole-4.0.3/usr/lib64/php/Modules526622 12268-rwxr-xr-x1Root root12560576The1 at:xx/var/tmp/pear-build-rootpmvff4/install-swoole-4.0.3/usr/lib64/php/modules/swoole.sobuild Process completed successfullyinstalling'/usr/lib64/php/modules/swoole.so'Installing'/usr/include/php/ext/swoole/config.h'Install Ok:channel://pecl.php.net/swoole-4.0.3Configuration option"Php_ini" isNotSetTo php.ini locationyou should add"extension=swoole.so"to PHP.ini
5. Join swoole.so Add INI
In/etc/php.d//etc/php.d/Swoole.ini ; Enable swoole Extension Module extension=Swoole.so:wq
6. View PHP Extensions
[PHP Modules] Apcubcmathbz2calendarcorectypecurldatedbadomenchantexiffileinfofilterftpgdgettextgmphashiconvigbinaryimagickimapintljsonl Daplibxmlmbstringmemcachedmongodbmysqlimysqlndodbcopensslpcntlpcrepdopdo_dblibpdo_mysqlpdo_odbcpdo_pgsqlpdo_ Sqlitepgsqlpharposixpspellreadlinerecoderedisreflectionsessionshmopsimplexmlsnmpsoapsocketssplsqlite3standardswoolesysvms Gsysvsemsysvshmtidytokenizerwddxxdebugxmlxmlreaderxmlrpcxmlwriterxslzend Opcachezipzlib[zend Modules]XdebugZend Opcache
Article Source: https://www.cnblogs.com/hello-tl/p/9404655.html
Yum installation php7.2