# 我可以在这个非托管VPS上安装Discourse吗？如果可以，如何安装？

**URL:** <https://meta.discourse.org/t/can-i-install-discourse-on-this-unmanaged-vps-if-yes-how-to/165313>\
**Category:** Self-hosting\
**Tags:** hosting\
**Created:** [2020年九月25日 05:06 UTC](https://meta.discourse.org/t/can-i-install-discourse-on-this-unmanaged-vps-if-yes-how-to/165313 "2020-09-25T05:06:58Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![sushant098123](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sushant098123/32/164925_2.png) [@sushant098123](https://meta.discourse.org/u/sushant098123)\
**Post date:** [2020年九月25日 05:06 UTC](https://meta.discourse.org/t/can-i-install-discourse-on-this-unmanaged-vps-if-yes-how-to/165313/1 "2020-09-25T05:06:58Z")

</div>

您好，我可以在 [The Best Web Hosting Services at 20x Speeds | hosting.com](https://www.a2hosting.in/vps-hosting/unmanaged/configure#config_2522) 这个托管服务上安装 Discourse 吗？

如果可以，该如何操作？购买 VPS 时应选择哪个操作系统？

---

<div class="post-metadata">

**Author:** ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)\
**Post date:** [2020年九月25日 05:19 UTC](https://meta.discourse.org/t/can-i-install-discourse-on-this-unmanaged-vps-if-yes-how-to/165313/2 "2020-09-25T05:19:35Z")

</div>

您需要这个链接：[Install Discourse in production with the official supported instructions](https://meta.discourse.org/t/discourse-official-standard-installation/142537?u=merefield)

有很多 VPS 提供商。也可以考虑 Digital Ocean、Hetzner 和 Scaleway。

请查看 #hosting 中的讨论。

---

<div class="post-metadata">

**Author:** ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)\
**Post date:** [2020年九月25日 05:24 UTC](https://meta.discourse.org/t/can-i-install-discourse-on-this-unmanaged-vps-if-yes-how-to/165313/3 "2020-09-25T05:24:20Z")

</div>

是的，你可以尝试在 a2hosting 上安装 Discourse，但根据我使用他们服务的经验，他们的系统经常宕机，而且恢复服务需要数天时间。

---

<div class="post-metadata">

**Author:** ![sushant098123](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sushant098123/32/164925_2.png) [@sushant098123](https://meta.discourse.org/u/sushant098123)\
**Post date:** [2020年九月25日 05:29 UTC](https://meta.discourse.org/t/can-i-install-discourse-on-this-unmanaged-vps-if-yes-how-to/165313/4 "2020-09-25T05:29:45Z")

</div>

但我只有 Paytm 支付方式，没有信用卡或借记卡，因此我选择了 A2Hosting，因为它们价格实惠且支持 Paytm 支付。

---

<div class="post-metadata">

**Author:** ![th21](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/th21/32/211915_2.png) [@th21](https://meta.discourse.org/u/th21)\
**Post date:** [2021年四月4日 23:36 UTC](https://meta.discourse.org/t/can-i-install-discourse-on-this-unmanaged-vps-if-yes-how-to/165313/5 "2021-04-04T23:36:58Z")

</div>

我试图在 a2hosting 的未托管 VPS 上安装 Discourse，但遇到了一个错误，提示我没有权限创建交换文件，报错信息为 `swapon: /swapfile: swapon failed: Operation not permitted`。

如何绕过此错误？

---

<div class="post-metadata">

**Author:** ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)\
**Post date:** [2021年四月5日 06:18 UTC](https://meta.discourse.org/t/can-i-install-discourse-on-this-unmanaged-vps-if-yes-how-to/165313/6 "2021-04-05T06:18:15Z")

</div>

您是否以 root 用户身份进行安装？

---

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [2021年四月5日 08:38 UTC](https://meta.discourse.org/t/can-i-install-discourse-on-this-unmanaged-vps-if-yes-how-to/165313/7 "2021-04-05T08:38:02Z")

</div>

听起来你并没有获得完整的虚拟机权限（但也可能只是未能获取 root 权限）。因此，你需要从他们那里获取其他产品，或者使用像 DigitalOcean 这样的服务。

---

<div class="post-metadata">

**Author:** ![th21](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/th21/32/211915_2.png) [@th21](https://meta.discourse.org/u/th21)\
**Post date:** [2021年四月5日 21:47 UTC](https://meta.discourse.org/t/can-i-install-discourse-on-this-unmanaged-vps-if-yes-how-to/165313/8 "2021-04-05T21:47:31Z")

</div>

好的，我检查了容器，看起来是 OpenVZ/LXC，它们不支持修改 swappiness。如果有人想尝试 A2Hosting 的未托管 VPS，请留下一个 DP。

> <https://askubuntu.com/questions/744823/permission-denied-when-changing-swappiness>
