我就是一个不懂技术的小白!
rocket-chat是一个开源的社交软件,即可以直接在web页面使用,也可以下载APP(Android,IOS,Windows,Mac OS)
主要功能:群组聊天,直接通信,私聊群,桌面通知,媒体嵌入,链接预览,文件上传,语音/视频 聊天,截图等,还支持实时翻译,实现用户之间的自动实时消息转换。
话不多说,直接上效果;

教程来啦!
我是用的docker轻量化运行!
1、首先,需要准备Centos7服务器。需要外网IP(如果需要外网访问),并在安全组中开放3000端口,并连接到服务器,并且已经安装了docker。
2.安装docker-compose,这里提及两个方式安装;(源码安装;yum安装)
(1)源码安装
curl -L “https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)” -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
(2)yum安装
docker-compose的包存在于epel库中,所以我们要先安装epel库!
#首先安装epel库
yum -y install epel-release
#安装docker-compose
yum -y install docker-compose
3.获取Rocket.chat的compose文件;
官网地址
https://docs.rocket.chat/quick-start/installing-and-updating/docker-containers/docker-compose
docker-compose内容
version: ‘2’services:rocketchat:image: registry.rocket.chat/rocketchat/rocket.chat:latestcommand: >bash -c”for i in `seq 1 30`; donode main.js &&s=$$? && break || s=$$?;echo \”Tried $$i times. Waiting 5 secs…\”;sleep 5;done; (exit $$s)”restart: unless-stoppedvolumes:- ./uploads:/app/uploadsenvironment:- PORT=3000- ROOT_URL=http://localhost:3000- MONGO_URL=mongodb://mongo:27017/rocketchat- MONGO_OPLOG_URL=mongodb://mongo:27017/local
# – MAIL_URL=smtp://smtp.email
# – HTTP_PROXY=http://proxy.domain.com
# – HTTPS_PROXY=http://proxy.domain.comdepends_on:- mongoports:- 3000:3000labels:- “traefik.backend=rocketchat”- “traefik.frontend.rule=Host: your.domain.tld”mongo:image: mongo:4.0restart: unless-stoppedvolumes:- ./data/db:/data/db#- ./data/dump:/dumpcommand: mongod –smallfiles –oplogSize 128 –replSet rs0 –storageEngine=mmapv1labels:- “traefik.enable=false”# this container’s job is just run the command to initialize the replica set.# it will run the command and remove himself (it will not stay running)mongo-init-replica:image: mongo:4.0command: >bash -c”for i in `seq 1 30`; domongo mongo/rocketchat –eval \”rs.initiate({_id: ‘rs0’,members: [ { _id: 0, host: ‘localhost:27017’ } ]})\” &&s=$$? && break || s=$$?;echo \”Tried $$i times. Waiting 5 secs…\”;sleep 5;done; (exit $$s)”depends_on:- mongo# hubot, the popular chatbot (add the bot user first and change the password before starting this image)hubot:image: rocketchat/hubot-rocketchat:latestrestart: unless-stoppedenvironment:- ROCKETCHAT_URL=rocketchat:3000- ROCKETCHAT_ROOM=GENERAL- ROCKETCHAT_USER=bot- ROCKETCHAT_PASSWORD=botpassword- BOT_NAME=bot# you can add more scripts as you’d like here, they need to be installable by npm- EXTERNAL_SCRIPTS=hubot-help,hubot-seen,hubot-links,hubot-diagnosticsdepends_on:- rocketchatlabels:- “traefik.enable=false”volumes:- ./scripts:/home/hubot/scripts# this is used to expose the hubot port for notifications on the host on port 3001, e.g. for hubot-jenkins-notifierports:- 3001:8080#traefik:# image: traefik:latest# restart: unless-stopped# command: ># traefik# –docker# –acme=true# –acme.domains=’your.domain.tld’# –acme.email=’your@email.tld’# –acme.entrypoint=https# –acme.storagefile=acme.json# –defaultentrypoints=http# –defaultentrypoints=https# –entryPoints=’Name:http Address::80 Redirect.EntryPoint:https’# –entryPoints=’Name:https Address::443 TLS.Certificates:’# ports:# – 80:80# – 443:443# volumes:# – /var/run/docker.sock:/var/run/docker.sock
#获取完docker-compose文件,直接启动,拉取镜像
[root@localhost chat]# docker-compose up -d
Creating network “chat_default” with the default driver
Pulling mongo (mongo:4.0)…
Trying to pull repository docker.io/library/mongo …
4.0: Pulling from docker.io/library/mongo
58690f9b18fc: Pull complete
b51569e7c507: Pull complete
da8ef40b9eca: Pull complete
fb15d46c38dc: Pull complete
8c5b4403b3cc: Pull complete
a336ecd37208: Pull complete
12c733cd45a4: Pull complete
0500d06255ed: Pull complete
166a5a996686: Pull complete
709f9e8f3eb4: Pull complete
22bd5150d072: Extracting [==============================> ] 64.06 MB/105.9 MB
740523b21eb5: Download complete
76dcc5baf521: Download complete
……………………
Creating chat_mongo_1 … done
Creating chat_rocketchat_1 … done
Creating chat_hubot_1 … done
等镜像拉完查看各个容器的状态
#
[root@localhost chat]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
3e57e7101a21 rocketchat/hubot-rocketchat:latest “/bin/sh -c ‘node …” 2 minutes ago Up 2 minutes 0.0.0.0:3001->8080/tcp chat_hubot_1
e7891bbc22db registry.rocket.chat/rocketchat/rocket.chat:latest “docker-entrypoint…” 2 minutes ago Up 2 minutes 0.0.0.0:3000->3000/tcp chat_rocketchat_1
f26a68d48284 mongo:4.0 “docker-entrypoint…” 2 minutes ago Up 2 minutes 27017/tcp chat_mongo_1#第二个容器才是我们要访问的
第一个hubot-rocketchat,是一个机器人的功能,我自己试了一下,没什么用,并不能像tuling那样智能;
mongo用于保存rocketchat的数据;
接下来就可以访问啦!
注意,开放3000端口 or 关闭防火墙,如果你是公有云服务器,记得修改你的安全组!
访问地址:ip:3000

#注意!!!姓名可以是中文,但是用户名和组织电邮必须是英文或者是拼音(不能是中文)
姓名就是在rocketchat中显示的你的名字(后面也可以修改)
密码默认并没有复杂性要求(你随便输就行,但要记住你设置的密码)

#解说组织信息有很多,其实就是可填可不填,但是尺寸看起来有点用!我选的最大,字面理解应该是这个组织可以容纳多少用户,实际上我也没有测是不是这个意思!

#解说:这个和上面的组织信息一样,可填可不填!网站名称就是访问的时候网页顶部显示标题名称,就是html中的head !语言我选的中文,也支持其他国家的语言!服务类型又私人社区和公共社区可选,我选的公共社区!最后一项,自动启用验证我是关了的,否则用户注册是需要邮箱认证的!建议是关掉邮箱认证!

#解说:这一步是选择你是否注册到rockerchat的服务器,rockerchat的官网访问**!所以我就不注册了,选择独立运行!
至此,rocketchat就部署好了!
有三个容器,还有一个没有提到的hubot容器,至于hubot-rocketchat是怎么使用的,后面再单独做一个文档!
结尾:
⚠:我就是一个不懂技术的小白!转载于
-
扫码下载安卓APP
-
微信扫一扫关注我们
微信扫一扫打开小程序
手Q扫一扫打开小程序
-
返回顶部
发表评论