개발용 Ubuntu 또는 Debian에 Discourse 설치하기

:warning: 이 가이드는 개발 환경에서의 설치 지침을 다룹니다. 프로덕션 환경 설치 가이드는 다음을 참조하세요: Install Discourse in production with the official supported instructions


Discourse를 Ubuntu 또는 Debian에 설정하여 개발하고 해킹(개발 작업)을 하길 원하시나요?

로컬에서 작업하고 있으며, Ubuntu 또는 Debian 시스템에 Ruby/Rails/Postgres/Redis가 설치되어 있지 않은 것으로 가정합니다. 시작해 보겠습니다!

요구 사항

최소 4GB의 RAM과 2개의 CPU 코어를 권장합니다.

현재 호환성:

OS 호환성
Debian 11 :white_check_mark:
Crostini (Linux on ChromeOS) :white_check_mark:
Ubuntu 22.04 또는 그 이상 :white_check_mark:

Discourse 종속성 설치

시스템에 다음 패키지가 필요합니다:

** 선택 사항

이제 Discourse 종속성이 설치되었으므로, Discourse 자체를 설치하는 단계로 넘어가 보겠습니다.

Discourse 클론

Discourse 저장소를 ~/discourse 폴더에 클론합니다:

git clone https://github.com/discourse/discourse.git ~/discourse

~는 홈 폴더를 나타내므로, Discourse 소스 코드는 홈 폴더에서 사용할 수 있게 됩니다.

데이터베이스 설정

Linux 시스템 사용자 이름과 동일한 이름으로 역할을 생성합니다:

cd /tmp && sudo -u postgres createuser -s "$USER"

[/details]

Discourse 부트스트랩

Discourse 폴더로 이동합니다:

 cd ~/discourse

필요한 gems를 설치합니다

source ~/.bashrc
bundle install

JS 종속성을 설치합니다

pnpm install

gems가 성공적으로 설치되었으므로, 다음 명령어를 실행합니다:

bin/rails db:create
bin/rails db:migrate
RAILS_ENV=test bin/rails db:create db:migrate

rails와 프론트엔드 번들을 시작합니다:

bin/dev

이미지가 표시되지 않으면 다음 명령어를 대신 사용하세요:
(원격 서버에서 작업 중이라면 IP를 지정할 수도 있습니다)

DISCOURSE_HOSTNAME=localhost UNICORN_LISTENER=localhost:3000 bin/dev

이제 http://localhost:3000으로 이동하여 로컬 Discourse 설치를 확인해야 합니다.

새 관리자 생성

새 관리자를 생성하려면 다음 명령어를 실행합니다:

bin/rails admin:create

프롬프트를 따르면 새 관리자 계정이 생성됩니다.

메일 구성

MailHog를 실행합니다:

mailhog

축하합니다! 이제 자신의 Discourse 설치 환경의 관리자가 되었습니다!

즐거운 개발을! 그리고 시작하기 위해 Discourse 플러그인 만들기 입문가 가이드를 참조하세요.


마지막 검토: @blake, 2023-04-03T06:00:00Z


이 문서는 버전 관리됩니다 - github에서 변경 사항을 제안하세요.

66개의 좋아요
Docker setup for development
Share your Discourse dev setup
How to open via internal IP?
Discourse as Your First Rails App
Why is my dev server not showing me uploaded images in Topics?
Can I install discourse on my local machine
Unable to Install Discourse for development
Issue in setup discourse on ubuntu server
Can't set up dev environment due to cppjieba_rb failing to install
How to add a new language
Override profile background via SSO
Bitnami Discourse VM on Virtualbox + SMTP mail-server for testing
Export only database data Postgres (for users, posts and topics)
Jhead and svgo errors while running specs
Rspec failing to load when using the official beginners guide
How do I go about making a very customized theme?
Moderation Tools
Mini_racer installation issues on ubuntu vagrant (OSX)
Can't install the bundle
Not receiving Activation Email
Bundler cannot continue due installation error of mini_racer 0.4.0
How to setup discourse in my local for development?
How might we better structure #howto?
Please help, how do I install Discourse on macOS?
How might we better structure #howto?
Can't reach Discourse server in VM from Host
Images are not being populated in discourse
How to install Discourse locally?
Discourse Local setup
Is this correct? How long to install dev Version?
Overriding user_guardian.rb in a plugin (no fork necessary!)
How Sam's Windows development environment is configured
Site setting is different Every time on Ubuntu development installation
Problems with understanding the development of Discourse
How do I change the address in the database?
Discourse on local pc
Error while importing topics from Flarum (users, groups import OK)
Flarum To Discourse Migration
Problem in development Installation
Calling out for Testers
Problem in development Installation
Developing on the mobile version of Discourse
Can't build Discourse on Ubuntu 20.10
Discourse standalone
Set up a local Discourse Development Environment?
Unable to setup discourse
Migrate a phpBB3 forum to Discourse
Migrate a vBulletin 4 forum to Discourse
Migrate a FluxBB forum to Discourse
Migrate a NodeBB forum with Redis to Discourse
Migrate a MyBB forum to Discourse
Migrate a NodeBB forum with MongoDB to Discourse
Migrate a Ning forum to Discourse
Migrate a Phorum forum to Discourse
Migrate a PunBB forum to Discourse
Migrate from another forum to Discourse
Migrate a Kunena 3 forum to Discourse
Migrate a bbPress WordPress plugin forum to Discourse
Unable to setup discourse
Use the Discourse API ruby gem
Use Screen To Bootstrap A Development Install (Ubuntu)
Set up Discourse for development on Fedora Linux
Need to restart Ember in order to test front-end changes
Error installing `bullseye-backports` when trying to install for Development
Migrate a MyBB forum to Discourse
Local installation internal use only
ImageMagick Install Fails during Dev Installation on Ubuntu 22.04.1
Installing Plugins in Discourse Development Install
Discourse dev install script may need upgrade
I'm having trouble installing a local Discourse instance on Windows 11
Login popup not display
Not able to restore discourse docker backup on Ubuntu discourse installation
Migrate a bbPress WordPress plugin forum to Discourse
Installing Discourse on windows using Docker Desktop
End-to-end system testing for themes and theme components
CSRF problem in development with 'Discourse OpenID Connect' plug-in
Need help integrating code wrote on Edittext to the Discourse
Integration into custom auth system where emails are not unique?
Overriding user_guardian.rb in a plugin (no fork necessary!)
Contributing to Discourse development
Development install fails when running bin/rails db:migrate
Developing Discourse on GitHub Codespaces
Install Discourse on Windows for development
Connecting WP Discourse to a local Discourse Instance running a specific version
Chat not working after dev install
Discourse Ember CLI Proxy Error
Bundling more popular plugins with Discourse core
Dev environment: recommended way to bootstrap the first admin account without email?
Migrate from GetSatisfaction to Discourse
Developing Discourse Plugins - Part 6 - Add acceptance tests
Install Discourse for development using Docker
Install Discourse on macOS for development
Migrate a MyBB forum to Discourse
Discourse Server logs show DB queries when I run the server
ImageMagick Install Fails during Dev Installation on Ubuntu 22.04.1
Docker in VMWare - How to access to Discourse
How can I make my own Discourse plugins?
What is the latest recommended workflow for local development? (Ubuntu 16.04)
What is the latest recommended workflow for local development? (Ubuntu 16.04)
How to customize the Discourse app using docker container?
Uploads location on dev instance?
Update PhantomJS to latest for Ubuntu dev guide?
A check for updates has not been performed lately. Ensure sidekiq is running
How to fix bundler executable conflicts in the `techAPJ/install-rails` script?
Ubuntu development install: Permission denied @ apply2files
Install discourse on localhost
Trouble getting a top level page to Ember
Formal german available?
Any interest in Podman?
Rake aborted message is showing when installing vagrant development
Where is the db connection information discourse?
How to install the bootsnap gem?
State of disqus to discourse importer
Connecting to Droplet
Connecting to Droplet
Install and import Mysql on the development environment
Can't uninstall on Ubuntu 18.04
How to install Discourse on windows
Share your Discourse dev setup
Discourse running very slow on local machine
Can't find the Discourse folder inside virtual box via ssh
Importing MyBB database to Discourse
How to install Discourse on windows
How to create new user with verified email in development mode?
Unable to create Vagrant local installation
Installing problem - bundle install
How to get a docker image of discourse using bash on windows 10?
Attachment filename not set on download
[PAID] Import from Legacy Postgres DB
Does Gemfile need to include svg?
Does Gemfile need to include svg?
Database wont migrate Discourse
I want to build a debug version of discourse
How to reset discourse on dev mode? (w/o docker)
Nodebb to Discourse
RSpec search_spec.rb RateLimiter LimitExceeded problems
Discourse as Your First Rails App
Issue with vagrant version following the dev guide
Which is the better option to self-host?
NULL first_visited_at dates in the topic_users table
Multiple instances. Visiting the second instance signs out the logged in account on the running instance
Can't run my Discourse locally
I want to install a plugin for development, what should I do?
Vbulletin 4 import -
Hello from Gitpod! (installing on google cloud + automated dev setup)
How to Install Discourse on LocalHost in Windows?
Migrating a myBB forum to Discourse using Kubuntu in a VM
Migration from Yahoo! Groups
Does the forum for development start up 24 hours*?
How to allow customs hosts in development mode
Help with setting up discourse An error occurred while installing xorcist (1.1.2), and Bundler cannot continue
Any interest in Podman?