How to install openlitespeed web server in CentOS 8

Time:2021-9-15

Openlitespeed is an open source version of Litespeed. It is a powerful and lightweight open source HTTP web server. It is developed by Lightspeed technology under the license of gplv3.0.
System environment
CentOS 8

Configure openlitespeed software source
First, add the openlitespeed software source to CentOS 8:

[[email protected] ~]# rpm -ivh http://rpms.litespeedtech.com…
How to install openlitespeed web server in CentOS 8 how to install openlitespeed web server in CentOS 8
Update software source:

[[email protected] ~]# dnf makecache
Install 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 doing so, make sure that the EPEL software source is added using the following command:

[[email protected] ~]# dnf install -y epel-release
After installing the EPEL software source, install lsphp as follows:

[[email protected] ~]# dnf install -y lsphp74 lsphp74-mysqlnd lsphp74-process lsphp74-mbstring lsphp74-mcrypt lsphp74-gd lsphp74-opcache lsphp74-bcmath lsphp74-pdo lsphp74-common lsphp74-xml
How to install openlitespeed web server in CentOS 8 how to install openlitespeed web server in CentOS 8
After successfully installing the PHP package using the DNF command above, let’s install the MariaDB database server.

Installing the MariaDB database
Run the following command to install MariaDB server:

[[email protected] ~]# dnf install -y mariadb mariadb-server
After installation, enable the startup of MariaDB service and start the service:

[[email protected] ~]# systemctl enable mariadb
[[email protected] ~]# systemctl start mariadb
Run the following systemctl command to check the status of the MariaDB service,

[[email protected] ~]# systemctl status mariadb
How to install openlitespeed web server in CentOS 8 how to install openlitespeed web server in CentOS 8
By default, MariaDB is not secure, so we need to take some additional steps to protect MariaDB. Run the following steps:

[[email protected] ~]# mysql_secure_installation
First, you need to set the password for the root user
How to install openlitespeed web server in CentOS 8 how to install openlitespeed web server in CentOS 8
For other tips. Simply enter “Y” to perform the best practice settings:
How to install openlitespeed web server in CentOS 8 how to install openlitespeed web server in CentOS 8

Install openlitespeed
To install openlitespeed using the DNF package manager:

[[email protected] ~]# dnf install -y openlitespeed
Check whether the following web services are started. Generally, they are started automatically after installation:

[[email protected] ~]# systemctl status lsws
How to install openlitespeed web server in CentOS 8 how to install openlitespeed web server in CentOS 8
The web service listens on two ports: 8088 and 7080. Port 8088 is used for demonstration, and port 7080 is the management page.

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

[[email protected] ~]# netstat -tlunp
How to install openlitespeed web server in CentOS 8 how to install openlitespeed web server in CentOS 8
If the firewall is running, you need to open the following ports:

[[email protected] ~]# firewall-cmd –permanent –add-port=8088/tcp
success
[[email protected] ~]# firewall-cmd –permanent –add-port=7080/tcp
success
[[email protected] ~]# firewall-cmd –reload
success
How to install openlitespeed web server in CentOS 8 how to install openlitespeed web server in CentOS 8

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

[[email protected] ~]# /usr/local/lsws/admin/misc/admpass.sh
How to install openlitespeed web server in CentOS 8 how to install openlitespeed web server in CentOS 8

Visit the openlitespeed web page
If you want to access the default page of the opelitespeed web server, enter the IP address of the server + port 8088.
How to install openlitespeed web server in CentOS 8 how to install openlitespeed web server in CentOS 8
If you want to access the administration page, enter the IP address of the server + 7080 port. The account password is the administrator set in the previous step
How to install openlitespeed web server in CentOS 8 how to install openlitespeed web server in CentOS 8

How to install openlitespeed web server in CentOS 8 how to install openlitespeed web server in CentOS 8
This is the end of the installation!

summary
Openlitespeed is an open source version of Litespeed. It is a powerful and lightweight open source HTTP web server. It is developed by Lightspeed technology under the license of gplv3.0.