国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 網(wǎng)站 > 幫助中心 > 正文

如何在CentOS和RHEL上安裝PHP7

2024-07-09 22:39:25
字體:
來源:轉載
供稿:網(wǎng)友

php7.3是php的最新穩(wěn)定版本,yum存儲庫正在為php7提供RPM包。本篇文章將使用remi和epel-yum存儲庫在你的系統(tǒng)上安裝所需的軟件包,將介紹在CentOS和Redhat7服務器上安裝php 7.3、php 7.2、php 7.1。

設置yum存儲庫

首先,需要在系統(tǒng)上啟用Remi和EPEL yum存儲庫。使用以下命令在CentOS和Red Hat 7/6系統(tǒng)上安裝EPEL存儲庫

使用此命令在系統(tǒng)上安裝EPEL yum存儲庫

$ sudo yum install epel-release

現(xiàn)在根據(jù)你的操作系統(tǒng)版本執(zhí)行以下命令之一以安裝REMI存儲庫。

$ sudo rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm

在CentOS上安裝php 7

你的系統(tǒng)已準備好從yum存儲庫安裝PHP。根據(jù)你的需求,使用以下命令之一在系統(tǒng)上安裝php 7.3、php 7.2或php 7.1。

  1. ## Install PHP 7.3  
  2.  
  3. $ yum --enablerepo=remi-php73 install php 
  4.  
  5. ## Install PHP 7.2  
  6.  
  7. $ yum --enablerepo=remi-php72 install php 
  8.  
  9. ## Install PHP 7.1  
  10.  
  11. $ yum --enablerepo=remi-php71 install php 

假設已經(jīng)在系統(tǒng)上安裝了最新版本的php 7.3?,F(xiàn)在運行下面的命令來檢查系統(tǒng)上當前運行的PHP版本。

  1. $ php -v 
  2.  
  3. PHP 7.3.0 (cli) (built: Dec  4 2018 16:12:20) ( NTS ) 
  4.  
  5. Copyright (c) 1997-2018 The PHP Group 
  6.  
  7. Zend Engine v3.3.0-dev, Copyright (c) 1998-2018 Zend Technologies 

安裝PHP模塊

可能還需要根據(jù)應用程序需求安裝其他PHP模塊。下面的命令將安裝一些更有用的PHP模塊。

  1. ### For PHP 7.3 
  2.  
  3. $ yum --enablerepo=remi-php73 install php-xml php-soap php-xmlrpc php-mbstring php-json php-gd php-mcrypt 
  4.  
  5.  
  6.  
  7. ### For PHP 7.2 
  8.  
  9. $ yum --enablerepo=remi-php72 install php-xml php-soap php-xmlrpc php-mbstring php-json php-gd php-mcrypt 
  10.  
  11.  
  12.  
  13. ### For PHP 7.1 
  14.  
  15. $ yum --enablerepo=remi-php71 install php-xml php-soap php-xmlrpc php-mbstring php-json php-gd php-mcrypt 

可以運行以下命令來搜索配置yum存儲庫下的其他可用PHP模塊。下面的示例命令將搜索PHP 7.3的所有模塊。

  1. $ yum --enablerepo=remi-php73 search php | grep php73 
  2.  
  3.  
  4.  
  5. php73.x86_64 : Package that installs PHP 7.3 
  6.  
  7. php73-php.x86_64 : PHP scripting language for creating dynamic web sites 
  8.  
  9. php73-php-bcmath.x86_64 : A module for PHP applications for using the bcmath 
  10.  
  11. php73-php-brotli.x86_64 : Brotli Extension for PHP 
  12.  
  13. php73-php-cli.x86_64 : Command-line interface for PHP 
  14.  
  15. php73-php-common.x86_64 : Common files for PHP 
  16.  
  17. php73-php-componere.x86_64 : Composing PHP classes at runtime 
  18.  
  19. php73-php-dba.x86_64 : A database abstraction layer module for PHP applications 
  20.  
  21. php73-php-dbg.x86_64 : The interactive PHP debugger 
  22.  
  23. php73-php-devel.x86_64 : Files needed for building PHP extensions 
  24.  
  25. php73-php-embedded.x86_64 : PHP library for embedding in applications 
  26.  
  27. php73-php-enchant.x86_64 : Enchant spelling extension for PHP applications 
  28.  
  29. php73-php-fpm.x86_64 : PHP FastCGI Process Manager 
  30.  
  31. php73-php-gd.x86_64 : A module for PHP applications for using the gd graphics 
  32.  
  33. ... 
  34.  
  35. ... 

發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 前郭尔| 田阳县| 南宫市| 金溪县| 晋州市| 巨野县| 牡丹江市| 四子王旗| 北海市| 资兴市| 芜湖市| 垦利县| 连云港市| 仁寿县| 峨眉山市| 甘泉县| 宜都市| 顺义区| 上杭县| 农安县| 兴文县| 高邑县| 万安县| 阿瓦提县| 梁平县| 门头沟区| 莆田市| 岑巩县| 油尖旺区| 双牌县| 津市市| 南漳县| 全南县| 健康| 任丘市| 开阳县| 收藏| 皋兰县| 永和县| 耒阳市| 昌宁县|