Microweber 是一个免费的开源拖放 CMS 和网站构建器,用 PHP 编程语言和Laravel 框架编写。Microweber 的拖放技术以及实时书写和文本编辑功能提供了一种快速简便的方式来创建您的内容,帮助您将网站变成一个丰富的环境,供您表达自己的想法。它还带有内置的店面功能,允许您创建一个电子商务网站,您可以通过该网站在 Internet 上销售您的产品。
步骤 1. 首先,通过apt
在终端中运行以下命令确保所有系统包都是最新的。
sudo apt update sudo apt upgrade
步骤 2. 安装 LAMP 堆栈。
需要 Ubuntu 20.04 LAMP 服务器。如果您没有安装 LAMP,按照我们的指南进行操作。
步骤 3. 在 Ubuntu 20.04 上安装 Microweber CMS。
现在我们从他们的官方页面下载最新版本的 Microweber:
sudo mkdir /var/www/html/microweber wget https://microweber.com/download.php -O microweber-latest.zip sudo unzip microweber-latest.zip -d /var/www/html/microweber
我们需要更改一些文件夹的权限:
sudo chown -R www-data:www-data /var/www/html/microweber/ sudo chmod -R 755 /var/www/html/microweber/
步骤 4. 为 Microweber CMS 配置 MariaDB。
默认情况下,MariaDB 未加固。您可以使用mysql_secure_installation
脚本保护 MariaDB 。您应该仔细阅读以下每个步骤,这些步骤将设置 root 密码、删除匿名用户、禁止远程 root 登录以及删除测试数据库和访问安全 MariaDB 的权限:
mysql_secure_installation
像这样配置它:
- Set root password? [Y/n] y - Remove anonymous users? [Y/n] y - Disallow root login remotely? [Y/n] y - Remove test database and access to it? [Y/n] y - Reload privilege tables now? [Y/n] y
接下来,我们需要登录到 MariaDB 控制台并为 Microweber CMS 创建一个数据库。运行以下命令:
mysql -u root -p
这将提示您输入密码,因此请输入您的 MariaDB 根密码并按 Enter。登录到数据库服务器后,您需要为 Microweber CMS 安装创建一个数据库:
MariaDB [(none)]> CREATE DATABASE microweberdb; MariaDB [(none)]> CREATE USER \'microweber\'@\'localhost\' IDENTIFIED BY \'your-strong-password\'; MariaDB [(none)]> GRANT ALL ON microweberdb.* TO \'microweber\'@\'localhost\' IDENTIFIED BY \'your-strong-password\' WITH GRANT OPTION; MariaDB [(none)]> FLUSH PRIVILEGES; MariaDB [(none)]> EXIT;
步骤 5. 为 Microweber 配置 Apache。
现在我们为 Apache 创建一个新的虚拟主机来正确管理站点:
sudo nano /etc/apache2/sites-available/microweber.conf
添加以下行:
ServerName your-domain.com DocumentRoot /var/www/html/microweber/ Options FollowSymLinks AllowOverride All Options FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all ErrorLog ${APACHE_LOG_DIR}/microweber_error.log CustomLog ${APACHE_LOG_DIR}/microweber_access.log combined
现在,我们可以重新启动 Apache 网络服务器以进行更改:
sudo a2enmod rewrite sudo a2ensite microweber.conf sudo systemctl restart apache2
步骤 6. 设置 HTTPS。
我们应该在 Microweber 上启用安全的 HTTPS 连接。我们可以从 Let\’s Encrypt 获得免费的 TLS 证书。从 Ubuntu 20.04 存储库安装 Let\’s Encrypt 客户端 ( certbot ):
sudo apt install certbot python3-certbot-apache
接下来,运行以下命令以使用 Apache 插件获取免费的 TLS 证书:
sudo certbot --apache --agree-tos --redirect --staple-ocsp --email you@your-domain.comm -d your-domain.com
如果测试成功,请重新加载 Apache 以使更改生效:
sudo apache2ctl -t sudo systemctl reload apache2
步骤 7. 访问 Microweber Web 界面。
成功安装后,现在打开您喜欢的浏览器并导航到或并完成所需的步骤以完成安装。https://your-domain.com/
https://server-ip-address/
感谢您使用本教程在 Ubuntu 20.04 LTS Focal Fossa 系统上安装 Microweber CMS。如需更多帮助或有用信息,我们建议您查看官方 Microweber 网站。