这篇文章主要介绍手动安装的方式来安装Rocket.Chat,在Rocket.Chat官方有三种安装方式,
- 面向开发人员的直接使用meteor部署
- 传统的源码编译安装
- Docker方式部署
接下来分别介绍:
使用Meteor方式部署
Meteor是一种Web应用构建平台(官网https://meteor.com/),已经包含了nodejs,mongodb等环境,所以我们只需要安装Meteor和对应的rocketchat工具即可
安装Rocket.Chat
下载对应的Release版本,这里以2.4.14为例
https://codeload.github.com/RocketChat/Rocket.Chat/tar.gz/refs/tags/2.4.14
根据文档安装和配置
配置Service
在/etc/systemd/system/目录下新建名称为rocketchat.service的文件,填写如下内容
[Unit]
Description=The Rocket.Chat server running on Linux
After=network.target remote-fs.target nss-lookup.target nginx.service mongod.service
[Service]
WorkingDirectory=/home/xamarin/web/Rocket.Chat-2.4.14/
ExecStart=/usr/local/bin/meteor npm start
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=rocketchat
User=xamarin
Environment=ROOT_URL=http://localhost:3000/ PORT=3000
[Install]
WantedBy=multi-user.target
保存文件后执行:
sudo systemctl daemon-reload
接下来测试服务:
sudo systemctl start rocketchat.service
如果服务启动Ok没有问题 ,我们把这个服务设置成自启动
sudo systemctl enable rocketchat.service
.Net5 的后台接口程序也设置成自动启动
在/etc/systemd/system/目录下新建名称为kestrel-cah.service的文件
键入如下内容
[Unit]
Description=CAH Web API App running on Linux
[Service]
WorkingDirectory=/home/xamarin/web/[dll所在地址]
ExecStart=/usr/local/dotnet/dotnet XXX.Web.Host.dll
Restart=always
# Restart service after 10 seconds if the dotnet service crashes:
RestartSec=10
KillSignal=SIGINT
SyslogIdentifier=dotnet-cah
User=xamarin
Environment=DOTNET_PRINT_TELEMETRY_MESSAGE=false
[Install]
WantedBy=multi-user.target
用同样的方法执行systemctl 的几个步骤
完成!
Troubleshooting:
如果systemd有报错,可以通过如下命令查看
sudo systemctl status kestrel-cah.service
sudo journalctl -fu kestrel-cah.service
默认情况下日志记录在syslog,如果看报错详细,可以通过如

本文详细指导如何手动安装Rocket.Chat,包括Meteor快速部署、传统编译安装(涉及Node.js 8.17.0和MongoDB 4.0)、Docker容器部署,并提供常见问题解决方案。
最低0.47元/天 解锁文章
1584





