关于 Raspberry Pi 的讨论 | 博客

我们社区长期以来一直要求的功能终于实现了!从今天起,您可以在 35 美元的树莓派上托管完整的 Discourse 实例。您可以按照我们的 官方安装指南 进行操作,它可以在任何较新的树莓派型号上开箱即用。


这是原始条目 https://blog.discourse.org/2021/12/2021-12-07-discourse-on-a-raspberry-pi/ 的配套讨论主题
54 个赞

Discourse 又一次对行业产生了巨大的影响!

16 个赞

这太棒了。
我认为值得一提的是,Oracle Cloud 提供免费的 ARM Ampere A1 核心(数量为 4 个)和 24GB RAM,这些可以用于最多 4 个虚拟机。

17 个赞

这为我提供了另一个树莓派的好借口 :tada:

18 个赞

太棒了!:heart_eyes:

我一直想为我的邻居们搭建一个本地网络,上面有一个我们论坛的镜像,以便在停电时用于紧急通信。现在尝试让这件事实现会很有趣!

12 个赞

太棒了。
我向Jeff Geerling提到了这件事。
也许我们会看到一个关于在Raspberry Pi集群上搭建Discourse站点的YouTube视频。

9 个赞

您认为一个普通人能否按照说明仔细安装 Discourse,还是需要成为一名开发者才能理解其中的术语?

3 个赞

太棒了!

使用 SD 卡或 SSD 的 RPi4 性能差异如何?SD 卡足够吗?

我找到了这个:Install Discourse on a residential internet with Cloudflare Tunnel

最后一个问题:您在 RPi4 上使用的是 64 位还是 32 位操作系统?Ubuntu Server 20.04.3 LTS 64 位适用于 Raspberry Pi 4 吗?

4 个赞

只要数据库很小,应该没有区别。如果您的数据库大于 Pi RAM,这可能是一个提示,表明您应该更换为更强大的设备 :sweat_smile:

Raspbian arm64 版本,来自 Index of /raspios_lite_arm64/images/raspios_lite_arm64-2021-11-08

4 个赞

不幸的是,失败了……

FAILED
--------------------
Pups::ExecError: cd /var/www/discourse & [ ! -d 'node_modules' ] || su discourse -c 'yarn install --production & yarn cache clean' failed with return #<Process::Status: pid 3539 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params {"cd"=>"$home", "cmd"=>["[ ! -d 'node_modules' ] || su discourse -c 'yarn install --production & yarn cache clean'"]}
53e9103763b3963785452f314d9c0023f280ebe76d33a1271a6439d23e8c8ad9
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.
1 个赞

你能

请向上滚动并查找之前的错误消息,可能不止一条。
吗?

1 个赞
I, [2022-01-24T00:30:34.893970 #1]  INFO -- : \u003e cd /var/www/discourse \u0026\u0026 [ ! -d 'node_modules' ] || su discourse -c 'yarn install --production \u0026\u0026 yarn cache clean'
warning Resolution field "lodash@4.17.21" is incompatible with requested version "lodash@4.17.15"
2022-01-24 00:31:15.883 UTC [59] LOG:  stats collector is not responding, using stale statistics instead
2022-01-24 00:31:26.025 UTC [3596] LOG:  stats collector is not responding, using stale statistics instead
2022-01-24 00:31:55.876 UTC [59] LOG:  stats collector is not responding, using stale statistics instead
2022-01-24 00:32:06.068 UTC [3606] LOG:  stats collector is not responding, using stale statistics instead
2022-01-24 00:32:15.830 UTC [59] LOG:  stats collector is not responding, using stale statistics instead
2022-01-24 00:32:26.023 UTC [3617] LOG:  stats collector is not responding, using stale statistics instead
2022-01-24 00:32:40.294 UTC [3621] LOG:  stats collector is not responding, using stale statistics instead
2022-01-24 00:32:55.848 UTC [59] LOG:  stats collector is not responding, using stale statistics instead
2022-01-24 00:33:06.000 UTC [3627] LOG:  stats collector is not responding, using stale statistics instead
2022-01-24 00:33:20.766 UTC [3628] LOG:  stats collector is not responding, using stale statistics instead
2022-01-24 00:33:55.862 UTC [59] LOG:  stats collector is not responding, using stale statistics instead
2022-01-24 00:34:06.039 UTC [3634] LOG:  stats collector is not responding, using stale statistics instead
2022-01-24 00:34:22.558 UTC [3635] LOG:  stats collector is not responding, using stale statistics instead
2022-01-24 00:34:35.852 UTC [59] LOG:  stats collector is not responding, using stale statistics instead
2022-01-24 00:34:46.031 UTC [3637] LOG:  stats collector is not responding, using stale statistics instead
2022-01-24 00:34:55.859 UTC [59] LOG:  stats collector is not responding, using stale statistics instead
2022-01-24 00:35:06.036 UTC [3638] LOG:  stats collector is not responding, using stale statistics instead
error An unexpected error occurred: "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.3.tgz: ESOCKETTIMEDOUT".
I, [2022-01-24T00:35:14.127245 #1]  INFO -- : yarn install v1.22.17
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info If you think this is a bug, please open a bug report with the information provided in "/var/www/discourse/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

I, [2022-01-24T00:35:14.128342 #1]  INFO -- : Terminating async processes
I, [2022-01-24T00:35:14.128463 #1]  INFO -- : Sending INT to HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/13/bin/postmaster -D /etc/postgresql/13/main pid: 52
I, [2022-01-24T00:35:14.128549 #1]  INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 113
2022-01-24 00:35:14.128 UTC [52] LOG:  received fast shutdown request
113:signal-handler (1642984514) Received SIGTERM scheduling shutdown...
113:M 24 Jan 2022 00:35:14.221 # User requested shutdown...
113:M 24 Jan 2022 00:35:14.221 * Saving the final RDB snapshot before exiting.
I, [2022-01-24T00:35:24.131678 #1]  INFO -- : HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/13/bin/postmaster -D /etc/postgresql/13/main pid:52 did not terminate cleanly, forcing termination!
I, [2022-01-24T00:35:24.132139 #1]  INFO -- : exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid:113 did not terminate cleanly, forcing termination!
1 个赞

然后就出现了:

你的网络连接太不稳定,无法构建 Discourse。我刚刚在我的有线 Pi4 上重新构建没有问题,所以你可能需要检查一下你的网络。

4 个赞

您的网站已离线。


另外,如果准确的话,生日快乐 :tada:

5 个赞

哦,谢谢提醒。几个月前搬家时弄丢了。现在重新打开并更新到最新版本了。

谢谢!

6 个赞

你好 @Falco,感谢分享如此精彩的信息。
我已经在你的帮助下成功运行了我的第一个论坛!
我的 discourse 主机名已经设置为一个域名(从 freenom 获取),在这种情况下,我是否可以通过机器的本地 IP 地址访问论坛?
当我尝试使用机器的 IP 地址访问论坛时,页面总是卡在加载状态,从未成功加载。
我有一个用例,我的客户端机器连接到某个 VPN,无法访问互联网。我唯一能访问论坛的方式是通过本地网络的 IP 地址。

2 个赞

您可能会觉得这个讨论很有用。您正在请求对一个非常不标准的安装进行支持:

2 个赞

感谢 @merefield
我发现在服务器的本地 IP 地址上使用 curl 时,它会返回页面,但使用浏览器却不行。
这与浏览器的设置有关吗?

您需要通过域名访问该应用程序,原因如下。据我所知,不支持 IP 访问。

1 个赞

好的!感谢您的确认。

1 个赞