蔡秀吉
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    1
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # 部署 Mattermost Omnibus 伺服器並上傳 Focalboard 插件(模組) > [name=蔡秀吉]<br/>[time=June 05, 2024][color=#F4B400] > 官方指南:[Install Mattermost Omnibus](https://docs.mattermost.com/install/installing-mattermost-omnibus.html) :::spoiler 目錄 [TOC] ::: ## 前言 今年 COSCUP 2024 本人的社群議程有幸被錄取。由於受到 Trello 免費版政策調整的影響,所以今年 COSCUP 也轉戰 Mattermost 一個開源的專案管理團隊協作工具。 > 2024年5月20日之後,Trello 免費工作區將限制為 10 名協作者,包括成員、訪客和待處理邀請。[color=#6b51c1] Focalboard 是 Mattermost 的一個插件,但由於 Focalboard 整合進了 Mattermost 生態系統,所以現在會叫做 Mattermost Boards。 > 官方註解:Boards 已不再是 Mattermost **預設產品**的一部分,目前作為插件使用。[(資料來源)](https://mattermost.com/blog/mattermost-boards-how-to-project-management/)[color=#6b51c1] 本指南主要教學如何在你的虛擬機(VM)或實例(Instance)上面,安裝 Mattermost Omnibus 伺服器,並安裝 Focalboard 模組(插件)。 我安裝 Mattermost Omnibus 這個版本的原因,是因為我們是一個任務型組織,且人數不多,同時希望實現工作和生活分割。因此,如果你和我們一樣是屬於小型團隊(如:實驗室小組、任務性團隊)人數和需求不大,用不到太多華麗的功能,剛好硬體資源也不多,那麼安裝 Mattermost Omnibus 將會是你最佳的選擇。 因為 Mattermost Omnibus 是一個封裝好的安裝程序,它將部署 Mattermost 伺服器所需的所有先決套件(如:PostgreSQL 資料庫、部屬 Nginx 代理)全部整合其中,簡化了安裝過程,減少維運成本,讓你可以輕鬆快速地部署和運行 Mattermost。 > [官方建議](https://docs.mattermost.com/install/installing-mattermost-omnibus.html#configure-mattermost-omnibus):如果你會將 Mattermost 伺服器和資料庫運作在同一個系統上,那麼推薦安裝 Mattermost Omnibus。[color=#6b51c1] 由於 Omnibus 僅支援 Ubuntu 發行版。所以作業系統只能安裝: * **Ubuntu Focal - 20.04 LTS** * **Ubuntu Jammy - 22.04 LTS** ## 在新增 apt 儲存庫之前刪除舊金鑰 * 對於 Ubuntu Focal - 20.04 LTS: ```bash= sudo apt-key del A1B31D46F0F3A10B02CF2D44F8F2C31744774B28 curl -sL -o- https://deb.packages.mattermost.com/pubkey.gpg | gpg --dearmor | sudo apt-key add ``` * 對於 Ubuntu Jammy - 22.04 LTS: ```bash= sudo rm /usr/share/keyrings/mattermost-archive-keyring.gpg curl -sL -o- https://deb.packages.mattermost.com/pubkey.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/mattermost-archive-keyring.gpg > /dev/null ``` ## 設定儲存庫 新增 Mattermost PPA 的資料庫。請在終端機視窗中,執行以下設定儲存庫的命令: ```bash= curl -o- https://deb.packages.mattermost.com/repo-setup.sh | sudo bash ``` 這條命令設置了 PostgreSQL 資料庫所需的軟體來源,並設置 NGINX Web 伺服器作為代理,配置 certbot,用來簽發和更新 SSL 證書,並設置了 Mattermost Omnibus 的軟體來源以便執行安裝的命令。 請注意,由於下一步是安裝 Mattermost Omnibus,所以執行了下面那個 **[安裝 Mattermost Omnibus](https://hackmd.io/hYLcK532Szyiq_lfP8kivg?view#%E5%AE%89%E8%A3%9D-Mattermost-Omnibus)** 的命令後,系統會要求你提供一個指定網域名稱和電子郵件地址來簽發憑證。這兩個資訊將用於產生證書和發送相關通知。並且,安裝完所有軟體套件後,Omnibus 會執行 ansible 腳本來設定所有平台元件並啟動伺服器。 因此在此之前你必須要: 1. 確定你購買的網域其 **DNS A 紀錄**有正確的被設置,使**網域能夠正確的被解析到你伺服器的ip**(請前往你購買 domain 的網站 如:godaddy,調整 DNS 管理的設置,將所有 Type A 的紀錄(包含 @ 和 www)的 RDATA,都要改成你伺服器中用於對外的 IP) ![image](https://hackmd.io/_uploads/SJoqWHgrR.png) > 更改成你伺服器用於對外的ip,讓你無論您輸入 IP 位址或網域名稱,都可以連線至你的 Mattermost 伺服器。 2. 確保伺服器的防火牆和**安全組設定**允許外部使用 HTTP (80) 和 HTTPS (443) 的 port 來訪問。 > 如果你的 Mattermost 伺服器託管在雲平台(如 AWS、Google Cloud、Azure 或 openstack)上,你可能會需要**調整安全組(Security Groups)規則**,新增 HTTP (80) 和 HTTPS (443) ,並允許從任何來源(或限定的 IP 範圍)的訪問。[color=#6b51c1] 3. 確保 NGINX 配置允許訪問 **(不一定需要)** 需要確保 NGINX 的配置文件有被正確的設定,以允許 Let's Encrypt 的認證機構訪問你的網站進行驗證。 ```yaml= server { listen 80; server_name your_domain.com; # 替換成您的域名 location /.well-known/acme-challenge/ { root /var/www/html; # 確保這個路徑是可以訪問的並對應到您的網站目錄 try_files $uri =404; } # 重定向所有 HTTP 流量到 HTTPS location / { return 301 https://$server_name$request_uri; } } ``` ```bash= sudo nginx -t # 檢查配置文件是否有語法錯誤 sudo systemctl reload nginx # 重新加載 NGINX ``` 這些前提都處理完成之後,就可以進入下一步**安裝 Mattermost Omnibus**了。 ## 安裝 Mattermost Omnibus 在終端機視窗中,執行以下命令來安裝 Omnibus。 ```bash= sudo apt install mattermost-omnibus -y ``` > 輸入這行指令後,系統會叫你填寫網域,而後是你的電子信箱,用於發生警告時與你聯繫。[color=#6b51c1] 如果有設置正確,那到這邊基本上就是大功告成了!你可以在瀏覽器的網址列輸入你購買的網域或是伺服器用於對外的ip,應該就會進入註冊 mattermost 使用者的介面。 > 如果伺服器用於內部使用,你可以直接使用服務器的 IP 地址作為網域名稱,但不推薦直接將IP暴露在外網。[color=#6b51c1] 不過你也可以執行下面這條指令,讓你的 mattermost 伺服器處在最新版本。 ``` sudo apt update && sudo apt upgrade ``` 請注意:如果在設置域名的環節出錯,請使用下列這條命令來重新配置 Mattermost,這次請使用正確(有效)的域名而不是 IP 地址。 ``` dpkg-reconfigure mattermost-omnibus ``` 其餘關於備份、刪除、設置 Mattermost 伺服器的細節,請詳閱 [安裝 Mattermost Omnibus 的官方指南](https://docs.mattermost.com/install/installing-mattermost-omnibus.html), ## 下載 Boards 模組(mattermost plugin focalboard) Mattermost Omnibus 是沒有預裝 Boards 的,也無法在模組市集內找到,因此需要手動下載 focalboard plugin,並手動上傳至 Mattermost Omnibus。 你可以到這邊手動下載[最新版本的 focalboard plugin](https://github.com/mattermost/focalboard/releases)。 > 請下載:mattermost-plugin-focalboard.tar.gz #這個名稱的檔案[color=#6b51c1] ## 啟用模組上傳功能並調整上傳容量限制 ### 要如何上傳模組至你的 Mattermost 伺服器呢? 登入你的 Mattermost 伺服器,轉到系統控制台(System Console)--> 模組管理(Plugin Management)。 > 登入Mattermost 伺服器之後,可以將平台語言換成繁體中文。[color=#6b51c1] > ![image](https://hackmd.io/_uploads/rybh9KlHR.png) > 抵達圖中紅框處,模組管理這個頁面[color=#db3e29] 到了**模組管理**的頁面,你會發現雖然上傳功能沒有被禁用,但卻無法上傳模組。這時就需要遵循以下步驟來啟用模組上傳功能並調整上傳容量限制,來把剛剛從 github 下載的模組上傳至 Mattermost 伺服器。 > 由於 Mattermost Omnibus 儲存設置檔案(configuration)的路徑和一般的 Mattermost 伺服器不同,Omnibus 將設置檔案(configuration)儲存在 /etc/mattermost/mmomni.yml 中,而非儲存在 config.json 裡面。[color=#6b51c1] 因此你需要遵循以下步驟,來啟用模組上傳功能並調整上傳容量限制 ```bash= sudo nano /etc/mattermost/mmomni.yml ``` 命令列視窗會跳出類似於下方的畫面 ```yaml= db_user: mmuser db_password: YOURPASSWORDYADAYADAYADA fqdn: your.doamin.com email: XXXXX@gmail.com https: true data_directory: /var/opt/mattermost/data enable_plugin_uploads: false #Change into true enable_local_mode: true client_max_body_size: 50M #Set bigger than the plugin File size ``` 儲存並退出編輯器: * 如果你使用的是 nano,按下 Ctrl+O 儲存更改,然後按下 Enter 確認文件名,最後按 Ctrl+X 退出。 * 如果你使用的是 vi 或 vim,按下 Esc 進入命令模式,然後輸入 :wq 儲存並退出。 修改完之後,記得 reconfigure 你的 Mattermost Omnibus。 ``` sudo mmomni reconfigure ``` ### 在Mattermost Omnibus 伺服器新增一個Boards 重新登入伺服器後,你應該就能在左邊導航欄的最上方看到一個九宮格,點一下九宮格你就會看到 boards ![image](https://hackmd.io/_uploads/Bys0TtlHA.png) > 圖中右上角紅框[color=#6b51c1] ### 關於本篇技術文檔作者 蔡秀吉,現於查理大學附設醫院實習,並於布拉格理工大學訪問研究,進行 [**開放電信網路(O-RAN)**](https://youtu.be/m4126uQk0T8) 和 [**電信網路雲原生**](https://youtu.be/mdnsU79Gr5Q) 的相關研究。 就讀陽明交大大三,喜歡研究開放電信網路(O-RAN)及其相關的技術發展,感興趣的領域有:雲原生、人工智慧、表觀遺傳學、體外循環系統。 #### 聯絡資訊 * hctsai@linux.com * https://www.facebook.com/thc1006

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully