OpenLiteSpeed是一个内置快速PHP模块的快速开源Web服务器应用程序。 相比Nginx或Apache, OpenLiteSpeed以速度和性能着称。 它还提供了一个基于Web的界面来轻松管理虚拟主机、模块和网站。搬主题站点也是基于OpenLiteSpeed进行建设的,在本教程中,搬主题将向您介绍怎样在Rocky Linux 8上安装OpenLiteSpeed。在安装前首先你至少要具备Linux的基本知识,知道怎样使用shell,也就是SSH。最重要的是可以将网站托管在自己的 VPS 上。 安装非常简单,假设您在root帐户下运行,如果不是,您可能需要添加‘sudo‘到命令以获取root权限。安装前提条件运行以下操作系统之一的服务器:Rocky Linux 8。建议您使用全新的操作系统安装来防止任何潜在问题。对服务器的 SSH 访问(或者如果您在桌面上,则只需打开终端)。步骤 1. 第一步是将您的系统更新到最新版本的软件包列表。 为此,请运行以下命令:sudo dnf check-update
sudo dnf update
sudo dnf install epel-release步骤 2. 在 Rocky Linux 8 上安装 OpenLiteSpeed。默认情况下,OpenLiteSpeed 在 Rocky Linux 8 基础存储库中可用。 现在运行以下命令将 OpenLiteSpeed 添加到我们的存储库中:sudo rpm -Uvh https://rpms.litespeedtech.com/centos/litespeed-repo-1.1-1.el8.noarch.rpm然后,通过运行以下命令安装 OpenLiteSpeed Web 服务器:sudo dnf install openlitespeed成功安装后,启用 OpenLiteSpeed(系统启动时自动启动),启动网络服务器,并使用以下命令验证状态:sudo systemctl enable lsws
sudo systemctl start lsws
sudo systemctl status lsws步骤 3. 设置 OpenLiteSpeed 管理员密码。OpenLiteSpeed 现已安装。 您需要运行一些命令来更改OpenLiteSpeed仪表板中的默认密码:/usr/local/lsws/admin/misc/admpass.sh这里将被要求定义 admin 用户名和密码如下图:Please specify the user name of administrator.
This is the user name required to login the administration Web interface.
User name [admin]: admin
Please specify the administrator's password.
This is the password required to login the administration Web interface.
Password:
Retype password:
Administrator's username/password is updated successfully!步骤 4. 配置防火墙设置。OpenLiteSpeed 监听端口 8088 和 7080,因此我们必须允许这些端口访问。 为此,我们可以执行以下操作:sudo firewall-cmd --zone=public --permanent --add-port=8088/tcp
sudo firewall-cmd --zone=public --permanent --add-port=7080/tcp
sudo firewall-cmd --reload步骤 5. 访问 OpenLiteSpeed网络界面。成功安装后,打开您的网络浏览器并使用 URL 访问 OpenLiteSpeed https://your-IP-address:7080. 您应该在 Internet 浏览器中看到以下页面:比如https://123.456.789.111:7080提供您的 admin 用户名和密码,然后单击登录按钮。恭喜! 您已成功安装 OpenLiteSpeed。 感谢您使用本教程在 Rocky Linux 8 系统上安装 OpenLiteSpeed Web 服务器。
THE END