要解决此问题,您应该创建 Rocketchat 服务并将其启用为您的系统启动过程/服务。
您可以在此处查看有关如何创建 Rocketchat 服务的视频教程
ADD ROCKET CHAT SERVICE
gedit /usr/lib/systemd/system/rocketchat.service
# Add following lines in this service file
[Unit]
Description=The rocket chat server
After=network.target remote-fs.target nss-lookup.target nginx.target mongod.target
[Service]
ExecStart=/bin/node /opt/rocketchat/main.js
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=ping
User=root
Environment=MONGO_URL=mongodb://localhost:27017/rocketchat ROOT_URL=http://192.168.0.138 PORT=3000
[Install]
WantedBy=multi-user.target
systemctl enable rocketchat.service
systemctl start rocketchat.service