I install redis-stack-server on Ubuntu by snap:
sudo apt update
sudo apt install redis-tools
sudo snap install --dangerous --classic <snapname.snap>
then edit the /etc/systemd/system/redis-stack-server.service file and enter the following information:
[Unit]
Description=Redis Stack Server
After=network.target
[Service]
ExecStart=/usr/bin/snap run redis-stack-server
Restart=always
User=root
Group=root
[Install]
WantedBy=multi-user.target
finally run the following commands.
sudo systemctl daemon-reload
sudo systemctl start redis-stack-server
sudo systemctl enable redis-stack-server
After that I can use redis-stack, but I find I can’t edit the config file: /snap/redis-stack-server/x1/opt/redis-stack/etc/redis-stack.conf
which is a readonly file. so how shall I do that?