Where to find redis.conf ?

peps03

Verified User
Joined
Oct 24, 2013
Messages
192
Location
Amsterdam
I removed the old version of redis using: "yum remove redis".

I then installed redis 6.2.4 via the new custombuild option.

The old redis was running on a custom port. So I need to change this in the new redis install. But, there is no redis.conf to be found on the server:

Code:
find /* redis.conf
returns nothing.

Also redis seems to be running on a socket now instead of a port. But I can't find the socket either.

Please advise.
 
When you enable redis for a user in DirectAdmin GUI, it creates /home/user/.redis/redis.sock socket there (and shows the path there as well). It does not listen on any port and it is not using redis.conf (all the settings are set in start/stop script /etc/systemd/system/[email protected]).
 
Is it available already?! Nice!

I'll need it for a few instances. Where / how do I upgrade and how do I activate the pro-pack? (We buy some of our licenses from you btw and some from one of our vps hosting providers, who answered an email to me they probably won't be offering the pro-pack anytime soon. Can i still added it to the licenses we get via them?)

For this instance / case in particular, we will not take the pro-pack as it only hosts 1 website. How should we proceed in this case?
 
Is it available already?! Nice!

I'll need it for a few instances. Where / how do I upgrade and how do I activate the pro-pack? (We buy some of our licenses from you btw and some from one of our vps hosting providers, who answered an email to me they probably won't be offering the pro-pack anytime soon. Can i still added it to the licenses we get via them?)

For this instance / case in particular, we will not take the pro-pack as it only hosts 1 website. How should we proceed in this case?

It depends on what type of license you have. Pro Pack is a retail product for now, so if you have our retail Lite/Standard licenses then you already have it. :) If you have a legacy lifetime license you will see a support extension option in your account, which adds the Pro Pack to your license.
 
Great. I suppose we have the Lite/Standard licenses, yes. How do we enable the pro-pack?

Really really looking forward to the Cloudflare DNS linking. Please say your implementing it with the API Tokens (per zone)!
 
I have no idea. This is what your invoice shows:

1625130279540.png
 
When you enable redis for a user in DirectAdmin GUI, it creates /home/user/.redis/redis.sock socket there (and shows the path there as well). It does not listen on any port and it is not using redis.conf (all the settings are set in start/stop script /etc/systemd/system/[email protected]).

Where would I put maxmemory-policy allkeys-lru? That works in the .service file?
 
--maxmemory-policy allkeys-lru in ExecStart code should do the trick. Don't forget to place it in custom/ folder.
 
--maxmemory-policy allkeys-lru in ExecStart code should do the trick. Don't forget to place it in custom/ folder.

I'm wondering if I am doing this wrong. Am I supposed to put a redis.conf file in /usr/local/directadmin/custombuild/custom/redis or something else?

Another question as well. If user1 is using Redis database 0 and user2 is using database 0, is it the same database 0?
 

Thanks. I copied the existing config from /etc/systemd/system/ to that location and added the following to the end of ExecStart:

ExecStart=/usr/local/bin/redis-server --include /usr/local/directadmin/data/users/${USER}/redis.conf --supervised systemd --dir ${HOME}/.redis/db/ --port 0 --unixsocket ${HOME}/.redis/redis.sock --unixsocketperm 770 --maxmemory-policy allkeys-lru --maxmemory 128MB --databases 30

This should be okay?
 
The installation of redis went fine, also one user is using it on my server. But when I want to enable it to another user(website) on the same server, I get the following error for this command:

Code:
systemctl status [email protected]

[/etc/systemd/system/[email protected]:10] Executable path is not absolute, ignoring: -+/bin/sh -c "if [ -d /sys/fs/cgroup/user.slice ]; then mkdir -p /sys/fs/cgroup/user.slice/u...

After
Code:
systemctl start [email protected]
redis isn't functioning anymore for all users...
Code:
Failed to start Multi-user redis persistent key-value database.

Code:
nano /usr/local/directadmin/data/users/user2/redis.conf

supervised systemd
port 0
unixsocket /home/user2/.redis/redis.sock
unixsocketperm 770
maxmemory 512MB
maxmemory-samples 6
requirepass PASSWORD

nano /etc/systemd/system/[email protected] gives:

Code:
[Unit]
Description=Multi-user redis persistent key-value database
After=network.target
Documentation=http://redis.io/documentation, man:redis-server(1)

[Service]
User=%i
Group=%i
ExecStartPre=-/bin/mkdir -p ${HOME}/.redis/db/
ExecStartPost=-+/bin/sh -c "if [ -d /sys/fs/cgroup/user.slice ]; then mkdir -p /sys/fs/cgroup/user.slice/user-$(id -u ${USER}).slice/directadmin-exec.scope; echo $MAINPID > /sys/fs/cgroup/user.slice/user-$(id -u ${USER}).sl$
ExecStart=/usr/local/bin/redis-server --include /usr/local/directadmin/data/users/${USER}/redis.conf --supervised systemd --dir ${HOME}/.redis/db/ --port 0 --unixsocket ${HOME}/.redis/redis.sock --unixsocketperm 770
Type=notify
RuntimeDirectory=redis
RuntimeDirectoryMode=0755
UMask=007
LimitNOFILE=65535
NoNewPrivileges=true
CapabilityBoundingSet=CAP_SETGID CAP_SETUID CAP_SYS_RESOURCE
MemoryDenyWriteExecute=true
ProtectKernelModules=true
ProtectKernelTunables=true
ProtectControlGroups=true
RestrictRealtime=true
RestrictNamespaces=true
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX

[Install]
WantedBy=multi-user.target
 
@JohnnyBravo
Please create your own thread for your issued.

And don't trying to manual start from CLI, please control from DA GUI. due it need to include config from
"/usr/local/directadmin/data/users/${USER}/redis.conf"
 
@JohnnyBravo
Please create your own thread for your issued.

And don't trying to manual start from CLI, please control from DA GUI. due it need to include config from
"/usr/local/directadmin/data/users/${USER}/redis.conf"
Thank you, i'll start a new thread:
 
Back
Top