静看光阴荏苒
不管不顾不问不说也不念

使用snap快速安装RocketChat

有几个朋友问我那个ohshit是怎么搭建的,我之前写过用CentOS7手动安装的方法,那个太麻烦了,现在RocketChat支持用snap部署,而且还自带Caddy,方便很多,当然snap目前只能用在Debian/Ubuntu系统上。下面是我在Debian9上参照官方文档的安装过程,只有两个小坑,注意一下就好。

首先更新下系统:

apt -y update
apt -y dist-upgrade

然后一条命令即可安装snap:

apt -y install snapd

需要先使用snap安装这个运行环境,这步官方没提到,导致很多人卡在这里:

snap install core

然后就可以安装RocketChat了:

snap install rocketchat-server

安装成功之后会弹出一个警告的提示,大致意思是说某些snap的管理命令可能不能使用,这时候我们只要退出shell重新登录一次就好了。(指下面的rocketchat-server.initcaddy命令)

exit

重新登录上来之后就可以使用Caddy配置反向代理和自动申请SSL证书(前提是你要先把域名解析到你的服务器)

snap set rocketchat-server caddy-url=https://chat.ohshit.fun
snap set rocketchat-server caddy=enable
snap set rocketchat-server https=enable
rocketchat-server.initcaddy

最后重启rocketchat和caddy的服务你的聊天服务器就部署好了:

systemctl restart snap.rocketchat-server.rocketchat-server.service
systemctl restart snap.rocketchat-server.rocketchat-caddy.service

访问服务器IP+端口3000开始填写配置,这里就不多说明了。

用这个方法部署的服务器,备份还原也很简单,具体操作可以看官方的文档,我没有试过,不知道是否有坑:

https://rocket.chat/docs/installation/manual-installation/ubuntu/snaps/

关于更新:貌似是自动更新。。

赞(2)
未经允许不得转载:荒岛 » 使用snap快速安装RocketChat
分享到: 更多 (0)

评论 14

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
  1. #1

    apt -y dist-upgrade卡81%。。。

    Yuger5年前 (2019-04-15) Google Chrome 73.0.3683.103 Google Chrome 73.0.3683.103 Windows 10 x64 Edition Windows 10 x64 Edition回复
  2. #2

    大佬,loc发现个好玩的东西,捐款平台还可以按月来捐款。github:https://github.com/liberapay/liberapay.com,可以搞个教程吗 :smile:

    zturns5年前 (2019-04-18) Google Chrome 73.0.3683.103 Google Chrome 73.0.3683.103 Windows 10 x64 Edition Windows 10 x64 Edition回复
    • 看了一下,他怎么说这个WEB不开源?

      LALA5年前 (2019-04-19) Google Chrome 72.0.3626.121 Google Chrome 72.0.3626.121 Windows 10 x64 Edition Windows 10 x64 Edition回复
      • ?那是我太猛浪了,英文没看懂 :oops:

        瞎折腾5年前 (2019-04-20) Google Chrome 73.0.3683.90 Google Chrome 73.0.3683.90 Android 8.1.0 Android 8.1.0回复
  3. #3

    大佬 请问能不能出一个安装fastdfs的教程 我们最近要用这个 自己没搞过这个

    feidao1585年前 (2019-04-19) Google Chrome 73.0.3683.103 Google Chrome 73.0.3683.103 Windows 10 x64 Edition Windows 10 x64 Edition回复
    • 看了一下,这东西太高级了,不是一会能搞出来的。。

      LALA5年前 (2019-04-19) Google Chrome 72.0.3626.121 Google Chrome 72.0.3626.121 Windows 10 x64 Edition Windows 10 x64 Edition回复
  4. #4

    可以和宝塔共存吗?在我已经安装这个的情况下 :razz:

    TSLi5年前 (2019-05-14) Google Chrome 74.0.3729.131 Google Chrome 74.0.3729.131 Windows 10 x64 Edition Windows 10 x64 Edition回复
    • 理论上是可以共存的。

      LALA5年前 (2019-05-14) Google Chrome 72.0.3626.121 Google Chrome 72.0.3626.121 Windows 10 x64 Edition Windows 10 x64 Edition回复
  5. #5

    我又来了,已经成功搭建了,话说这些数据太大怎么办?能不能定时删除数据呀?比如定时删除一个星期以前的所有聊天数据?

    咸鱼5年前 (2019-07-06) Google Chrome 75.0.3770.100 Google Chrome 75.0.3770.100 Windows 7 Windows 7回复
    • 后台可以删除聊天产生的数据,定时这个我还不是很清楚。。

      LALA5年前 (2019-07-06) Google Chrome 74.0.3729.169 Google Chrome 74.0.3729.169 Windows 10 x64 Edition Windows 10 x64 Edition回复
  6. #6

    emmm 搭建成功了 WebSocket显示无效

    losie4年前 (2020-04-17) Google Chrome 81.0.4044.113 Google Chrome 81.0.4044.113 Windows 10 x64 Edition Windows 10 x64 Edition回复
  7. #7

    大大,已经安装好了,请问翻译怎么改?

    paa4年前 (2020-08-31) Google Chrome 84.0.4147.135 Google Chrome 84.0.4147.135 Windows 10 x64 Edition Windows 10 x64 Edition回复
    • 那个,之前是我没有在安装的地方看清楚。打扰了 :neutral:

      paa4年前 (2020-09-01) Google Chrome 84.0.4147.135 Google Chrome 84.0.4147.135 Windows 10 x64 Edition Windows 10 x64 Edition回复

分享创造快乐

广告合作资源投稿