惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V2EX - 技术
V2EX - 技术
P
Privacy International News Feed
Security Latest
Security Latest
H
Hacker News: Front Page
T
Tenable Blog
The Hacker News
The Hacker News
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
S
Security @ Cisco Blogs
Project Zero
Project Zero
O
OpenAI News
AI
AI
Spread Privacy
Spread Privacy
C
CERT Recently Published Vulnerability Notes
The Last Watchdog
The Last Watchdog
G
GRAHAM CLULEY
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Scott Helme
Scott Helme
Application and Cybersecurity Blog
Application and Cybersecurity Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
C
CXSECURITY Database RSS Feed - CXSecurity.com
NISL@THU
NISL@THU
A
Arctic Wolf
T
Threat Research - Cisco Blogs
PCI Perspectives
PCI Perspectives
N
News and Events Feed by Topic
C
Cyber Attacks, Cyber Crime and Cyber Security
C
Cybersecurity and Infrastructure Security Agency CISA
Simon Willison's Weblog
Simon Willison's Weblog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Know Your Adversary
Know Your Adversary
Google Online Security Blog
Google Online Security Blog
罗磊的独立博客
L
LINUX DO - 最新话题
U
Unit 42
S
Security Affairs
有赞技术团队
有赞技术团队
WordPress大学
WordPress大学
博客园 - 【当耐特】
T
The Exploit Database - CXSecurity.com
S
Schneier on Security
月光博客
月光博客
Engineering at Meta
Engineering at Meta
腾讯CDC
F
Full Disclosure
Cyberwarzone
Cyberwarzone
S
SegmentFault 最新的问题
Recorded Future
Recorded Future
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
博客园 - 司徒正美
The Cloudflare Blog

bbb-lsy07

初中最后一次出京研学:内蒙古探索 免费注册.CYOU .BOND顶级域名 首次备案成功并进行服务器迁移小记 OpenClaw + 1Panel 快速部署-搭建你的专属 AI 助理 小白硬核建站记系列合集 河南研学记录 Zmail + .ip6.arpa 自建永久免费临时邮箱 搭建VoceChat家庭聊天服务器 免费实现未备案域名解析国内服务器 免费获得17级域名并且托管在CF——IPv6反解域名 一个高仿某红薯平台-部署教程 教你部署Astro Fuwari静态博客 雨云日本东京服务器测评 免费部署Lsky Pro+ 新的开源ICP备案系统Yuan-ICP 高拓展性的新一代备案系统 真正零基础:Halo博客搭建的极简指南(全程UI,无需命令) Grok4 终于免费了-简单测评和对比GPT-5 常用十六进制色表-点击复制 CF的R2存储实现一个在线网盘——榨干Cloudflare!
速建Discourse论坛-小白也可以
bbb-lsy07 · 2025-09-06 · via bbb-lsy07

前言:

在当今这个连接日益紧密的数字时代,拥有一个属于自己的社区,无论是用于客户支持,还是兴趣分享。一个活跃的社区是不可或缺的。

在众多的论坛平台中,Discourse 以其现代化设计、强大的功能和开放源代码的特性脱颖而出。然而,一到“部署”,许多小白新手、甚至是一些有一定经验的小伙伴,在搭建时也可能碰到一些奇怪的问题,导致望而却步。

这篇教程正是为此而生,将带你用最快、最简单的方式,从零开始搭建起一个 Discourse 论坛。我们将拆解每一个步骤,抚平每一个可能遇到的坑。

前提准备:

1.至少2GB内存的服务器(推荐雨云

2.域名(子域名也可以)

3.可正常使用的SMTP发件服务,包括相关配置

搭建教程:

1.安装环境

1.1.面板或Docker(下面两个操作二选一即可):

(1)这里服务器使用的系统是Debian 12,其他的系统一般也都是支持的。首先安装1panel面板,这样会使操作更简单(如有疑问可参考下面文章安装):

文章地址:点此跳转

(2)如果不安装1panel面板,则不会自动安装Docker,我们来手动安装:

sudo apt install docker.io

1.2.增加交换空间(一般不需要)

增加交换空间SWAP,这会对内存小的机器有一定帮助:

install -o root -g root -m 0600 /dev/null /swapfile
dd if=/dev/zero of=/swapfile bs=1k count=1024k
mkswap /swapfile
swapon /swapfile
echo "/swapfile swap swap auto 0 0" | tee -a /etc/fstab
sysctl -w vm.swappiness=10

1.3.更新系统补丁或系统,修复可能的bug

apt update
apt upgrade -y

1.4.安装git和ruby

sudo apt-get install git
sudo apt-get install ruby

2.快速安装脚本

直接全部复制粘贴:

git clone https://github.com/discourse/discourse_docker.git /var/discourse
cd /var/discourse
chmod 700 containers
./discourse-setup

期间会弹出一些问题需要填写:

Hostname for your Discourse? [discourse.example.com]: 
Email address for admin account(s)? [me@example.com,you@example.com]: 
SMTP server address? [smtp.example.com]: 
SMTP port? [587]: 
SMTP user name? [user@example.com]: 
SMTP password? [pa$word]: 
Let's Encrypt account email? (ENTER to skip) [me@example.com]: 
Optional Maxmind License key () [xxxxxxxxxxxxxxxx]:

不出意外,输入信息后等待5分钟左右即可安装完成,这个时候就可以访问你设置的域名查看:

写在最后

浩渺云海间,缘分如丝牵,若您为网站之精髓所动,可于下方订阅之卷,或诸平台觅得契合之径,唯需寄一封电邮之名,便与吾辈缔结灵犀,共享智慧之光,永续共鸣。