Skip to main content
Backdroper.com
Μαθαίνοντας το Backdrop CMS
  • Αρχική
  • Γιατί Backdrop CMS
  • Επικοινωνία
  • Linux errors and fixes

Extend CloudPanel's Redis with Igbinary, lz4, zstd, lzf and liblz4

  1. Αρχική

Σαβ, 23/08/2025 - 9:55πμ από backdroper

This post shows how you can simply extend Redis with a few usefull stuff. Those are required if you wanna get the most out of Object Cache Pro. Please note that I used PHP8.4 in that example!,

  1. Log in to your VPS with the main (root) user.,
  1. Make a backup  of your instance.,
  1. Install the dev package for the PHP Version.,

apt update && apt -y install php8.4-dev

  1. Go to https://pecl.php.net/ and search for the extension redis.,
  1. Download the tgz via cURL (This command will get you the latest version):,

curl -O https://pecl.php.net/get/redis

  1. Extract the tgz (edit the command to fit the downloaded redis version):,

tar xf redis-xxx.tgz

  1. phpize the extension:,

cd redis-xxx
phpize8.4

  1. Before we compile and build the redis extension we need to install a few of the following things to make it work:,

sudo apt install liblz4-dev
git clone --recursive --depth=1 https://github.com/kjdev/php-ext-lz4.git
cd php-ext-lz4
./configure --with-php-config=/usr/bin/php-config8.4
make
make install
apt-get -y install libzstd-dev
curl -O https://pecl.php.net/get/igbinary
tar xf igbinary-xxx.tgz (Edit to fit the latest version's tgz file)
cd igbinary-xxx (Edit to fit the latest version's folder name)
phpize8.4
./configure --with-php-config=/usr/bin/php-config8.4
make
make install

  1. After we installed the required extensions and packages we should edit the php.ini files at /etc/php/8.4/cli/php.ini and /etc/php/8.4/fpm/php.ini to make sure we enabled the extensions.,

# THIS IS THE END OF THE PHP.INI FILE!
[ffi]
; FFI API restriction. Possible values:
; "preload" - enabled in CLI scripts and preloaded files (default)
; "false"   - always disabled
; "true"    - always enabled
;ffi.enable=preload
; List of headers files to preload, wildcard patterns allowed.
;ffi.preload=
imagick.skip_version_check=true
;zend_extension=ioncube_loader_lin_8.4.so
extension=memcached.so
extension=redis.so
extension=imagick.so
extension=lz4.so
extension=igbinary.so

  1. Now we should go back to redis's folder and do the installation.,

cd redis-xxx
./configure --with-php-config=/usr/bin/php-config8.4 --enable-redis-igbinary --enable-redis-lz4 --enable-redis-zstd --enable-redis-lzf --with-liblz4
make
make install

  1. Restart the PHP-FPM service:,

systemctl restart php8.4-fpm

  1. To check if the extension is loaded for FPM, you can check the phpinfo or the WordPress control panel since Object Cache Pro shows if we were successful.,

 (edited)


 

CloudPanel
Tutorials
  • Συνδεθείτε για να δημοσιεύσετε σχόλια

ObjectCachePro.png

Θέματα

  • Drupal
  • Linux
  • Modules
  • Security
  • Theming
  • Tutorials
  • Γενικά
Powered by Backdrop CMS