# Sysadmins

**URL:** https://meta.discourse.org/c/wiki/sysadmins/180.md?page=3

[最新版本](https://meta.discourse.org/latest.md) · [分類](https://meta.discourse.org/categories.md) · [標簽](https://meta.discourse.org/tags.md)

**Page:** 4

---

## [在已有Apache站点的服务器上设置Discourse](https://meta.discourse.org/t/set-up-discourse-on-a-server-with-existing-apache-sites/30013)

<div class="topic-metadata">

**Author:** [@AstonJ](https://meta.discourse.org/u/AstonJ)\
**回覆:** 16\
**Last updated:** [2020年九月18日 15:37 UTC](https://meta.discourse.org/t/set-up-discourse-on-a-server-with-existing-apache-sites/30013 "2020-09-18T15:37:10Z")

</div>

It’s not as daunting as it sounds! While this may sound a bit intimidating at first, it’s really not all that bad. You basically need to do two things: Install HAProxy (or an alternative) which will take over port 80…

---

## [使用 amcheck 检查 PostgreSQL 索引完整性（损坏）](https://meta.discourse.org/t/use-amcheck-to-check-postgresql-index-integrity-corruption/153207)

<div class="topic-metadata">

**Author:** [@neounix](https://meta.discourse.org/u/neounix)\
**回覆:** 0\
**Last updated:** [2020年五月29日 09:57 UTC](https://meta.discourse.org/t/use-amcheck-to-check-postgresql-index-integrity-corruption/153207 "2020-05-29T09:57:52Z")

</div>

Lately, I have read a number of Discourse topics on meta about “index corruption” in both PostgreSQL 10 and 12. One of the take-a-ways from these discussions is that it may be important or interesting for some sys admin…

---

## [备份的最佳实践](https://meta.discourse.org/t/best-practices-for-backups/148630)

<div class="topic-metadata">

**Author:** [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**回覆:** 0\
**Last updated:** [2020年四月20日 15:21 UTC](https://meta.discourse.org/t/best-practices-for-backups/148630 "2020-04-20T15:21:23Z")

</div>

If you are self-hosted, you should keep off-site backups in case there is some catastrophic problem with your server. Imagine that went out of business one day without any warning, or you somehow managed to delete /var/…

---

## [从你的邮件接收器中过滤已知的不良发件人域名](https://meta.discourse.org/t/filter-known-bad-sender-domains-from-your-mail-receiver/118760)

<div class="topic-metadata">

**Author:** [@mpalmer](https://meta.discourse.org/u/mpalmer)\
**回覆:** 8\
**Last updated:** [2020年四月13日 03:39 UTC](https://meta.discourse.org/t/filter-known-bad-sender-domains-from-your-mail-receiver/118760 "2020-04-13T03:39:46Z")

</div>

If you run your own incoming mail, and you find that you’re getting more abusive mail than you’re willing to tolerate, this guide is for you! It’ll show you how to configure your mail-receiver container to block e-mail …

---

## [将mail-receiver更新到正式版本](https://meta.discourse.org/t/update-mail-receiver-to-the-release-version/133491)

<div class="topic-metadata">

**Author:** [@blake](https://meta.discourse.org/u/blake)\
**回覆:** 8\
**Last updated:** [2020年一月1日 01:07 UTC](https://meta.discourse.org/t/update-mail-receiver-to-the-release-version/133491 "2020-01-01T01:07:02Z")

</div>

If you came here because you noticed this message on your Admin Dashboard: We detected an outdated version of mail-receiver.. You are in the right place. Please ssh into your discourse server and run the following t…

---

## [将PunBB论坛迁移到Discourse](https://meta.discourse.org/t/migrate-a-punbb-forum-to-discourse/134167)

<div class="topic-metadata">

**Author:** [@enigmaty](https://meta.discourse.org/u/enigmaty)\
**回覆:** 0\
**Last updated:** [2019年十一月22日 14:05 UTC](https://meta.discourse.org/t/migrate-a-punbb-forum-to-discourse/134167 "2019-11-22T14:05:33Z")

</div>

In this tutorial, we will learn how to migrate PunBB forum to :discourse: platform using the official Importer script. Let’s get started :slight\_smile: What can be migrated Topics & replies =\> topics & posts Catego…

---

## [在启用收件功能的类别中使用 iRedMail 的别名](https://meta.discourse.org/t/use-aliases-in-iredmail-for-categories-with-incoming-email-feature-enabled/123012)

<div class="topic-metadata">

**Author:** [@Ivan\_Rapekas](https://meta.discourse.org/u/Ivan_Rapekas)\
**回覆:** 4\
**Last updated:** [2019年七月16日 01:53 UTC](https://meta.discourse.org/t/use-aliases-in-iredmail-for-categories-with-incoming-email-feature-enabled/123012 "2019-07-16T01:53:23Z")

</div>

:mega: WARNING – this topic is very specific to a particular rare use case and is likely not what you should be doing. Refer to the first two links, below, for the recommended setup. Prerequisities I searched the foru…

---

## [获取基本数据库表格、大小和计数统计](https://meta.discourse.org/t/get-basic-database-table-size-and-count-statistics/68783)

<div class="topic-metadata">

**Author:** [@sam](https://meta.discourse.org/u/sam)\
**回覆:** 3\
**Last updated:** [2019年七月3日 10:49 UTC](https://meta.discourse.org/t/get-basic-database-table-size-and-count-statistics/68783 "2019-07-03T10:49:56Z")

</div>

The task rake db:stats will print out basic database stats. ./launcher enter app rake db:stats table\_name | row\_estimate | size --------------------------------------------------- email\_logs …

---

## [静止数据加密](https://meta.discourse.org/t/encrypting-data-at-rest/23693)

<div class="topic-metadata">

**Author:** [@dhyasama](https://meta.discourse.org/u/dhyasama)\
**回覆:** 7\
**Last updated:** [2019年三月3日 21:13 UTC](https://meta.discourse.org/t/encrypting-data-at-rest/23693 "2019-03-03T21:13:42Z")

</div>

For a variety of reasons I’d like to encrypt all data at rest in our private financial forum. What are the options and issues? At the database level, common approaches are column-specific, whole database, and whole disk…

---

## [使用 KeyCDN 设置 Discourse](https://meta.discourse.org/t/setup-discourse-with-keycdn/35807)

<div class="topic-metadata">

**Author:** [@CodyArsenault](https://meta.discourse.org/u/CodyArsenault)\
**回覆:** 11\
**Last updated:** [2018年三月13日 15:05 UTC](https://meta.discourse.org/t/setup-discourse-with-keycdn/35807 "2018-03-13T15:05:00Z")

</div>

For those who are using Discourse and are looking to integrate with KeyCDN, here is a quick step-by-step set up guide. Login or sign up for a 30 day free trial if you don’t already have a KeyCDN account. Create a Pu…

---

## [将 UseResponse 论坛迁移到 Discourse](https://meta.discourse.org/t/migrate-a-useresponse-forum-to-discourse/75956)

<div class="topic-metadata">

**Author:** [@Ivan\_Rapekas](https://meta.discourse.org/u/Ivan_Rapekas)\
**回覆:** 0\
**Last updated:** [2017年十二月13日 12:40 UTC](https://meta.discourse.org/t/migrate-a-useresponse-forum-to-discourse/75956 "2017-12-13T12:40:27Z")

</div>

Hello, I am glad to share files with a guide how to migrate from UseResponse forum engine to Discourse. My case looks very custom, in two words: Old schema: Drupal host www.example.com stores users in local mysql da…

---

## [在Vultr上安装Discourse并从Kunena3导入](https://meta.discourse.org/t/install-discourse-on-vultr-and-import-from-kunena3/74269)

<div class="topic-metadata">

**Author:** [@frold](https://meta.discourse.org/u/frold)\
**回覆:** 0\
**Last updated:** [2017年十一月17日 14:59 UTC](https://meta.discourse.org/t/install-discourse-on-vultr-and-import-from-kunena3/74269 "2017-11-17T14:59:07Z")

</div>

This guide shows how I was able to setup discourse and import 10.000+ users and 38.000+ posts from kunena. I was running an outdated Joomla! 2.5.28 version with kunena 3.0.8 on top and it was hacked. Therefore I was loo…

---

## [Ansible Playbook 用于安装 Docker、Discourse 和 Postfix](https://meta.discourse.org/t/ansible-playbook-to-install-docker-discourse-and-postfix/62496)

<div class="topic-metadata">

**Author:** [@chrisc](https://meta.discourse.org/u/chrisc)\
**回覆:** 1\
**Last updated:** [2017年十一月8日 11:11 UTC](https://meta.discourse.org/t/ansible-playbook-to-install-docker-discourse-and-postfix/62496 "2017-11-08T11:11:16Z")

</div>

Though I’d post this here since I found a lot of useful help on this forum and perhaps if I leave a note regarding what I learnt and then implemented then it might help someone else in the future. I have helped setup a …

---

## [强制Discourse通过CloudFlare使用SSL/HTTPS](https://meta.discourse.org/t/force-discourse-to-use-ssl-https-through-cloudflare/49212)

<div class="topic-metadata">

**Author:** [@kuyashi](https://meta.discourse.org/u/kuyashi)\
**回覆:** 7\
**Last updated:** [2017年七月21日 20:15 UTC](https://meta.discourse.org/t/force-discourse-to-use-ssl-https-through-cloudflare/49212 "2017-07-21T20:15:05Z")

</div>

How to use CloudFlare’s platform to force all traffic over HTTPS connection using page rules. This is an up to date and user-friendly (fool-proof) way that I use each time and it works perfectly. Sign up to CloudFlare h…

---

## [摧毁所有永久链接](https://meta.discourse.org/t/destroy-all-permalinks/65532)

<div class="topic-metadata">

**Author:** [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**回覆:** 3\
**Last updated:** [2017年七月3日 17:48 UTC](https://meta.discourse.org/t/destroy-all-permalinks/65532 "2017-07-03T17:48:26Z")

</div>

If you think that only search engines have links to your old URLs, the search engine databases have been updated, and you want to save as much as 20ms on every 404, you can do this: cd /var/disourse/ ./launcher enter ap…

---

## [提取最顶部可见帖子内容的书签工具](https://meta.discourse.org/t/bookmarklet-to-extract-the-contents-of-the-topmost-visible-post/64393)

<div class="topic-metadata">

**Author:** [@jmsachs](https://meta.discourse.org/u/jmsachs)\
**回覆:** 3\
**Last updated:** [2017年六月13日 02:23 UTC](https://meta.discourse.org/t/bookmarklet-to-extract-the-contents-of-the-topmost-visible-post/64393 "2017-06-13T02:23:48Z")

</div>

Just wanted to share my solution to major frustration in copying a Discourse post into an Outlook 2007 message (cue numerous sad trombone noises). Perhaps it has other applications. This essentially does the following: …

---

## [在不暴露端口的情况下使用多个Docker容器](https://meta.discourse.org/t/use-multiple-docker-containers-without-exposing-ports/22283)

<div class="topic-metadata">

**Author:** [@jspdng](https://meta.discourse.org/u/jspdng)\
**回覆:** 10\
**Last updated:** [2017年六月2日 09:24 UTC](https://meta.discourse.org/t/use-multiple-docker-containers-without-exposing-ports/22283 "2017-06-02T09:24:03Z")

</div>

:warning: This is an advanced setup. Don’t follow this unless you are experienced with Linux server administration and Docker. Hello everyone! If you don’t want to mess with the firewall rules and security of your se…

---

## [在 Linode 上安装带有 AUFS 的 Docker](https://meta.discourse.org/t/install-docker-with-aufs-on-linode/39831)

<div class="topic-metadata">

**Author:** [@dandv](https://meta.discourse.org/u/dandv)\
**回覆:** 3\
**Last updated:** [2017年二月13日 05:17 UTC](https://meta.discourse.org/t/install-docker-with-aufs-on-linode/39831 "2017-02-13T05:17:31Z")

</div>

The 30-minute Discourse installation guide assumes you’ll be using Digital Ocean and makes no mention of an important requirement for Docker: If you use another hosting provider, you should really make sure that a Linu…

---

## [从MVCforum迁移到Discourse](https://meta.discourse.org/t/migrate-from-mvcforum-to-discourse/53746)

<div class="topic-metadata">

**Author:** [@Viir](https://meta.discourse.org/u/Viir)\
**回覆:** 3\
**Last updated:** [2016年十二月11日 16:23 UTC](https://meta.discourse.org/t/migrate-from-mvcforum-to-discourse/53746 "2016-12-11T16:23:48Z")

</div>

I recently wrote some code to import from MVCforum: The import logic can be found at https://github.com/Viir/import-to-discourse, packaged as an easy to use commandline tool. It builds the SQL code needed to add the co…

---

## [向对您的 Discourse 发出的请求添加自定义 HTTP 头](https://meta.discourse.org/t/add-a-custom-http-header-to-requests-made-to-your-discourse/26439)

<div class="topic-metadata">

**Author:** [@riking](https://meta.discourse.org/u/riking)\
**回覆:** 5\
**Last updated:** [2016年九月12日 04:12 UTC](https://meta.discourse.org/t/add-a-custom-http-header-to-requests-made-to-your-discourse/26439 "2016-09-12T04:12:35Z")

</div>

Add this to your app.yml: ## Remember, this is YAML syntax - you can only have one block with a name run: - exec: echo "Beginning of custom commands" # A man's not dead while his name is still spoken. - replace: …

---

## [使用 Let's Encrypt 配置 Apache 代理](https://meta.discourse.org/t/configure-apache-proxy-with-lets-encrypt/46139)

<div class="topic-metadata">

**Author:** [@tarek](https://meta.discourse.org/u/tarek)\
**回覆:** 0\
**Last updated:** [2016年六月21日 18:06 UTC](https://meta.discourse.org/t/configure-apache-proxy-with-lets-encrypt/46139 "2016-06-21T18:06:35Z")

</div>

:warning: Using Apache as a proxy is not recommended as Apache Httpd uses thread-per-connection model, and will likely run out of threads very fast as Discourse uses long polling. (related). The goal of this post is t…

---

## [度假自动回复的筛选规则](https://meta.discourse.org/t/sieve-rules-for-vacation-email-replies/43987)

<div class="topic-metadata">

**Author:** [@carlokok](https://meta.discourse.org/u/carlokok)\
**回覆:** 0\
**Last updated:** [2016年五月10日 11:59 UTC](https://meta.discourse.org/t/sieve-rules-for-vacation-email-replies/43987 "2016-05-10T11:59:37Z")

</div>

I’ve started collecting custom sieve rules for imap for all the vacation email replies we get, here’s my script if anyone is interested: require \["copy","fileinto"\]; # rule:\[sa\] if header :contains "x-spam-level" "\*\*\*\*\*…

---

## [将Jive Clearspace论坛迁移到Discourse](https://meta.discourse.org/t/migrate-a-jive-clearspace-forum-to-discourse/36761)

<div class="topic-metadata">

**Author:** [@MikhailVink](https://meta.discourse.org/u/MikhailVink)\
**回覆:** 0\
**Last updated:** [2015年十二月15日 22:44 UTC](https://meta.discourse.org/t/migrate-a-jive-clearspace-forum-to-discourse/36761 "2015-12-15T22:44:38Z")

</div>

Recently we’ve successfully migrated from Jive Clearspace platform to the Discourse for Kotlin community forums by JetBrains, so I’d like to share experience on such migration which some of you might find useful in the f…

---

## [从 Heroku 迁移到受支持的安装](https://meta.discourse.org/t/migrate-from-heroku-to-a-supported-installation/32868)

<div class="topic-metadata">

**Author:** [@kimpellikaan](https://meta.discourse.org/u/kimpellikaan)\
**回覆:** 3\
**Last updated:** [2015年九月4日 12:34 UTC](https://meta.discourse.org/t/migrate-from-heroku-to-a-supported-installation/32868 "2015-09-04T12:34:33Z")

</div>

If you ever need to migrate away from Heroku to a currently supported infrastructure by discourse it can be quite troublesome. We did the following to be able to create a backup which could thereafter be imported by dis…

---

## [在 Discourse 中使用自签名证书进行电子邮件配置](https://meta.discourse.org/t/use-a-self-signed-cert-with-discourse-for-emails/32042)

<div class="topic-metadata">

**Author:** [@AstonJ](https://meta.discourse.org/u/AstonJ)\
**回覆:** 0\
**Last updated:** [2015年八月12日 23:05 UTC](https://meta.discourse.org/t/use-a-self-signed-cert-with-discourse-for-emails/32042 "2015-08-12T23:05:59Z")

</div>

Using a self-signed certificate with your SMTP and POP mail in Discourse is easy once you know how - here’s how! There is a condition, and that is that your hostname (main domain for server - usually the domain used for…

---

## [使用 HAProxy 和 Varnish 结合 Discourse](https://meta.discourse.org/t/use-haproxy-and-varnish-with-discourse/27782)

<div class="topic-metadata">

**Author:** [@Lee\_Ars](https://meta.discourse.org/u/Lee_Ars)\
**回覆:** 3\
**Last updated:** [2015年四月21日 13:07 UTC](https://meta.discourse.org/t/use-haproxy-and-varnish-with-discourse/27782 "2015-04-21T13:07:31Z")

</div>

Had some downtime this afternoon and without even really planning to ended up setting up haproxy in front of my web server, which hosts a bunch of stuff including Discourse. The configuration, surprisingly, wound up work…

---

## [使用一个Fastmail账户为多个Discourse实例提供服务](https://meta.discourse.org/t/use-one-fastmail-account-to-serve-multiple-discourse-instances/15178)

<div class="topic-metadata">

**Author:** [@Sander78](https://meta.discourse.org/u/Sander78)\
**回覆:** 0\
**Last updated:** [2014年四月30日 08:07 UTC](https://meta.discourse.org/t/use-one-fastmail-account-to-serve-multiple-discourse-instances/15178 "2014-04-30T08:07:11Z")

</div>

Discourse uses POP to extract mails from your mailbox and then deletes them. Any mail not recognized will be dropped. This could be a problem if you - for whatever reason - have only one mailbox to spare and want differe…

[上一頁](https://meta.discourse.org/c/wiki/sysadmins/180.md?page=2)
