DirectAdmin Redis implementation

Erulezz

Verified User
Joined
Sep 14, 2015
Messages
932
Location
🇳🇱
I always install Redis with dnf install redis and use redis.conf to configure things. Thinking it would be the same implementation based on the docs, I removed Redis dnf remove redis and installed the latest Redis with da build redis.

Installation went fine, but the fact that TCP connections are apparently not supported (not described in the docs?) I wanted to undo everything but how can I remove the CustomBuild redis install?

Code:
da build set redis no
da build remove_redis
da build list_removals

Doesn't show redis for removal. I went ahead and updated every config to use the socket connection (probably better) but Laravel apps need some extra config to work with unix sockets.

Can this page: https://docs.directadmin.com/other-hosting-services/mariadb-mysql/redis.html

describe a bit more about the functionality (no TCP etc) and explain how we can configure DAs redis implementation?

Because of the Laravel issues I want to undo everything and uninstall Redis and just use the dnf package manager one.
 
another 2 cents i want to add:
x) write in the docu that port "0" have to be choosen, as most plugins need a port entry for redis
x) for use in joomla its needed to change a file for being able to use port 0:: /domains/domain.xy/public_html/administrator/components/com_config/forms/application.xml --> Lines 140 u. 895 min="1" -> min="0"
 
It is redis based on a socket. Pretty normal.

Only thing is that you might need some extra config if you use different database ID's on the same socket

For most scripts it is:

Code:
redis:///home/$USERNAME/.redis/redis.sock@1
redis:///home/$USERNAME/.redis/redis.sock@2
redis:///home/$USERNAME/.redis/redis.sock@3

etc. etc.

And for Symfony framework you use:

Code:
redis:///home/$USERNAME/.redis/redis.sock?dbindex=1
redis:///home/$USERNAME/.redis/redis.sock?dbindex=2
redis:///home/$USERNAME/.redis/redis.sock?dbindex=3

And $USERNAME is the real username of the user off course.


But you don't have to use it.
You can also uninstall via custombuild.

And then install redis server with your own config.

You run a RHEL based system so i woul first upgrade redis in the system.
Because DA installs new redis 7 but most RHEL based systems still use redis 5 or 6 (depending on os) RHEL 9 has redis 7 but below it is normally 5.

So do this:
Code:
#Check what redis version you can use:
 
dnf module list redis
 
#Update to latest version it is shown after the list command.Something like this:
Name                            Stream
redis                           5 [d][e]
redis                           6
 
#so latest is 6
dnf module switch-to redis:6

If you need per user redis instances you can also use this plugin.
Works still on DA we still use this. Very chill plugin.


If you run the installer it gives an error about some php.ini it cannot find, you can safely ignore it because it is looking for a redis.so in a wrong .ini file
 
You can also uninstall via custombuild.

And then install redis server with your own config.
That's the thing, I see no uninstall option in CustomBuild to properly cleanup CB installation.

Code:
da build set redis no
da build remove redis
da build remove_redis
da build list_removals (nothing)

Because DA installs new redis 7 but most RHEL based systems still use redis 5 or 6 (depending on os) RHEL 9 has redis 7 but below it is normally 5.
Thanks for the hint, AlmaLinux 8 is using v5 as default so I upgraded to v6.
 
Back
Top