如何在 Ubuntu 20.04 LTS 上安装 WonderCMS

WonderCMS 是一个免费的、开源的、用 PHP 和 jQuery 编写的平面文件内容管理系统。WonderCMS 也不需要像 MariaDB 这样的传统/关系数据库。平面文件技术使 WonderCMS 能够将所有数据保存到名为 database.js 的文本文件(平面文件)中,该文件以 JSON 格式构建。它还提供了一组丰富的功能,包括自定义登录 URL、SEO 友好、所见即所得、灵活的 CSS 框架、本机降价等。WonderCMS-logo

在 Ubuntu 20.04 LTS Focal Fossa 上安装 WonderCMS

apt步骤 1. 首先,通过在终端中运行以下命令,确保所有系统包都是最新的。

sudo apt update
sudo apt upgrade

步骤 2. 安装 LAMP 服务器。

需要 Ubuntu 20.04 LAMP 服务器。如果您没有安装 LAMP,您可以在此处按照我们的指南进行操作。

步骤 3. 在 Ubuntu 20.04 上安装 WonderCMS。

默认情况下,WonderCMS 在 Ubuntu 20.04 基础存储库中不可用。现在我们运行以下命令从 GitHub 克隆安装程序 WonderCMS:

git clone https://github.com/robiso/wondercms.git /var/www/html/wondercms

我们将需要更改一些文件夹权限:

chown -R www-data:www-data /var/www/html/wondercms

步骤 4. 配置 Apache WonderCMS 站点。

现在我们在 Apache 中创建一个新的虚拟主机指令。例如,在您的虚拟服务器上创建一个名为 ‘ ‘ 的新 Apache 配置文件:wondercms.conf

sudo nano /etc/apache2/sites-available/wondercms.conf

添加以下文件

<VirtualHost *:80>
    ServerAdmin admin@your-domain.com
    ServerName your-domain.com
    ServerAlias www.your-domain.com
    DocumentRoot /var/www/html/wondercms/

    <Directory />
        Options +Indexes +FollowSymLinks +ExecCGI
        AllowOverride All
        Order deny,allow
        Allow from all
        Require all granted
    </Directory>

    <Directory /var/www/html/wondercms>
        Require all denied
    </Directory>

    ErrorLog /var/log/apache2/wondercms_error_log
    TransferLog /var/log/apache2/wondercms_access_log
</VirtualHost>

保存并关闭文件,然后重新启动 Apache 网络服务器以进行更改:

sudo a2enmod rewrite
sudo a2ensite rainloop.conf
sudo systemctl restart apache2

步骤 5. 设置 HTTPS。

我们应该在 PrestaShop 上启用安全的 HTTPS 连接。我们可以从 Let’s Encrypt 获得免费的 TLS 证书。从 Ubuntu 20.04 存储库安装 Let’s Encrypt 客户端(certbot):

sudo apt install certbot python3-certbot-apache

接下来,运行以下命令以使用 Apache 插件获取免费的 TLS 证书:

certbot --apache -d your-domain.com

您将被要求提供您的电子邮件并接受服务条款:

Enabled Apache rewrite module
Redirecting vhost in /etc/apache2/sites-available/wondercms.conf to ssl vhost in /etc/apache2/sites-available/wondercms-le-ssl.conf

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Congratulations! You have successfully enabled https://your-domain.com

You should test your configuration at:
https://www.ssllabs.com/ssltest/analyze.html?d=your-domain.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/your-domain.com/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/your-domain.com/privkey.pem
   Your cert will expire on 2022-06-11. To obtain a new or tweaked
   version of this certificate in the future, simply run certbot again
   with the "certonly" option. To non-interactively renew *all* of
   your certificates, run "certbot renew"
 - If you like Certbot, please consider supporting our work by:

   Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
   Donating to EFF:                    https://eff.org/donate-le

如果测试成功,请重新加载 Apache 以使更改生效:

sudo apache2ctl -t
sudo systemctl reload apache2

步骤 6. 配置防火墙。

默认情况下,在 Ubuntu 上启用了 UFW 防火墙。根据您的 Apache 虚拟主机配置文件,打开端口 80 和 443 以允许 HTTP 和 HTTPS 流量:

sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw reload

步骤 7. 访问 WonderCMS Web 界面。

成功安装后,打开您的网络浏览器并使用 URL 访问 WonderCMS 网络界面。您应该会看到包含登录密码的 WonderCMS:https://your-domain.com

WonderCMS-passwd

然后,使用 URL 访问 WonderCMS 登录页面。您应该会看到 WonderCMS 登录页面:https://your-domian/loginURL

WonderCMS-web-interface

感谢您使用本教程在您的 Ubuntu 20.04 LTS Focal Fossa 上安装 WonderCMS。如需更多帮助或有用信息,我们建议您查看Matomo 官方网站

未经允许不得转载:统信UOS之家 » 如何在 Ubuntu 20.04 LTS 上安装 WonderCMS

相关文章