CentOS8中怎么安装OpenLiteSpeed Web服务器(centos,web,开发技术)

时间:2024-04-29 20:11:52 作者 : 石家庄SEO 分类 : 开发技术
  • TAG :

OpenLiteSpeed 是 LiteSpeed EnterPrise 的社区版本,相较 Nginx 很多扩展如 Brotli、nginx *-*cache – purge 等扩展,会因为更新的不及时导致对最新Stable版本的不支持,同时也没有企业级的保障。

CentOS8中怎么安装OpenLiteSpeed Web服务器

系统环境

CentOS 8

配置OpenLiteSpeed软件源

首先将OpenLiteSpeed软件源添加到CentOS 8:

[root@localhost~]#rpm-ivhhttp://rpms.litespeedtech.com/centos/litespeed-repo-1.1-1.el8.noarch.rpm

CentOS8中怎么安装OpenLiteSpeed Web服务器

更新软件源:

[root@localhost~]#dnfmakecache

从OpenLiteSpeed软件源安装PHP

在这一步中,我们将使用俗称LSPHP的OpenLiteSpeed软件源安装PHP 7.4。但是在此之前,请确保使用以下命令添加了epel软件源:

[root@localhost~]#dnfinstall-yepel-release

安装epel软件源后,下面安装LSPHP:

[root@localhost~]#dnfinstall-ylsphp74lsphp74-mysqlndlsphp74-processlsphp74-mbstringlsphp74-mcryptlsphp74-gdlsphp74-opcachelsphp74-bcmathlsphp74-pdolsphp74-commonlsphp74-xml

CentOS8中怎么安装OpenLiteSpeed Web服务器

使用上述dnf命令成功安装PHP软件包后,接下来我们安装MariaDB数据库服务器。

安装MariaDB数据库

运行下面命令安装mariadb-server:

[root@localhost~]#dnfinstall-ymariadbmariadb-server

安装完成之后,启用mariadb服务的开机启动,并启动服务:

[root@localhost~]#systemctlenablemariadb[root@localhost~]#systemctlstartmariadb

运行以下systemctl命令以检查mariadb服务的状态,

[root@localhost~]#systemctlstatusmariadb

CentOS8中怎么安装OpenLiteSpeed Web服务器

默认情况下,MariaDB并不安全,因此,我们需要采取一些额外的步骤来保护MariaDB。运行以下步骤:

[root@localhost~]#mysql_secure_installation

首先需要为root用户设置密码 CentOS8中怎么安装OpenLiteSpeed Web服务器

对于其他的提示。只需输入“Y”以执行最佳实践设置:

CentOS8中怎么安装OpenLiteSpeed Web服务器

安装OpenLiteSpeed

使用dnf包管理器来安装OpenLiteSpeed:

[root@localhost~]#dnfinstall-yopenlitespeed

查看以下web服务是否启动,一般情况夏安装完成自动启动:

[root@localhost~]#systemctlstatuslsws

CentOS8中怎么安装OpenLiteSpeed Web服务器

Web服务侦听两个端口:8088和7080。端口8088用于演示,而端口7080是管理页面。

可以使用netstat命令确认Web服务器正在侦听的端口,如下所示:

[root@localhost~]#netstat-tlunp

CentOS8中怎么安装OpenLiteSpeed Web服务器

如果防火墙正在运行,需要打开下面的端口:

[root@localhost~]#firewall-cmd--permanent--add-port=8088/tcpsuccess[root@localhost~]#firewall-cmd--permanent--add-port=7080/tcpsuccess[root@localhost~]#firewall-cmd--reloadsuccess
CentOS8中怎么安装OpenLiteSpeed Web服务器

更改默认管理密码

默认情况下,管理员的密码设置为123456,我们需要更改此密码为一个非常可靠的密码。更好的是,可以设置一个其他用户为管理用户,运行下面的脚本来修改管理员配置:

[root@localhost~]#/usr/local/lsws/admin/misc/admpass.sh
CentOS8中怎么安装OpenLiteSpeed Web服务器

访问OpenLiteSpeed的web页面

如果要访问OpeLiteSpeed Web服务器的默认页面,输入服务器的ip地址+8088端口。 CentOS8中怎么安装OpenLiteSpeed Web服务器 如果要访问管理页面,输入服务器的ip地址+7080端口。账号密码为上一步设置的管理员 CentOS8中怎么安装OpenLiteSpeed Web服务器

CentOS8中怎么安装OpenLiteSpeed Web服务器

 </div> <div class="zixun-tj-product adv-bottom"></div> </div> </div> <div class="prve-next-news">
本文:CentOS8中怎么安装OpenLiteSpeed Web服务器的详细内容,希望对您有所帮助,信息来源于网络。
上一篇:CentOS下怎么安装Hadoop下一篇:

4 人围观 / 0 条评论 ↓快速评论↓

(必须)

(必须,保密)

阿狸1 阿狸2 阿狸3 阿狸4 阿狸5 阿狸6 阿狸7 阿狸8 阿狸9 阿狸10 阿狸11 阿狸12 阿狸13 阿狸14 阿狸15 阿狸16 阿狸17 阿狸18