Add Software Source
#Install software source expansion tool apt -y install software-properties-common #To add a PHP PPA source, press Enter once add-apt-repository ppa:ondrej/php #Update software source cache apt update
#Add GPG wget -O /etc/apt/trusted.gpg.d/php.gpg https://mirror.xtom.com.hk/sury/php/apt.gpg #Install apt transport https apt-get install apt-transport-https #Add sury software source sh -c 'echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list' #Update software source cache apt-get update
Install PHP 7.2
apt install php7.2-fpm php7.2-mysql php7.2-curl php7.2-gd php7.2-mbstring php7.2-xml php7.2-xmlrpc php7.2-zip php7.2-opcache -y
Setting PHP 7.2
sed -i 's/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/' /etc/php/7.2/fpm/php.ini
Manage PHP 7.2
systemctl restart php7.2-fpm
Systemctl restart php7.2-fpm # Restart Systemctl start php7.2-fpm # Start Systemctl stop php7.2-fpm # Close Systemctl status php7.2-fpm # Check status
Update PHP 7.2
apt update apt upgrade -y
Install more components
root@service :~# apt-cache search php7.2 php-radius - radius client library for PHP php-http - PECL HTTP module for PHP Extended HTTP Support php-uploadprogress - file upload progress tracking extension for PHP php-yaml - YAML-1.1 parser and emitter for PHP php-mongodb - MongoDB driver for PHP php-apcu - APC User Cache for PHP php-imagick - Provides a wrapper to the ImageMagick library php-ssh2 - Bindings for the libssh2 library php-redis - PHP extension for interfacing with Redis php-memcached - memcached extension module for PHP, uses libmemcached php-apcu-bc - APCu Backwards Compatibility Module php-rrd - PHP bindings to rrd tool system php-uuid - PHP UUID extension php-memcache - memcache extension module for PHP php-zmq - ZeroMQ messaging bindings for PHP php-igbinary - igbinary PHP serializer php-msgpack - PHP extension for interfacing with MessagePack php-geoip - GeoIP module for PHP php-tideways - Tideways PHP Profiler Extension php-yac - YAC (Yet Another Cache) for PHP php-mailparse - Email message manipulation for PHP php-oauth - OAuth 1.0 consumer and provider extension php-gnupg - PHP wrapper around the gpgme library php-propro - propro module for PHP php-raphf - raphf module for PHP php-solr - PHP extension for communicating with Apache Solr server php-stomp - Streaming Text Oriented Messaging Protocol (STOMP) client module for PHP php-gearman - PHP wrapper to libgearman php-phalcon - full-stack PHP framework delivered as a C-extension php-ds - PHP extension providing efficient data structures for PHP 7 php-sass - PHP bindings to libsass - fast, native Sass parsing in PHP php-lua - PHP Embedded lua interpreter libapache2-mod-php7.2 - server-side, HTML-embedded scripting language (Apache 2 module) libphp7.2-embed - HTML-embedded scripting language (Embedded SAPI library) php7.2-bcmath - Bcmath module for PHP php7.2-bz2 - bzip2 module for PHP php7.2-cgi - server-side, HTML-embedded scripting language (CGI binary) php7.2-cli - command-line interpreter for the PHP scripting language php7.2-common - documentation, examples and common module for PHP php7.2-curl - CURL module for PHP php7.2-dba - DBA module for PHP php7.2-dev - Files for PHP7.2 module development php7.2-enchant - Enchant module for PHP php7.2-fpm - server-side, HTML-embedded scripting language (FPM-CGI binary) php7.2-gd - GD module for PHP php7.2-gmp - GMP module for PHP php7.2-imap - IMAP module for PHP php7.2-interbase - Interbase module for PHP php7.2-intl - Internationalisation module for PHP php7.2-json - JSON module for PHP php7.2-ldap - LDAP module for PHP php7.2-mbstring - MBSTRING module for PHP php7.2-mysql - MySQL module for PHP php7.2-odbc - ODBC module for PHP php7.2-opcache - Zend OpCache module for PHP php7.2-pgsql - PostgreSQL module for PHP php7.2-phpdbg - server-side, HTML-embedded scripting language (PHPDBG binary) php7.2-pspell - pspell module for PHP php7.2-readline - readline module for PHP php7.2-recode - recode module for PHP php7.2-snmp - SNMP module for PHP php7.2-soap - SOAP module for PHP php7.2-sqlite3 - SQLite3 module for PHP php7.2-sybase - Sybase module for PHP php7.2-tidy - tidy module for PHP php7.2-xml - DOM, SimpleXML, WDDX, XML, and XSL module for PHP php7.2-xmlrpc - XMLRPC-EPI module for PHP php7.2-zip - Zip module for PHP php7.2-xsl - XSL module for PHP (dummy) php7.2 - server-side, HTML-embedded scripting language (metapackage) php7.2-sodium - libsodium module for PHP
Copyright notice: This is an original article, and the copyright belongs to Rat's Blog All, please indicate the source for reprinting!
Link to this article: https://www.moerats.com/archives/428/
If the tutorial needs to be updated, or 404 appears on the related link, you can leave a comment below the article.