安装RocketChat
打开连接https://releases.rocket.chat/latest/download下载最新版RocketChat。
解压,配置:
tar zxf rocket.chat-3.4.1.tar mv bundle/ /data/rocket.chat
安装程序依赖:
cd /data/rocket.chat/programs/server/ npm install npm update all
创建启动脚本:
cd /data/rocket.chat/ vim start-rochat.sh
#!/bin/bash
# Author:Chris __On 2020/07/07
# =====================Description=====================
# [Features]: This is for RocketChat node start.
# [Usage]: Execute or Add /etc/rc.local:
# /path/start-rochat.sh
# =====================================================
if [ "${TERM}" == "linux" ];then
# Defined Color
Red='\033[31m\033[1m' # \e[1;31m
Green='\033[32m\033[1m' # \e[1;32m
Blue='\033[94m' # \e[0;94m
Null='\033[0m' # \e[0m
fi
# <----------------------------Configure Start--------------------------->
Rocket_Path=/data/rocket.chat
# You must use the outside https address for the value at ROOT_URL,
# This includes the https:// and leave off the port number
Site_URL=https://imc.example.cc
Mongo_User="rocketchat"
Mongo_Pass="123456"
Mongo_DB="rocketchat"
Mail_Host="mail.example.com"
Mail_User="[email protected]"
Mail_Pass="yourpassowrd"
# <----------------------------Configure End---------------------------->
# Load Env
#source /etc/profile
cd ${Rocket_Path}
NODE_ENV=production \
ROOT_URL=${Site_URL} \
PORT=3000 \
MONGO_URL="mongodb://${Mongo_User}:${Mongo_Pass}@127.0.0.1:27017/${Mongo_DB}?authSource=admin&w=1" \
MONGO_OPLOG_URL="mongodb://${Mongo_User}:${Mongo_Pass}@127.0.0.1:27017/local?authSource=admin&w=1" \
MAIL_URL="smtps://${Mail_User}:${Mail_Pass}@${Mail_Host}:465/" \
node main.js &
echo -e "${Green}Operation Complated!${Null}"
chmod +x start-rochat.sh
启动
./start-rochat.sh
此时访问主机IP:3000已可以访问到其。


Hello colleagues, nice piece of writing and nice urging commented at this place, I am really enjoying by these. Bobbie Cammy Balf
Really enjoyed this blog post. Thanks Again. Keep writing. Rubia Ambrose Idalia
I really like your writing style, wonderful information, regards for putting up : D. Donica Eduardo Corie
Thanks for sharing, this is a fantastic post. Much thanks again. Really Great. Larissa Algernon Thay