如何在 Windows 本地主机上安装 Discourse?

我想在我的本地机器上安装 Discourse,我的操作系统是 Windows 8。请帮助我在本地主机上安装 Discourse。

我已经在本地安装了网站,现在我想安装 Discourse。

helicalinsight.com(这是我的网站),我在网站上有一个 Discourse 论坛:forum.helicalinsight.com

现在我想使用 forum.localhost(这可行吗?)

我对 Rails 应用一无所知(我也参考了这篇文章,但对我没有帮助:https://blog.discourse.org/2013/04/discourse-as-your-first-rails-app/)

谢谢

1 个赞

Have a look at Beginners Guide to Install Discourse on Windows 10 for Development for details about setting up a dev environment on Windows. You will need to upgrade from Windows 8. An alternative would be to install Linux on your computer and then follow Beginners Guide to Install Discourse on Ubuntu for Development.

7 个赞

[command line instructions ahead…]

Vagrant, a virtual machine manager written in Ruby, is an option for Windows 8; it provides a WSL-like environment (Windows Subsystem for Linux, a Windows 10 feature).

Vagrant can use Docker, Hyper-V or VirtualBox as a virtual machine provider, in case you already have one of those installed. If not, the easiest tool to use for setup is Chocolatey; once Chocolatey is installed, the command choco install -y virtualbox vagrant will install both Vagrant and VirtualBox.

From there, follow the Vagrant Project Setup guide to install an Ubuntu VM, e.g. vagrant init hashicorp/bionic64 (or bionic32 if your Windows 8 install is 32-bit).

Beginners Guide to Install Discourse on Windows 10 for Development should be usable from there (I hope).

3 个赞

Note. Vagrant is not supported at all, you would use either a VM or WSL2 which is probably the easiest.

8 个赞

Vagrant is just a VM manager, for VMs provided by Microsoft’s Hyper-V, or VirtualBox, or VMware (more involved setup, but possible to use). In that sense, Vagrant is a lot like WSL2 which just provides a specialized Hyper-V VM with some additional Microsoft-sanctioned Windows/Linux integration.

1 个赞

I may be mistaken but the expectation with vagrant would be that we maintain config for it and publish an image. These are 2 things that are not on the table.

For a very low touch setup that allows you to go from 0 - 100 very quickly use WSL2 + Docker dev

Beginners Guide to Install Discourse for Development using Docker

4 个赞

忘了这个线程被搁置了。Vagrant 只是一个开发工具(虚拟机管理器),并不严格需要配置文件才能发挥作用,更不需要专用镜像(它可以快速启动一个能够托管 Docker 并运行 Discourse 脚本如 discourse-setuplauncher 的虚拟机,完全没问题)。

discourse_docker/blob/master/Vagrantfile 中已存在 Vagrantfile 文件,
而在 discourse_docker/blob/master/README.md 末尾也有针对修改 discourse_docker 的简单说明。