Tôi đã sử dụng,
yum install php-pecl-zip
Tôi đang gặp lỗi sau,
Loaded plugins: fastestmirror, replace
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: centos.mirror.snu.edu.in
* epel: epel.dionipe.id
* extras: centos.mirror.snu.edu.in
* updates: centos.mirror.snu.edu.in
* webtatic: uk.repo.webtatic.com
//downloads-distro.mongodb.org/repo/redhat/os/x86_64/repodata/repomd.xml: [Errno 14] Downloaded more than max size for //www.mongodb.com/: 113752 > 102400
Trying other mirror.
Resolving Dependencies
--> Running transaction check
---> Package php71w-common.x86_64 0:7.1.33-1.w6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
========================================================================================================================================================================
Package Arch Version Repository Size
========================================================================================================================================================================
Installing:
php71w-common x86_64 7.1.33-1.w6 webtatic 1.2 M
Transaction Summary
========================================================================================================================================================================
Install 1 Package[s]
Total size: 1.2 M
Installed size: 8.5 M
Transaction Check Error:
file /etc/php.ini from install of php71w-common-7.1.33-1.w6.x86_64 conflicts with file from package php-common-7.3.12-1.el6.remi.x86_64
file /usr/lib64/php-zts/modules/bz2.so from install of php71w-common-7.1.33-1.w6.x86_64 conflicts with file from package php-common-7.3.12-1.el6.remi.x86_64
file /usr/lib64/php/modules/bz2.so from install of php71w-common-7.1.33-1.w6.x86_64 conflicts with file from package php-common-7.3.12-1.el6.remi.x86_64
file /usr/lib64/php-zts/modules/calendar.so from install of php71w-common-7.1.33-1.w6.x86_64 conflicts with file from package php-common-7.3.12-1.el6.remi.x86_64
file /usr/lib64/php/modules/calendar.so from install of php71w-common-7.1.33-1.w6.x86_64 conflicts with file from package php-common-7.3.12-1.el6.remi.x86_64
file /usr/lib64/php-zts/modules/ctype.so from install of php71w-common-7.1.33-1.w6.x86_64 conflicts with file from package php-common-7.3.12-1.el6.remi.x86_64
file /usr/lib64/php/modules/ctype.so from install of php71w-common-7.1.33-1.w6.x86_64 conflicts with file from package php-common-7.3.12-1.el6.remi.x86_64
Phiên bản PHP của tôi là ____10 như sau,
PHP 7.3.12 [cli] [built: Nov 19 2019 12:37:39] [ NTS ]
Copyright [c] 1997-2018 The PHP Group
Zend Engine v3.3.12, Copyright [c] 1998-2018 Zend Technologies
Epel Repo như sau,
Installed:
epel-release.noarch 0:6-8
Vấn đề trong máy chủ của tôi trong khi cài đặt tiện ích mở rộng PHP-ZIP là gì?
Php 7.3 là bản phát hành ổn định mới nhất của PHP. Có thể các kho lưu trữ YUM phổ biến đang cung cấp các gói RPM cho PHP 7. Bài viết này đang sử dụng các kho lưu trữ Remi và Epel Yum để cài đặt các gói cần thiết trên hệ thống của bạn. Bài viết này sẽ giúp bạn cài đặt Php 7.3, Php 7.2, Php 7.1 trên các hệ thống Centos & Rhel 6.
- Cài đặt Php7, Nginx và MySQL trên centos/redhat
Định cấu hình kho Yum
Trước hết, bạn cần bật các kho lưu trữ Remi và Epel Yum trên hệ thống của bạn. Sử dụng lệnh sau để cài đặt kho lưu trữ Epel trên hệ thống Centos và Red Hat 7/6 của bạn
Sử dụng lệnh này để cài đặt kho lưu trữ yum phát hành epel
yum install epel-release
Và bây giờ thực hiện một trong các lệnh sau theo phiên bản hệ điều hành của bạn để cài đặt kho lưu trữ REMI.
rpm -Uvh //rpms.famillecollet.com/enterprise/remi-release-6.rpm
Hệ thống của bạn được chuẩn bị cho việc cài đặt PHP từ kho YUM. Sử dụng một trong các lệnh sau để cài đặt Php 7.3 hoặc Php 7.2 hoặc Php 7.1 trên hệ thống của bạn dựa trên các yêu cầu của bạn.
## Install PHP 7.3 yum --enablerepo=remi-php73 install php ## Install PHP 7.2 yum --enablerepo=remi-php72 install php ## Install PHP 7.1 yum --enablerepo=remi-php71 install php
Tôi đã cài đặt phiên bản mới nhất Php 7.3 trên hệ thống của mình. Bây giờ chạy lệnh sau để kiểm tra phiên bản PHP hoạt động hiện tại trên hệ thống của tôi.
php -v PHP 7.3.11 [cli] [built: Oct 22 2019 12:34:50] [ NTS ] Copyright [c] 1997-2018 The PHP Group Zend Engine v3.3.11, Copyright [c] 1998-2018 Zend Technologies
Cài đặt các mô -đun PHP
Bạn cũng có thể cần cài đặt các mô -đun PHP bổ sung dựa trên các yêu cầu ứng dụng của bạn. Lệnh dưới đây sẽ cài đặt một số mô -đun PHP hữu ích hơn.
### For PHP 7.3 yum --enablerepo=remi-php73 install php-xml php-soap php-xmlrpc php-mbstring php-json php-gd php-mcrypt ### For PHP 7.2 yum --enablerepo=remi-php72 install php-xml php-soap php-xmlrpc php-mbstring php-json php-gd php-mcrypt ### For PHP 7.1 yum --enablerepo=remi-php71 install php-xml php-soap php-xmlrpc php-mbstring php-json php-gd php-mcrypt
Bạn có thể chạy lệnh sau để tìm kiếm các mô -đun PHP có sẵn khác trong kho lưu trữ yum được cấu hình. Dưới đây, lệnh tìm kiếm lệnh cho tất cả các mô -đun cho PHP 7.3.
yum --enablerepo=remi-php73 search php | grep php73 php73.x86_64 : Package that installs PHP 7.3 php73-php.x86_64 : PHP scripting language for creating dynamic web sites php73-php-bcmath.x86_64 : A module for PHP applications for using the bcmath php73-php-brotli.x86_64 : Brotli Extension for PHP php73-php-cli.x86_64 : Command-line interface for PHP php73-php-common.x86_64 : Common files for PHP ... ...