I’ve installed the php 7.4 on new system CentOS 8 but I’ve discovered that the ZIP extension is missing or not installed so I don’t know how to install with the new commands belongs to CentOS 8.
These steps I’ve done before:
> dnf module list php
# ---- OUTPUT ---- #
php 7.2 [d][e] common [d], devel, minimal PHP scripting language
php 7.3 common [d], devel, minimal PHP scripting language
php 7.4 common [d], devel, minimal PHP scripting language
> dnf module reset php
> dnf module enable php:7.4
> dnf module update php:7.4
> shutdown –r now
Thanks
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Accepted Answer
Success with command php-zip only without version to install from new CentOS 8 AppStream
Thanks @alexdo
> dnf install php-zip
Last metadata expiration check: 3:50:20 ago on Sun 05 Sep 2021 05:09:48 PM UTC.
Dependencies resolved.
========================================================================================================================================================
Package Architecture Version Repository Size
========================================================================================================================================================
Installing:
php-pecl-zip x86_64 1.18.2-1.module_el8.3.0+396+9a0d79d6 appstream 55 k
Installing dependencies:
libzip x86_64 1.6.1-1.module_el8.3.0+396+9a0d79d6 appstream 64 k
Hello, @HadyShaltout
You can follow our tutorial on How To Install Linux, Apache, MariaDB, PHP (LAMP) Stack on CentOS 8
To enable the EPEL repository for centOS 8
dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
To install zip and other necessary extensions:
- dnf install php74-zip
After the installation is finished, you’ll need to restart the Apache webserver in order to enable the PHP module:
- sudo systemctl restart httpd
Hope that this helps! Regards, Alex
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.