如何在Ubuntu 18.04上设置Mattermost

介绍 (Introduction)

Mattermost is an open source collaboration and messaging platform created with security and configurability in mind providing comparable functionality to Discord or Slack. It offers group, threaded and one-to-one messaging, unlimited search history and file sharing capabilities, two-factor authorization and notifications. Mattermost also provides webhooks and bot integration for further customization. It’s accessible from every type of modern device due to its responsive web interface and dedicated mobile apps.

Mattermost是一个开放源代码协作和消息传递平台,其创建时考虑了安全性和可配置性,提供了与DiscordSlack相当的功能。 它提供组,线程和一对一的消息传递,无限的搜索历史和文件共享功能,两要素授权和通知。 Mattermost还提供了Webhooks和bot集成以进行进一步的自定义。 由于其响应式Web界面和专用的移动应用程序,因此可以从每种类型的现代设备上访问。

In this tutorial, you will set up the Mattermost Team Edition on your Ubuntu 18.04 server. First, you’ll install it and expose it at your domain, secured with a free Let’s Encrypt TLS certificate. Then, you’ll enable email notifications, customize branding, and create your messaging board (called a team in Mattermost).

在本教程中,您将在Ubuntu 18.04服务器上设置Mattermost Team Edition 。 首先,将其安装并在您的域中公开,并使用免费的Let's Encrypt TLS证书进行保护。 然后,您将启用电子邮件通知,自定义品牌并创建消息板(在Mattermost中称为团队 )。

先决条件 (Prerequisites)

Note: For your Postfix SMTP server to work correctly, the PTR records of your server must match your_domain. You can verify the server’s hostname by typing hostname at the command prompt. The output should match the name you gave your server when you created it.

注意 :为了使Postfix SMTP服务器正常工作,服务器的PTR记录必须与your_domain匹配。 您可以通过在命令提示符下键入hostname来验证服务器的主机hostname 。 输出应与创建服务器时给您的名称匹配。

第1步-安装Mattermost (Step 1 — Installing Mattermost)

In this section, you will set up Mattermost on your server. This entails downloading the latest version, configuring it to use the MariaDB database, and creating a systemd service that will keep Mattermost always running in the background.

在本节中,您将在服务器上设置Mattermost。 这需要下载最新版本,其配置为使用MariaDB的数据库,并创建一个systemd服务,将让Mattermost一直在后台运行。

下载Mattermost (Downloading Mattermost)

You’ll store all data pertaining to the Mattermost installation in a folder named ~/mattermost. Create it by running the following command:

您将与Mattermost安装有关的所有数据存储在名为~/mattermost的文件夹中。 通过运行以下命令来创建它:

  • mkdir ~/mattermost

    mkdir〜/最重要

Navigate to it:

导航到它:

  • cd ~/mattermost

    cd〜/最

You’ll need to head over to the Mattermost download page on the official website and copy the link for the latest release. At the time of writing, the latest version was 5.24.2. Download it using wget with the following command:

您需要转到官方网站上的Mattermost下载页面,并复制最新版本的链接。 在撰写本文时,最新版本为5.24.2 。 使用wget通过以下命令下载它:

  • wget https://releases.mattermost.com/5.24.2/mattermost-5.24.2-linux-amd64.tar.gz

    wget https://releases.mattermost.com/ 5.24.2 / mattermost- 5.24.2 -linux-amd64.tar.gz

Then, unpack the archive by running:

然后,通过运行以下命令解压缩归档文件:

  • tar -xvzf mattermost*.gz

    tar -xvzf最重要* .gz

This command will unpack all archive files in the directory whose names starts with mattermost.

该命令将解压缩目录中所有名称以“ mattermost开头的存档文件。

You’ll get a folder named exactly as the original file you downloaded, which contains the Mattermost binaries. Copy it to /opt so you’ll be able to access it system wide by running:

您将获得一个与下载的原始文件完全相同的文件夹,其中包含Mattermost二进制文件。 将其复制到/opt这样您就可以通过运行以下命令在系统范围内进行访问:

  • sudo cp -r mattermost /opt

    须藤cp -r最重要/ opt

Then, create a folder for Mattermost, where it will store user data:

然后,为Mattermost创建一个文件夹,该文件夹将存储用户数据:

  • sudo mkdir /opt/mattermost/data

    须藤mkdir / opt / mattermost / data

Note: Mattermost will store files and images you and your team will share in this directory, so make sure you’ve got plenty of free space on the drive where it’s located.

注意: Mattermost会将您和您的团队共享的文件和图像存储在此目录中,因此请确保它所在的驱动器上有足够的可用空间。

Next, create a user and group for Mattermost:

接下来,为Mattermost创建一个用户和组:

  • sudo useradd --system --user-group mattermost

    sudo useradd --system --user-group最重要

Then, make the newly made user and its group own the data folder:

然后,使新创建的用户及其组拥有数据文件夹:

  • sudo chown -R mattermost:mattermost /opt/mattermost

    sudo chown -R最重要:最重要/ opt /最重要

This is done so that in the event of a breach, the attacker will be confined to the Mattermost directory and won’t be able to easily gain access to the rest of the system.

这样做是为了在发生破坏的情况下,攻击者将被限制在Mattermost目录中,并且将无法轻松地访问系统的其余部分。

Finally, make the /opt/mattermost directory writable by groups:

最后,使/opt/mattermost目录/opt/mattermost组写入:

  • sudo chmod -R g+w /opt/mattermost

    须藤chmod -R g + w / opt / mattermost

Now that Mattermost binaries are in place with secured permissions, let’s set up a database for it.

现在,具有安全权限的Mattermost二进制文件已经就位,让我们为其建立数据库。

设置数据库 (Setting Up the Database)

Start off by entering the MariaDB prompt by running:

首先通过运行以下命令输入MariaDB提示符:

  • sudo mysql

    须藤MySQL

Create a database user called mmuser by running the following command, replacing your_mmuser_password with a password of your choice:

通过运行以下命令来创建名为mmuser的数据库用户,将your_mmuser_password替换为您选择的密码:

  • CREATE USER 'mmuser'@'%' IDENTIFIED BY 'your_mmuser_password';

    创建用户'mmuser'@'%'由' your_mmuser_password '标识;

Then, create a database for Mattermost:

然后,为Mattermost创建一个数据库:

  • CREATE DATABASE mattermost;

    最重要的是创建数据库;

To let mmuser access the mattermost database, grant it access privileges by running:

要让mmuser访问最mattermost数据库,请运行以下命令来授予它访问权限:

  • GRANT ALL PRIVILEGES ON mattermost.* TO 'mmuser'@'%';

    *在'mmuser'@'%'处授予所有特权。

Then, reload the grant tables to immediately apply the changes:

然后,重新加载授权表以立即应用更改:

  • FLUSH PRIVILEGES;

    冲洗特权;

When you’re done, exit the prompt:

完成后,退出提示:

  • exit

    出口

With the database and an accompanying user created, you’ll now edit the main Mattermost configuration file and set the correct database connection string.

创建数据库和一个伴随的用户之后,您现在将编辑Mattermost主配置文件并设置正确的数据库连接字符串。

Open it for editing:

打开它进行编辑:

  • sudo nano /opt/mattermost/config/config.json

    须藤nano /opt/mattermost/config/config.json

Find the lines that look like the following:

查找如下所示的行:

/opt/mattermost/config/config.json
/opt/mattermost/config/config.json
. . .
"DriverName": "..."
"DataSource": "..."
. . .

Modify them to as shown here, replacing your_mmuser_password with the password you set for the mmuser database account:

将它们修改为如下所示,用为mmuser数据库帐户设置的密码替换your_mmuser_password

/opt/mattermost/config/config.json
/opt/mattermost/config/config.json
"DriverName": "mysql"
"DataSource": "mmuser:your_mmuser_password@tcp(localhost:3306)/mattermost?charset=utf8mb4,utf8&readTimeout=30s&writeTimeout=30s"

Save and close the file when you’re done.

完成后,保存并关闭文件。

You’ve now configured Mattermost to use the newly created database where it will store users, teams, and messages. Now you’re ready to move on to creating a systemd service for it.

现在,您已将Mattermost配置为使用新创建的数据库来存储用户,团队和消息。 现在,您可以继续为其创建systemd服务了。

创建系统服务 (Creating a systemd Service)

Running Mattermost as a service using systemd ensures that it will be running in the background at all times.

使用systemd将Mattermost作为服务运行可确保其始终在后台运行。

You’ll store the service configuration in a file named mattermost.service, in the /lib/systemd/system directory, where systemd stores its services. Create it using your text editor:

你会存储在服务配置文件中的命名mattermost.service ,在/lib/systemd/system目录,其中systemd商店的服务。 使用您的文本编辑器创建它:

  • sudo nano /lib/systemd/system/mattermost.service

    须藤nano /lib/systemd/system/mattermost.service

Add the following lines:

添加以下行:

/lib/systemd/system/mattermost.service
/lib/systemd/system/mattermost.service
[Unit]
Description=Mattermost
After=network.target
After=mysql.service
Requires=mysql.service

[Service]
Type=notify
User=mattermost
Group=mattermost
ExecStart=/opt/mattermost/bin/mattermost
TimeoutStartSec=3600
Restart=always
RestartSec=10
WorkingDirectory=/opt/mattermost
LimitNOFILE=49152

[Install]
WantedBy=mysql.service

Here you first specify the description of the service. Then, you state that the mysql service must be started before the Mattermost service since the Mattermost service needs MariaDB running to work. After the [Unit] section, you define the type of the service. notify means that the process will inform systemd that it’s loaded. You provide the command that will be executed and set the restart policy to always. You also define the working directory for the process and which user and group it should run as.

在这里,您首先指定服务的描述。 然后,您声明必须在Mattermost服务之前启动mysql服务,因为Mattermost服务需要运行MariaDB才能正常工作。 在[Unit]部分之后,您可以定义服务的类型。 notify表示该进程将通知systemd它已加载。 您提供将要执行的命令并将重启策略设置为always 。 您还定义了该进程的工作目录以及该进程的运行用户和组。

In the [Install] section, you specify the database service as the value for the WantedBy parameter to ensure that Mattermost restarts together with the database. Omitting this setting may pose a problem when the database is automatically updated, because Mattermost may stop working if not restarted.

[Install]部分中,将数据库服务指定为WantedBy参数的值,以确保Mattermost与数据库一起重新启动。 自动更新数据库时,忽略此设置可能会引起问题,因为如果不重新启动,Mattermost可能会停止工作。

Save and close the file, then reload all services by running the following command:

保存并关闭文件,然后通过运行以下命令重新加载所有服务:

  • sudo systemctl daemon-reload

    sudo systemctl守护进程重新加载

Check that it’s loaded correctly:

检查是否正确加载:

  • sudo systemctl status mattermost

    sudo systemctl状态最重要

You’ll see the following output:

您将看到以下输出:


   
   
Output
● mattermost.service - Mattermost Loaded: loaded (/lib/systemd/system/mattermost.service; disabled; vendor preset: enabled) Active: inactive (dead)

If systemd reports an error, double-check the file name of the service file, its location, and the validity of its contents.

如果systemd报告错误,请仔细检查服务文件的文件名,位置和内容的有效性。

Then, enable the Mattermost service by running:

然后,通过运行以下命令启用Mattermost服务:

  • sudo systemctl enable mattermost

    sudo systemctl最重要

In this step, you have downloaded Mattermost, configured it to use the MariaDB database, and created a systemd service for it. In the next step, you’ll expose it at your domain.

在此步骤中,您已经下载了Mattermost,将其配置为使用MariaDB数据库,并为其创建了systemd服务。 在下一步中,您将在域中公开它。

第2步-在您的域中展示Mattermost (Step 2 — Exposing Mattermost at Your Domain)

In this section, you will configure Nginx as a reverse proxy server for Mattermost.

在本节中,您将Nginx配置为Mattermost的反向代理服务器。

Before configuring Nginx, you’ll need to specify your domain in the main Mattermost config file. Open it for editing:

在配置Nginx之前,您需要在Mattermost主配置文件中指定您的域。 打开它进行编辑:

  • sudo nano /opt/mattermost/config/config.json

    须藤nano /opt/mattermost/config/config.json

Find the line that looks like the following:

查找如下所示的行:

/opt/mattermost/config/config.json
/opt/mattermost/config/config.json
. . .
"SiteURL": ""
. . .

Insert the name of your domain in the quotes:

在引号中插入您的域名:

/opt/mattermost/config/config.json
/opt/mattermost/config/config.json
...
"SiteURL": "http://mattermost.your-domain"
...

Save and close the file.

保存并关闭文件。

As you have learned in the Nginx prerequisite step, its site configuration files are stored under /etc/nginx/sites-available and must later be symlinked to /etc/nginx/sites-enabled to become active.

正如您在Nginx必备步骤中所了解的那样,其站点配置文件存储在/etc/nginx/sites-available并且以后必须与/etc/nginx/sites-enabled进行符号链接才能激活。

You’ll store the configuration for exposing Mattermost at your domain in a file named mattermost.conf, under /etc/nginx/sites-available. Create it using your editor:

您将把用于在您的域中公开Mattermost的配置存储在/etc/nginx/sites-available下的名为mattermost.conf的文件中。 使用您的编辑器创建它:

  • sudo nano /etc/nginx/sites-available/mattermost.conf

    须藤纳米/etc/nginx/sites-available/mattermost.conf

Add the following lines:

添加以下行:

/etc/nginx/sites-available/mattermost.conf
/etc/nginx/sites-available/mattermost.conf
upstream backend {
   server localhost:8065;
   keepalive 32;
}

proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=mattermost_cache:10m max_size=3g inactive=120m use_temp_path=off;

server {
   listen 80;
   server_name mattermost.your_domain;

   location ~ /api/v[0-9]+/(users/)?websocket$ {
       proxy_set_header Upgrade $http_upgrade;
       proxy_set_header Connection "upgrade";
       client_max_body_size 50M;
       proxy_set_header Host $http_host;
       proxy_set_header X-Real-IP $remote_addr;
       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
       proxy_set_header X-Forwarded-Proto $scheme;
       proxy_set_header X-Frame-Options SAMEORIGIN;
       proxy_buffers 256 16k;
       proxy_buffer_size 16k;
       client_body_timeout 60;
       send_timeout 300;
       lingering_timeout 5;
       proxy_connect_timeout 90;
       proxy_send_timeout 300;
       proxy_read_timeout 90s;
       proxy_pass http://backend;
   }

   location / {
       client_max_body_size 50M;
       proxy_set_header Connection "";
       proxy_set_header Host $http_host;
       proxy_set_header X-Real-IP $remote_addr;
       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
       proxy_set_header X-Forwarded-Proto $scheme;
       proxy_set_header X-Frame-Options SAMEORIGIN;
       proxy_buffers 256 16k;
       proxy_buffer_size 16k;
       proxy_read_timeout 600s;
       proxy_cache mattermost_cache;
       proxy_cache_revalidate on;
       proxy_cache_min_uses 2;
       proxy_cache_use_stale timeout;
       proxy_cache_lock on;
       proxy_http_version 1.1;
       proxy_pass http://backend;
   }
}

Replace mattermost.your-domain with your desired domain, then save and close the file.

最重要的是更换mattermost. your-domain mattermost. your-domain和所需的域,然后保存并关闭文件。

In this file, you define that Nginx should listen to HTTP port 80. Then, you specify a server_name that tells Nginx for which domain to accept requests and apply this particular configuration. The next two blocks further configure the proxy connections, so that Mattermost will work correctly.

在此文件中,您定义Nginx应该侦听HTTP端口80 。 然后,您指定一个server_name ,该名称告诉Nginx哪个域接受请求并应用此特定配置。 接下来的两个块将进一步配置代理连接,以便Mattermost可以正常工作。

To make this site configuration active, you will need to create a symlink to it in the /etc/nginx/sites-enabled folder by running:

要激活此站点配置,您需要通过运行以下命令在/etc/nginx/sites-enabled文件夹中创建指向该站点的符号链接:

  • sudo ln -s /etc/nginx/sites-available/mattermost.conf /etc/nginx/sites-enabled/mattermost.conf

    须藤ln -s /etc/nginx/sites-available/mattermost.conf /etc/nginx/sites-enabled/mattermost.conf

To test the validity of the configuration, run the following command:

要测试配置的有效性,请运行以下命令:

  • sudo nginx -t

    须藤Nginx -t

You’ll see the following output:

您将看到以下输出:


   
   
Output
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful

For the configuration to take effect, you’ll need to restart Nginx:

为了使配置生效,您需要重新启动Nginx:

  • sudo systemctl restart nginx

    sudo systemctl重启nginx

Then, start the Mattermost service by running:

然后,通过运行以下命令启动Mattermost服务:

  • sudo systemctl start mattermost

    sudo systemctl最重要的开始

When this command finishes, try navigating to your domain in your browser. You should see a page asking you to sign up:

该命令完成后,请尝试在浏览器中导航到您的域。 您应该会看到一个页面,要求您注册:

You now have your Mattermost installation available and accessible at your domain. In the next step, you’ll secure it by applying a free Let’s Encrypt TLS certificate.

现在,您可以在域中访问和访问Mattermost安装了。 在下一步中,您将通过应用免费的Let's Encrypt TLS证书来保护它。

步骤3 —保护您的域 (Step 3 — Securing Your Domain)

In this section, you will secure your domain using a Let’s Encrypt TLS certificate, which you’ll provision using Certbot.

在本节中,您将使用Let's Encrypt TLS证书保护您的域,该证书将使用Certbot进行设置。

You should have already installed Certbot as part of the prerequisites, so you’ll only need to install its Nginx plugin by running:

作为前提条件的一部分,您应该已经安装了Certbot,因此您只需要通过运行以下命令来安装其Nginx插件:

  • sudo apt install python3-certbot-nginx

    sudo apt安装python3-certbot-nginx

Also as part of the prerequisites, you enabled ufw (Uncomplicated Firewall) and configured it to allow unencrypted HTTP traffic. To be able to access the secured site, you’ll need to configure it to accept encrypted traffic by running the following command:

另外,作为先决条件的一部分,您启用了ufw (非复杂防火墙)并将其配置为允许未加密的HTTP流量。 为了能够访问受保护的站点,您需要通过运行以下命令将其配置为接受加密的流量:

  • sudo ufw allow https

    须藤ufw允许https

The output will be:

输出将是:


   
   
Output
Rule added Rule added (v6)

Similarly to Nginx, you’ll need to reload it for the configuration to take effect:

与Nginx类似,您需要重新加载它才能使配置生效:

  • sudo ufw reload

    sudo ufw重新加载

The output will show:

输出将显示:


   
   
Output
Firewall reloaded

To request certificates for your domain, run the following command:

要为您的域请求证书,请运行以下命令:

  • sudo certbot --nginx -d mattermost.your-domain

    sudo certbot --nginx -d最重要。 您的网域

In this command, you run certbot to request certificates for your domain—you pass the domain name with the -d parameter. The --nginx flag tells it to automatically change Nginx site configuration to support HTTPS. Remember to replace mattermost.your-domain with your domain name.

在此命令中,您运行certbot来请求您的域的证书-您通过-d参数传递域名。 --nginx标志告诉它自动更改Nginx站点配置以支持HTTPS。 切记要更换mattermost. your-domain mattermost. your-domain和您的域名。

If this is your first time running Certbot, you’ll be asked to provide an email address for urgent notices and to accept the EFF’s Terms of Service. Certbot will then request certificates for your domain from Let’s Encrypt. It will then ask you if you’d like to redirect all HTTP traffic to HTTPS:

如果这是您首次运行Certbot,则系统将要求您提供电子邮件地址以发出紧急通知并接受EFF的服务条款。 然后,Certbot将从Let's Encrypt请求您的域的证书。 然后它将询问您是否要将所有HTTP通信重定向到HTTPS:


   
   
Output
Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1: No redirect - Make no further changes to the webserver configuration. 2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for new sites, or if you're confident your site works on HTTPS. You can undo this change by editing your web server's configuration. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Select the appropriate number [1-2] then [enter] (press 'c' to cancel):

It is recommended to select the second option in order to maximize security. After you input your selection, press ENTER.

建议选择第二个选项,以最大程度地提高安全性。 输入选择后,按ENTER

Your output will be similar to this:

您的输出将类似于以下内容:


   
   
Output
IMPORTANT NOTES: - Congratulations! Your certificate and chain have been saved at: /etc/letsencrypt/live/mattermost.your-domain/fullchain.pem Your key file has been saved at: /etc/letsencrypt/live/mattermost.your-domain/privkey.pem Your cert will expire on 2020-09-28. To obtain a new or tweaked version of this certificate in the future, simply run certbot again with the "certonly" option. To non-interactively renew *all* of your certificates, run "certbot renew" - Your account credentials have been saved in your Certbot configuration directory at /etc/letsencrypt. You should make a secure backup of this folder now. This configuration directory will also contain certificates and private keys obtained by Certbot so making regular backups of this folder is ideal. - If you like Certbot, please consider supporting our work by: Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate Donating to EFF: https://eff.org/donate-le

This means that Certbot has successfully generated TLS certificates and applied them to the Nginx configuration for your domain.

这意味着Certbot已成功生成TLS证书并将其应用于您域的Nginx配置。

Since your domain can now be accessed using HTTPS, you’ll need to correct the URL of your domain in the main Mattermost config file. Open it for editing:

由于您现在可以使用HTTPS访问您的域,因此您需要在Mattermost主配置文件中更正您的域的URL。 打开它进行编辑:

  • sudo nano /opt/mattermost/config/config.json

    须藤nano /opt/mattermost/config/config.json

Once more, find the line that looks like this:

再一次,找到如下所示的行:

/opt/mattermost/config/config.json
/opt/mattermost/config/config.json
. . .
"SiteURL": "http://mattermost.your-domain"
. . .

Change http to https:

http更改为https

/opt/mattermost/config/config.json
/opt/mattermost/config/config.json
. . .
"SiteURL": "https://mattermost.your-domain"
. . .

That is all you need to edit, so save and close the file.

这就是您需要编辑的全部内容,因此保存并关闭文件。

Restart Mattermost by running:

通过运行以下命令重新启动Mattermost:

  • sudo systemctl restart mattermost

    sudo systemctl重启最重要

You can now reload your Mattermost domain in your browser and observe a padlock to the left of the site address, which means that you have properly secured your connection.

现在,您可以在浏览器中重新加载Mattermost域,并观察站点地址左侧的挂锁,这意味着您已正确保护了连接。

Now that your TLS certificates are configured successfully and your domain is accessible through a secure connection, you’re ready to configure Mattermost.

现在,您的TLS证书已成功配置,并且可以通过安全连接访问您的域,现在就可以配置Mattermost。

第4步-设置Mattermost (Step 4 — Setting up Mattermost)

In this section, you’ll create your team in Mattermost, set up email notifications, and change server branding.

在本部分中,您将在Mattermost中创建团队,设置电子邮件通知并更改服务器品牌。

When you access Mattermost for the first time, you need to create an account with admin privileges to your server. If you already have an account, you can log in instead. Once you’re logged in, you’ll see a page telling you that there are no teams you can join.

首次访问Mattermost时,您需要创建一个对服务器具有管理员权限的帐户。 如果您已经有一个帐户,则可以登录。 登录后,您会看到一个页面,告诉您没有可以加入的团队。

To remedy this, select Create a team. You’ll see a page asking you to name your team (for instance, Sammy):

要解决此问题,请选择创建团队 。 您会看到一个页面,要求您命名团队(例如Sammy ):

Enter a name of your choice and click Next. It’ll then ask you to define a web address for your team, at your domain, which will be the access point for your team in Mattermost:

输入您选择的名称,然后单击下一步 。 然后,它将要求您在您的域中为您的团队定义一个网址,该地址将成为您在Mattermost中的团队的访问点:

You can leave the URL unchanged. Once you’re done, click Finish. Mattermost will create your team and after you skip the tutorial, you’ll see the main interface, where you’ll spend most of your time communicating:

您可以保持URL不变。 完成后,点击完成 。 Mattermost将创建您的团队,并且在您跳过本教程之后,您将看到主界面,您将在其中花费大部分时间进行沟通:

The interface will be explained in detail in the next step. To access settings, click on your username in the upper left corner and then System Console. You’ll be able to access this option only if you are an admin user.

该界面将在下一步中详细说明。 要访问设置,请单击左上角的用户名,然后单击系统控制台 。 只有管​​理员用户才能访问此选项。

On the left side is a menu providing access to sections of Mattermost configuration. You’ll first set up email notifications, so click the SMTP option, which can be found under Environment:

左侧是菜单,提供对Mattermost配置部分的访问。 首先,您将设置电子邮件通知,因此请单击SMTP选项,该选项可在Environment下找到:

To connect to the Postfix server you installed as part of the prerequisites, type in localhost as the SMTP Server, and 25 as the SMTP Server Port. Click the blue Save button when you’re done and then press the Test Connection button located further down. You’ll receive a message in a green box saying No errors were reported while sending an email. Please check your inbox to make sure.

要连接到作为先决条件一部分安装的Postfix服务器,请键入localhost作为SMTP Server ,并输入25作为SMTP Server Port 。 完成后,单击蓝色的“ 保存”按钮,然后按一下更下方的“ 测试连接”按钮。 您会在绿色框中收到一条消息, 指出发送电子邮件时未报告任何错误。 请检查您的收件箱以确保。

You can now check the inbox of the email you signed up with. You’ll find a message from Mattermost, saying that the email settings are set up correctly. If you don’t receive it, check your spam folder. In case you received an error from Mattermost, double-check what you entered, and if required, go through the prerequisite tutorial once again.

现在,您可以检查注册电子邮件的收件箱。 您会发现来自Mattermost的消息,说明电子邮件设置正确。 如果没有收到,请检查您的垃圾邮件文件夹。 如果您收到来自Mattermost的错误,请仔细检查您输入的内容,如果需要,请再次阅读前提条件教程。

Now that you’ve verified that emails are working, you need to enable email notifications by selecting Notifications underneath Site Configuration in the menu. Set the Enable Email Notifications setting to true and set the Notification From Address to an email address of your choice, such as mattermost@your_domain.

现在你已经验证了电子邮件在工作,你需要在菜单中选择站点配置通知启用电子邮件通知。 将“ 启用电子邮件通知”设置为true然后将“ 通知发件人地址”设置为您选择的电子邮件地址,例如mattermost@ your_domain

Because it does not need to actually exist, and will not be monitored, type in no-reply as the Notification Display Name, which is the sender’s name that will show in the email client. You can optionally Enable Email Batching to compress multiple unread messages into one email to reduce the overall number of emails that you send to members of your team. Click Save when you’re done modifying the settings.

因为它实际上并不需要存在,也不会受到监视,所以请输入no-reply作为Notification Display Name ,这是将显示在电子邮件客户端中的发件人名称。 您可以选择启用“电子邮件批处理”将多个未读消息压缩为一封电子邮件,以减少发送给团队成员的电子邮件总数。 修改完设置后,点击保存

You’ve globally enabled email notifications, and you can now optionally change the server branding by selecting the Customization option below Site Configuration. Here you can set the Site Name and Site Description, as well as upload a custom brand image and text.

您已全局启用了电子邮件通知,现在可以选择在网站配置下方选择定制选项,以更改服务器品牌。 在这里,您可以设置网站名称网站描述 ,以及上传自定义品牌图片和文字。

You can exit the System Console by clicking on your username in the upper left corner and selecting the first option from the dropdown menu.

您可以通过单击左上角的用户名并从下拉菜单中选择第一个选项来退出系统控制台

You’ve created your team in Mattermost and set up email notifications, so you’ll be kept informed about new discussions occurring in your team.

您已经在Mattermost中创建了团队并设置了电子邮件通知,因此可以随时了解团队中正在进行的新讨论。

结论 (Conclusion)

You now have your own scalable, self-hosted messaging platform, that you and your team can use to collaborate across all devices. You will now be able to communicate more efficiently, share files, and search across messages and channels with ease.

现在,您拥有自己的可伸缩,自托管的消息传递平台,您和您的团队可以使用该平台在所有设备上进行协作。 现在,您将能够更有效地交流,共享文件以及轻松地跨消息和渠道进行搜索。

Mattermost does not provide video and audio meeting features. To set up video conferencing, check out our tutorial on Jitsi Meet, an open source application that provides encrypted multi-person conference rooms.

Mattermost不提供视频和音频会议功能。 要设置视频会议,请查看我们关于Jitsi Meet的教程,该软件是一个提供加密的多人会议室的开源应用程序。

If you’d like to learn more about using the Mattermost user interface, visit the official documentation.

如果您想了解更多有关使用Mattermost用户界面的信息,请访问官方文档

翻译自: https://www.digitalocean.com/community/tutorials/how-to-set-up-mattermost-on-ubuntu-18-04

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值