在工作中,有时候我们需要一个内部沟通的工具,然而微信、QQ等不够正式,有安全或者网络方面的风险,同时,又不想花钱使用钉钉,这时候,不妨尝试下MatterMost。
Mattermost 是一个 Slack 的开源替代品。Mattermost 采用 Go 语言开发,这是一个开源的团队通讯服务。为团队带来跨 PC 和移动设备的消息、文件分享,提供归档和搜索功能。
安装步骤
下载
暂时只能找到linux版本的安装包,大家见谅啊,将就用吧,下载地址如下,可能下载有点慢
https://releases.mattermost.com/3.6.2/mattermost-3.6.2-linux-amd64.tar.gz解压
进入目录,执行解压命令
root@ubuntu:/opt# ll mattermost-3.6.2-linux-amd64.tar.gz
-rw-r--r-- 1 root root 27818711 Feb 1 05:17 mattermost-3.6.2-linux-amd64.tar.gz
root@ubuntu:/opt# tar zxf mattermost-3.6.2-linux-amd64.tar.gz
- 配置
这边只对ubuntu上面的安装做个示例,完整的请见完整安装文档
进入mattermost目录
root@ubuntu:/opt/# ll mattermost
total 268
drwxrwxr-x 10 imax imax 4096 Feb 18 17:12 ./
drwxr-xr-x 14 root root 4096 Feb 17 16:54 ../
drwxrwxr-x 2 imax imax 4096 Feb 1 05:08 bin/
drwxrwxr-x 2 imax imax 4096 Feb 18 17:47 config/
drwxr-xr-- 4 root root 4096 Feb 18 17:13 data/
-rw-rw-r-- 1 imax imax 2044 Feb 1 05:07 ENTERPRISE-EDITION-LICENSE.txt
drwxrwxr-x 2 imax imax 4096 Feb 1 05:07 fonts/
drwxrwxr-x 2 imax imax 4096 Feb 1 05:07 i18n/
drwxrwxr-x 2 imax imax 4096 Feb 18 16:47 logs/
-rw-rw-r-- 1 imax imax 224068 Feb 1 05:07 NOTICE.txt
-rw-rw-r-- 1 imax imax 2579 Feb 1 05:07 README.md
drwxrwxr-x 2 imax imax 4096 Feb 1 05:07 templates/
drwxrwxr-x 3 imax imax 4096 Feb 1 05:07 webapp/
root@ubuntu:/opt#
打开配置文件config/config.json
说明一下,MatterMost支持MySQL和Postgres两种数据库,这边以Postgres为例说明,配置块如下
"SqlSettings": {
"DriverName": "postgres",
"DataSource": "postgres://postgres:postgres@192.168.0.1:5432/mattermost?sslmode=disable\u0026connect_timeout=10",
"DataSourceReplicas": [],
"MaxIdleConns": 20,
"MaxOpenConns": 300,
"Trace": false,
"AtRestEncryptKey": "z758n3isr4gmcto67uefzt7gikda6scw"
}
我们为了偷懒,仅做极简配置,即只配置一个数据库哈
- 启动
看下面的代码啊
root@ubuntu-blade2:/opt/huawei/mattermost# bin/platform
[2017/02/21 21:13:06 CST] [INFO] Loaded system translations for 'en' from '/opt/mattermost/i18n/en.json'
[2017/02/21 21:13:06 CST] [INFO] Current version is 3.6.0 (3.6.2/Tue Jan 31 21:02:59 UTC 2017/1a9891f0f5671551d28be54a99155b907480cc5c/a704f18b1b14f56588a8a57042517fc51a826658)
[2017/02/21 21:13:06 CST] [INFO] Enterprise Enabled: true
[2017/02/21 21:13:06 CST] [INFO] Current working directory is /opt/mattermost
[2017/02/21 21:13:06 CST] [INFO] Loaded config file from /opt/mattermost/config/config.json
[2017/02/21 21:13:06 CST] [INFO] Server is initializing...
[2017/02/21 21:13:06 CST] [INFO] Pinging SQL master database
[2017/02/21 21:13:06 CST] [INFO] Starting 48 websocket hubs
[2017/02/21 21:13:06 CST] [INFO] License key from https://mattermost.com required to unlock enterprise features.
[2017/02/21 21:13:06 CST] [INFO] Starting Server...
[2017/02/21 21:13:06 CST] [INFO] Server is listening on :8065
注意,这个8685就是我们服务的监听端口
开始玩耍
打开我们的URL