在Ubuntu 19.04上安装Redis Commander as service
我用运行redis和redis commander的Ubuntu19.04来宾系统创建了一个虚拟机 我可以通过8081访问redis commander,但每次启动VM时都需要手动启动它在Ubuntu 19.04上安装Redis Commander as service,ubuntu,redis,ubuntu-19.04,Ubuntu,Redis,Ubuntu 19.04,我用运行redis和redis commander的Ubuntu19.04来宾系统创建了一个虚拟机 我可以通过8081访问redis commander,但每次启动VM时都需要手动启动它 如何将redis commander安装为linux服务?我想让它直接安装在Ubuntu中,而不是在docker容器中运行。是的,你可以。我有同样的问题,但在Centos 7。在/etc/systemd/system目录中,您应该创建.service文件,例如,my redis commader.service
如何将redis commander安装为linux服务?我想让它直接安装在Ubuntu中,而不是在docker容器中运行。是的,你可以。我有同样的问题,但在Centos 7。在
/etc/systemd/system
目录中,您应该创建.service
文件,例如,my redis commader.service
。文件的内容如下所示:
[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
在哪里
/usr/bin/node
-node.js可执行文件
/usr/lib/node_modules/redis commander/bin/redis commander.js
-是node.js模块的文件,该模块为redis服务器运行web应用程序gui
然后运行:
systemctl enable my-redis-commander.service
systemctl start my-redis-commander.service
检查状态:
systemctl status my-redis-commander.service