PHP学习-5 安装PHP

本文介绍了在CentOS8系统上如何快速安装PHP7.4,包括添加源库、使用YUM安装PHP、查看PHP状态、启动PHP及设置开机自启动。在安装过程中特别提到,与CentOS7相比,CentOS8的配置有所不同,可能会导致运行环境搭建时出现错误,需要调整相应配置。
摘要由CSDN通过智能技术生成

1 PHP快速安装

  • PHP源添加
    使用YUM快速安装php,首先需要添加两个源库文件。
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-8.rpm
Retrieving https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
warning: /var/tmp/rpm-tmp.AFqXwr: Header V3 RSA/SHA256 Signature, key ID 2f86d6a1: NOKEY
Verifying...                          ################################# [100%]
Preparing...                          ################################# [100%]
Updating / installing...
   1:epel-release-8-7.el8             ################################# [100%]

Retrieving http://rpms.remirepo.net/enterprise/remi-release-8.rpm
warning: /var/tmp/rpm-tmp.IGwNHd: Header V4 RSA/SHA256 Signature, key ID 5f11735a: NOKEY
Verifying...                          ################################# [100%]
Preparing...                          ################################# [100%]
Updating / installing...
   1:remi-release-8.1-2.el8.remi      ################################# [100%]
  • PHP查看
yum search php74*
================================================= Name & Summary Matched: php74* ==================================================
php74-php-pecl-psr-devel.x86_64 : php74-php-pecl-psr developer files (header)
php74-php-pecl-raphf-devel.x86_64 : php74-php-pecl-raphf developer files (header)
php74-php-pecl-propro-devel.x86_64 : php74-php-pecl-propro developer files (header)
php74-php-pecl-yaconf-devel.x86_64 : php74-php-pecl-yaconf developer files (header)
php74-php-pecl-xmldiff-devel.x86_64 : php74-php-pecl-xmldiff developer files (header)
php74-php-zephir-parser-devel.x86_64 : php74-php-zephir-parser developer files (headers)
php74-php-pecl-http-message-devel.x86_64 : php74-php-pecl-http-message developer files (headers)
====================================================== Name Matched: php74* =======================================================
php74.x86_64 : Package that installs PHP 7.4
php74-php.x86_64 : PHP scripting language for creating dynamic web sites
php74-build.x86_64 : Package shipping basic build configuration
php74-php-gd.x86_64 : A module for PHP applications for using the gd graphics library
php74-xhprof.noarch : A Hierarchical Profiler for PHP - Web interface
php74-zephir.noarch : Zephir language for creation of extensions for PHP.
php74-php-ast.x86_64 : Abstract Syntax Tree
php74-php-cli.x86_64 : Command-line interface for PHP
php74-php-dba.x86_64 : A database abstraction layer module for PHP applications
php74-php-dbg.x86_64 : The interactive PHP debugger
php74-php-ffi.x86_64 : Foreign Function Interface
php74-php-fpm.x86_64 : PHP FastCGI Process Manager
php74-php-gmp.x86_64 : A module for PHP applications for using the GNU MP library
php74-php-lz4.x86_64 : LZ4 Extension for PHP
php74-php-pdo.x86_64 : A database access abstraction module for PHP applications
php74-php-xml.x86_64 : A module for PHP applications which use XML
php74-runtime.x86_64 : Package that handles php74 Software Collection.
php74-php-imap.x86_64 : A module for PHP applications that use IMAP
php74-php-intl.x86_64 : Internationalization extension for PHP applications
php74-php-json.x86_64 : JavaScript Object Notation extension for PHP
php74-php-ldap.x86_64 : A module for PHP applications that use LDAP
php74-php-oci8.x86_64 : A module for PHP applications that use OCI8 databases
php74-php-odbc.x86_64 : A module for PHP applications that use ODBC databases
php74-php-pear.noarch : PHP Extension and Application Repository framework
php74-php-pggi.x86_64 : GTK bindings
php74-php-snmp.x86_64 : A module for PHP applications that query SNMP-managed devices
php74-php-soap.x86_64 : A module for PHP applications that use the SOAP protocol
php74-php-tidy.x86_64 : Standard PHP module provides tidy library support
php74-php-zstd.x86_64 : Zstandard extension
php74-scldevel.x86_64 : Package shipping development files for php74
php74-unit-php.x86_64 : PHP module for NGINX Unit
php74-php-devel.x86_64 : Files needed for building PHP extensions
php74-php-pgsql.x86_64 : A PostgreSQL database module for PHP
php74-php-pinba.x86_64 : Client extension for Pinba statistics server
php74-php-bcmath.x86_64 : A module for PHP applications for using the bcmath library
php74-php-brotli.x86_64 : Brotli Extension for PHP
php74-php-common.x86_64 : Common files for PHP
php74-php-pspell.x86_64 : A module for PHP applications for using pspell interfaces
php74-php-snappy.x86_64 : Snappy Extension for PHP
php74-php-sodium.x86_64 : Wrapper for the Sodium cryptographic library
php74-php-sqlsrv.x86_64 : Microsoft Drivers for PHP for SQL Server
php74-php-xmlrpc.x86_64 : A module for PHP applications which use the XML-RPC protocol
php74-php-enchant.x86_64 : Enchant spelling extension for PHP applications
php74-php-libvirt.x86_64 : PHP language binding for Libvirt
php74-php-mysqlnd.x86_64 : A module for PHP applications that use MySQL databases
php74-php-opcache.x86_64 : The Zend OPcache
php74-php-pecl-ds.x86_64 : Data Structures for PHP
php74-php-pecl-ev.x86_64 : Provides interface to libev library
php74-php-pecl-pq.x86_64 : PostgreSQL client library (libpq) binding
php74-php-pecl-uv.x86_64 : Libuv wrapper
php74-php-process.x86_64 : Modules for PHP script using system process interfaces
php74-php-embedded.x86_64 : PHP library for embedding in applications
php74-php-mbstring.x86_64 : A module for PHP applications which need multi-byte string handling
php74-php-pecl-csv.x86_64 : CSV PHP extension
php74-php-pecl-dio.x86_64 : Direct I/O functions
php74-php-pecl-eio.x86_64 : Provides interface to the libeio library
php74-php-pecl-env.x86_64 : Load environment variables
php74-php-pecl-lua.x86_64 : Embedded lua interpreter
php74-php-pecl-lzf.x86_64 : Extension to handle LZF de/compression
php74-php-pecl-nsq.x86_64 : PHP extension for NSQ client
php74-php-pecl-psr.x86_64 : PSR interfaces
php74-php-pecl-rar.x86_64 : PHP extension for reading RAR archives
php74-php-pecl-rrd.x86_64 : PHP Bindings for rrdtool
php74-php-pecl-sdl.x86_64 : Simple DirectMedia Layer for PHP
php74-php-pecl-svn.x86_64 : PHP Bindings for the Subversion Revision control system
php74-php-pecl-vld.x86_64 : Dump the internal representation of PHP scripts
php74-php-pecl-yac.x86_64 : Lockless user data cache
php74-php-pecl-yaf.x86_64 : Yet Another Framework
php74-php-pecl-yar.x86_64 : Light, concurrent RPC framework
php74-php-pecl-yaz.x86_64 : Z39.50/SRU client
php74-php-pecl-zip.x86_64 : Une extension de gestion des ZIP
php74-php-pecl-zmq.x86_64 : ZeroMQ messaging
php74-php-phalcon4.x86_64 : Phalcon Framework
php74-php-componere.x86_64 : Composing PHP classes at runtime
php74-php-litespeed.x86_64 : LiteSpeed Web Server PHP support
php74-php-maxminddb.x86_64 : MaxMind DB Reader extension
php74-php-pdo-dblib.x86_64 : PDO driver for Microsoft SQL Server and Sybase databases
php74-php-pecl-amqp.x86_64 : Communicate with any AMQP compliant server
php74-php-pecl-apcu.x86_64 : APC User Cache
php74-php-pecl-apfd.x86_64 : Always Populate Form Data
php74-php-pecl-fann.x86_64 : Wrapper for FANN Library
php74-php-pecl-grpc.x86_64 : General RPC framework
php74-php-pecl-http.x86_64 : Extended HTTP support
php74-php-pecl-krb5.x86_64 : Kerberos authentification extension
php74-php-pecl-pcov.x86_64 : Code coverage driver
php74-php-pecl-ssh2.x86_64 : Bindings for the libssh2 library
php74-php-pecl-sync.x86_64 : Named and unnamed synchronization objects
php74-php-pecl-uopz.x86_64 : User Operations for Zend
php74-php-pecl-uuid.x86_64 : Universally Unique Identifier extension for PHP
php74-php-pecl-vips.x86_64 : PHP extension for interfacing with libvips
php74-php-pecl-wddx.x86_64 : Web Distributed Data Exchange
php74-php-pecl-yaml.x86_64 : PHP Bindings for yaml
php74-php-phpiredis.x86_64 : Client extension for Redis
php74-php-smbclient.x86_64 : PHP wrapper for libsmbclient
php74-php-wkhtmltox.x86_64 : HTML Converter
php74-php-pecl-cmark.x86_64 : CommonMark extension
php74-php-pecl-dbase.x86_64 : dBase database file access functions
php74-php-pecl-druid.x86_64 : A Druid driver for PHP
php74-php-pecl-event.x86_64 : Provides interface to libevent library
php74-php-pecl-geoip.x86_64 : Extension to map IP addresses to geographic places
php74-php-pecl-gnupg.x86_64 : Wrapper around the gpgme library
php74-php-pecl-mysql.x86_64 : MySQL database access functions
php74-php-pecl-oauth.x86_64 : PHP OAuth consumer extension
php74-php-pecl-parle.x86_64 : Parsing and lexing
php74-php-pecl-raphf.x86_64 : Resource and persistent handles factory
php74-php-pecl-solr2.x86_64 : API orientée objet pour Apache Solr
php74-php-pecl-stats.x86_64 : Routines for statistical computation
php74-php-pecl-stomp.x86_64 : Stomp client extension
php74-php-pecl-taint.x86_64 : XSS code sniffer
php74-php-pecl-xattr.x86_64 : Ex
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值