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
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
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
https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mariadb-php-lamp-stack-on-centos-8
To enable the EPEL repository for centOS 8
To install zip and other necessary extensions:
After the installation is finished, you’ll need to restart the Apache webserver in order to enable the PHP module:
Hope that this helps! Regards, Alex