ZIP - This extension enables you to transparently read or write ZIP compressed archives and the files inside them. If you would like to install the ZIP-PHP extension in your CentOS or Ubuntu operating system we have the steps below,

CentOS:

$ sudo yum-config-manager --enable remi-php72
$ yum update
$ sudo yum install php-pecl-zip


or

$ sudo yum install php-zip 

Ubuntu:

$ sudo apt-get install php7.2-zip

or
$ sudo apt-get install php-zip


Configure the php-zip extension in your PHP config file using the command below and restart the web server,

$ sudo echo "extension=zip.so" >> /etc/php.d/zip.ini


For Ubuntu Operating system use the command below

NGINX:

systemct restart nginx.service


Apache:

systemct restart apache2.service


For  CentOS operating system use the command below,

NGINX:

systemct restart nginx.service


Apache:

systemct restart httpd.service