Installing REDIS

I am in need of REDIS and tried to install it from the DietPi software management system. In doing so I get version 3.1.1-1. This implies it is an apt-get install.

I have been told by someone more knowledgeable than me :smiley: that the ‘correct’ way to install REDIS is via PECL. If I do this instead, I get version redis-3.1.6. For me this is necessary as there are some issues around float numbers in versions before 3.1.2.

Could the install be modified to install REDIS with PECL?

I am personally against this as default install method. Of course we could install all PHP modules from PECL and would theoretically get newer version for all of them. But:

  • It would need the whole php-dev package with overhead to be installed.
  • I am not sure, if the configuration stuff is done then as well, or we would need to implement and maintain a larger installation and configuration code.
  • The packages and their dependencies cannot be removed as clean and easy as with packages.
  • The versions packed within official Debian repo are well proven to work with the related distro version.
  • In the end, using PECL stays a developer method, not an end user one. And as old issues were fixed, new issues were implemented.
  • About Redis explicitly I didn’t face any issue with the Debian Stretch version for years and there would have been a minor patch, if it was too serious. But might depend on usage of course.

But to be not misunderstood:

  • I personally love to stay at current edge versions.
  • I use Raspbian Buster (testing) on kernel 4.14 with PHP7.2 and use quite a lot beta and testing edge stuff where available.
  • But I know/take the risk and know how to deal with it, if something breaks. But this is nothing I would face our end users with.

We already need (if there is no package available) the install many of our software titles manual ways and its way more work to maintain that code, take care the changing dependencies manually and try to clean everything up on uninstall. In the end providing install methods for these titles, not easily via APT installable, is also one strength and task of DietPi. But we should try to avoid, where not necessary, at last also because of limited man power.

Haha gotten long text, but I hope you get my point :smiley:.

Yep OK, no bother :smiley:

But if you face issues with current version, would be nice to know indeed, who knows what errors on my or other servers stay just unrecognized. :smiley:
And you should be able to just install current php-redis via PECL just over the APT installed one and it should work. There should be several guides how to do this via php-dev, it is not too hard. Just do dietpi-backup before, as always recommended :wink:.

You’re so right, MichaIng. This bears repeating, always have the dietpi-backup. I’ve learned this the hard way lol.