关于ubuntu:如何在CentOS-8中安装OpenLiteSpeed-Web服务器

4次阅读

共计 2571 个字符,预计需要花费 7 分钟才能阅读完成。

OpenLiteSpeed 是 LiteSpeed 的开源版本,是一个弱小的、轻量级开源 HTTP web 服务器,由 LightSpeed 技术在 GPLv3.0 许可下开发。
零碎环境
CentOS 8

配置 OpenLiteSpeed 软件源
首先将 OpenLiteSpeed 软件源增加到 CentOS 8:

[root@localhost ~]# rpm -ivh http://rpms.litespeedtech.com…
如何在 CentOS 8 中装置 OpenLiteSpeed Web 服务器如何在 CentOS 8 中装置 OpenLiteSpeed Web 服务器
更新软件源:

[root@localhost ~]# dnf makecache
从 OpenLiteSpeed 软件源装置 PHP
在这一步中,咱们将应用俗称 LSPHP 的 OpenLiteSpeed 软件源装置 PHP 7.4。然而在此之前,请确保应用以下命令增加了 epel 软件源:

[root@localhost ~]# dnf install -y epel-release
装置 epel 软件源后,上面装置 LSPHP:

[root@localhost ~]# dnf install -y lsphp74 lsphp74-mysqlnd lsphp74-process lsphp74-mbstring lsphp74-mcrypt lsphp74-gd lsphp74-opcache lsphp74-bcmath lsphp74-pdo lsphp74-common lsphp74-xml
如何在 CentOS 8 中装置 OpenLiteSpeed Web 服务器如何在 CentOS 8 中装置 OpenLiteSpeed Web 服务器
应用上述 dnf 命令胜利装置 PHP 软件包后,接下来咱们装置 MariaDB 数据库服务器。

装置 MariaDB 数据库
运行上面命令装置 mariadb-server:

[root@localhost ~]# dnf install -y mariadb mariadb-server
装置实现之后,启用 mariadb 服务的开机启动,并启动服务:

[root@localhost ~]# systemctl enable mariadb
[root@localhost ~]# systemctl start mariadb
运行以下 systemctl 命令以查看 mariadb 服务的状态,

[root@localhost ~]# systemctl status mariadb
如何在 CentOS 8 中装置 OpenLiteSpeed Web 服务器如何在 CentOS 8 中装置 OpenLiteSpeed Web 服务器
默认状况下,MariaDB 并不平安,因而,咱们须要采取一些额定的步骤来爱护 MariaDB。运行以下步骤:

[root@localhost ~]# mysql_secure_installation
首先须要为 root 用户设置明码
如何在 CentOS 8 中装置 OpenLiteSpeed Web 服务器如何在 CentOS 8 中装置 OpenLiteSpeed Web 服务器
对于其余的提醒。只需输出“Y”以执行最佳实际设置:
如何在 CentOS 8 中装置 OpenLiteSpeed Web 服务器如何在 CentOS 8 中装置 OpenLiteSpeed Web 服务器

装置 OpenLiteSpeed
应用 dnf 包管理器来装置 OpenLiteSpeed:

[root@localhost ~]# dnf install -y openlitespeed
查看以下 web 服务是否启动,个别状况夏装置实现主动启动:

[root@localhost ~]# systemctl status lsws
如何在 CentOS 8 中装置 OpenLiteSpeed Web 服务器如何在 CentOS 8 中装置 OpenLiteSpeed Web 服务器
Web 服务侦听两个端口:8088 和 7080。端口 8088 用于演示,而端口 7080 是治理页面。

能够应用 netstat 命令确认 Web 服务器正在侦听的端口,如下所示:

[root@localhost ~]# netstat -tlunp
如何在 CentOS 8 中装置 OpenLiteSpeed Web 服务器如何在 CentOS 8 中装置 OpenLiteSpeed Web 服务器
如果防火墙正在运行,须要关上上面的端口:

[root@localhost ~]# firewall-cmd –permanent –add-port=8088/tcp
success
[root@localhost ~]# firewall-cmd –permanent –add-port=7080/tcp
success
[root@localhost ~]# firewall-cmd –reload
success
如何在 CentOS 8 中装置 OpenLiteSpeed Web 服务器如何在 CentOS 8 中装置 OpenLiteSpeed Web 服务器

更改默认治理明码
默认状况下,管理员的明码设置为 123456,咱们须要更改此明码为一个十分牢靠的明码。更好的是,能够设置一个其余用户为治理用户,运行上面的脚本来批改管理员配置:

[root@localhost ~]# /usr/local/lsws/admin/misc/admpass.sh
如何在 CentOS 8 中装置 OpenLiteSpeed Web 服务器如何在 CentOS 8 中装置 OpenLiteSpeed Web 服务器

拜访 OpenLiteSpeed 的 web 页面
如果要拜访 OpeLiteSpeed Web 服务器的默认页面,输出服务器的 ip 地址 +8088 端口。
如何在 CentOS 8 中装置 OpenLiteSpeed Web 服务器如何在 CentOS 8 中装置 OpenLiteSpeed Web 服务器
如果要拜访治理页面,输出服务器的 ip 地址 +7080 端口。账号密码为上一步设置的管理员
如何在 CentOS 8 中装置 OpenLiteSpeed Web 服务器如何在 CentOS 8 中装置 OpenLiteSpeed Web 服务器

如何在 CentOS 8 中装置 OpenLiteSpeed Web 服务器如何在 CentOS 8 中装置 OpenLiteSpeed Web 服务器
到此就装置完结啦!

总结
OpenLiteSpeed 是 LiteSpeed 的开源版本,是一个弱小的、轻量级开源 HTTP web 服务器,由 LightSpeed 技术在 GPLv3.0 许可下开发。

正文完
 0