Redis - official way of installing and configuring in Virtualmin

Continuing the discussion from Redis Vs Opcache Ubuntu 20.04:

Dear community, what would be the recommended (aka official) way of installing Redis in Virtualmin. Also, is there a special UI to manage Redis server, like e.g. create password, limit the memory dedicated to the server, etc. Please advise. – Thanks, Anton

Operating system: Ubuntu
OS version: 20.04 LTS

There is no official way. Use whatever is appropriate for your distro and version. Your operating system is still the same, Virtualmin is just managing some parts of it.

There is no Webmin or Virtualmin module for Redis that I know of (certainly none from us, though maybe someone else has implemented one, but I don’t know of one); it hasn’t come up much. One could certainly build one without a lot of work. There are a bunch of database plugins to look to for examples (Oracle and SQLite are very basic, and don’t have accompanying standalone Webmin modules, so might be a useful place to look for very simple examples that aren’t much code but handle the basics of creating databases, users, etc.).

I don’t know anything about Redis, so I can’t make any suggestions.

Thanks Joe. Could you please clarify if installing packages NOT through Virtualmin will still keep it possible to backup/restore server configuration through Virtualmin? There might be lack of understanding here of how free I am to install various packages and modules manually in command line in a way that keeps Virtualmin happy and functional.

For instance, I just installed the latest Redis as per their documentation:

sudo add-apt-repository ppa:redislabs/redis
sudo apt-get update
sudo apt-get install redis

I now wonder what would be the best way to install phpredis php extension.

I’m used to managing servers from command line, but in this particular case, I’m helping a client of mine who prefers to have “some” control over the server from a UI, hence using Virtualmin.

I’m not sure how far I can go by tuning the server manually from command line while keeping my changes compatible to and manageable by Virtualmin. Your advice is appreciated.

To make it even clearer, my Redis version on the server is now v=6.2.1.

However, when I run apt-cache policy php-redis, I get this:

  Installed: (none)
  Candidate: 5.1.1+4.3.0-1
  Version table:
     5.1.1+4.3.0-1 500
        500 focal/universe amd64 Packages

which makes me think installing php-redis this way is a bad idea because it will want Redis version 5.1.1 while I just installed version 6.x. Now, if I start installing custom php modules or even building them from source, how will it affect Virtualmin? I’m a bit lost here.

UPD. Also, what about Pecl packages. Is it a good idea to install from command line like e.g. pecl install redis ?

Virtualmin is not your OS. Virtualmin only cares about the packages it manages…and the packages it manages are installed using your operating system’s package manager, and using the OS standard repositories whenever possible. Virtualmin itself is installed using your operating system package manager (apt-get/dpkg on Ubuntu).

Will it? Does the php-redis version lock with the redis version? That would be unusual, I think. Most of the time PHP module packages have a version unrelated to the version of the software they bind to. e.g.

$ apt-cache madison php-mysql
 php-mysql | 1:7.2+60ubuntu1 | bionic/main amd64 Packages
$ apt-cache madison mysql-server
mysql-server | 5.7.33-0ubuntu0.18.04.1 | bionic-updates/main amd64 Packages

Actually, I just checked…there is no relation between the php-redis version and redis version. I think you’re just confusing two related but different things. redis is Redis, php-redis is PHP bindings for Redis. You need them both, if you’ll be using Redis from PHP and want to use those bindings. They have different and unconnected versions.

Why would it effect Virtualmin?

As long as you don’t break PHP, it doesn’t matter. We don’t even use PHP. We just configure it for you, we don’t depend on it in any way.

If you can install a package using the OS package manager and standard repositories you should do so. Third party repositories should be used with caution, only when necessary, and only after testing. redis and php-redis packages are available in the Ubuntu repositories, I’d recommend you use those. Installing from source should be a last resort (and, I never allow from-source installs on my production servers). But, that has nothing to do with Virtualmin. That’s me offering you advice based on my decades of systems management. Virtualmin don’t care about Redis.

1 Like

Many thanks, it is clearer now. Key takeaways:

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.