安装
使用github安装
克隆话语存储库
git clone https://github.com/discourse/discourse.git ~/discourse
创建与Ubuntu系统用户名相同名称的角色:
sudo -u postgres createuser -s "$USER"
切换到您的话语文件夹并安装所需的宝石
cd ~/discourse
source ~/.bashrc
bundle install
现在您已经成功配置了数据库连接,请运行以下命令:
bundle exec rake db:create
bundle exec rake db:migrate
RAILS_ENV=test bundle exec rake db:create db:migrate
现在,尝试运行规格:
bundle exec rake autospec
启动导轨服务器:
bundle exec rails server
使用Docker安装
登录为根用户后,我们可以通过输入以下命令开始Docker安装。您应该在整个设置和引导过程中使用root用户。
sudo -s
git clone https://github.com/discourse/discourse_docker.git /var/discourse
现在,将CD到话语文件夹中。
cd /var/discourse
接下来,您将运行话语设置命令。
./discourse-setup
接下来,将向您询问一系列需要进行安装所需的问题。
Hostname for your Discourse? [forum.example.com]:
Email address for admin account(s)? [me@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]:
话语设置将创建一个app.yml文件并启动引导过程,该过程可能需要两到八分钟。此部分完成后,您可以继续进行基于浏览器的设置。 恭喜!您已经成功安装了话语