Update the installed packages.
yum update
Install the REMI repository.
# CentOS/RHEL 6
rpm -Uvh https://rpms.remirepo.net/enterprise/remi-release-6.rpm
# CentOS/RHEL 7
rpm -Uvh https://rpms.remirepo.net/enterprise/remi-release-7.rpm
Check that the repositories are correctly installed.
yum repolist
In this case, PHP 7.0 and 7.1 will be installed
# PHP 7.0
yum install php70 php70-cli php70-php-devel php70-php-intl
# PHP 7.1
yum install php71 php71-cli php71-php-devel php70-php-intl
yum install php-devel
yum install php-pear
pecl channel-update pecl.php.net
yum install libyaz-devel
Set which version to use when compiling the extensions.
# PHP 7.0
pear config-set php_bin "/opt/remi/php70/root/usr/bin/php"
# PHP 7.1
pear config-set php_bin "/opt/remi/php71/root/usr/bin/php"
Force an upgrade to save changes.
pear upgrade --force
pecl install yaz
Use the following command to find where the extension was installed.
pear config-show | grep ext_dir
If necessary, move the extension to the correct PHP extension folder and add the extension to the corresponding php.ini file.
extension=yaz.so
- https://pecl.php.net/package/yaz
- https://www.php.net/manual/en/install.pecl.pear.php
- https://www.php.net/manual/en/install.pecl.phpize.php
- https://forum.centos-webpanel.com/php/how-to-add-yaz-extension-to-php/
- https://kence.org/2016/06/07/installing-yaz-for-php-on-ubuntu/
- https://pear.php.net/manual/en/guide.users.commandline.config.php