I created my self a virtual machine with an Ubuntu 19.04 guest system running redis and redis commander.
I can access the redis commander via 8081 but need to start it manually everytime I start the VM.
How would I install the redis-commander as linux service? I would like to keep it directly installed in Ubuntu and not running in a docker container.
Yes, you can. I had the same issue but on Centos 7. In /etc/systemd/system
directory you should create .service
file, for example, my-redis-commader.service
. The content of file is like this:
[Unit]
Description=Redis Commander Activator
After=network.target
[Service]
WorkingDirectory=/usr/lib/node_modules/redis-commander/bin/
ExecStart=/usr/bin/node /usr/lib/node_modules/redis-commander/bin/redis-commander.js
[Install]
WantedBy=multi-user.target
where
/usr/bin/node
- node.js executable file
/usr/lib/node_modules/redis-commander/bin/redis-commander.js
- is the file of node.js module, which run the web application - gui for redis server.
Then run:
systemctl enable my-redis-commander.service
systemctl start my-redis-commander.service
Check status:
systemctl status my-redis-commander.service
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.