Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install OpenLiteSpeed Web server in CentOS8

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces the knowledge of "how to install OpenLiteSpeed Web server in CentOS8". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

OpenLiteSpeed is the community version of LiteSpeed EnterPrise. Compared with Nginx, many extensions such as Brotli, nginx * * cache-purge and other extensions will not support the latest Stable version in time, and there is no enterprise-level guarantee.

System environment

CentOS 8

Configure OpenLiteSpeed software source

First add the OpenLiteSpeed software source to CentOS 8:

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

Update the software source:

[root@localhost ~] # dnf makecache installs PHP from OpenLiteSpeed software source

In this step, we will install PHP 7.4 using the OpenLiteSpeed software source commonly known as LSPHP. However, before you do so, make sure that the epel software source is added using the following command:

[root@localhost ~] # dnf install-y epel-release

After installing the epel software source, install LSPHP below:

[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

After successfully installing the PHP package using the above dnf command, let's install the MariaDB database server.

Install the MariaDB database

Run the following command to install mariadb-server:

[root@localhost ~] # dnf install-y mariadb mariadb-server

After the installation is complete, enable the boot of the mariadb service and start the service:

[root@localhost ~] # systemctl enable mariadb [root@localhost ~] # systemctl start mariadb

Run the following systemctl command to check the status of the mariadb service

[root@localhost ~] # systemctl status mariadb

By default, MariaDB is not secure, so we need to take some extra steps to protect MariaDB. Run the following steps:

[root@localhost ~] # mysql_secure_installation

First, you need to set a password for the root user

For other tips. Simply enter "Y" to perform the best practice settings:

Install OpenLiteSpeed

Use the dnf package manager to install OpenLiteSpeed:

[root@localhost ~] # dnf install-y openlitespeed

Check whether the following web services are started. In general, the summer installation is completed and starts automatically:

[root@localhost ~] # systemctl status lsws

The Web service listens on two ports: 8088 and 7080. Port 8088 is used for demonstration, while port 7080 is the administrative page.

You can use the netstat command to confirm the port on which the Web server is listening, as follows:

[root@localhost ~] # netstat-tlunp

If the firewall is running, you need to open the following ports:

[root@localhost ~] # firewall-cmd-- permanent-- add-port=8088/tcpsuccess [root@localhost ~] # firewall-cmd-- permanent-- add-port=7080/tcpsuccess [root@localhost ~] # firewall-cmd-- reloadsuccess change the default management password

By default, the administrator's password is set to 123456, and we need to change this password to a very reliable password. Even better, you can set another user as an administrative user and run the following script to modify the administrator configuration:

[root@localhost ~] # / usr/local/lsws/admin/misc/admpass.sh visit the web page of OpenLiteSpeed

If you want to access the default page of the OpeLiteSpeed Web server, enter the ip address of the server + port 8088. If you want to access the administration page, enter the ip address of the server + port 7080. The account password is the administrator set in the previous step.

This is the end of the content of "how to install OpenLiteSpeed Web server in CentOS8". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report