Kategorie: Linux

Installation OpenLiteSpeed ​​and php 7.4 on Centos 8

The following tutorial describes how to install OpenLiteSpeed ​​with PHP 7.4 on a server running Centos 8.
This is done using a few simple steps.
Some time ago, we described how to install OpenLiteSpeed ​​on a server with a panel DirectAdmin today we'll do it on the open system.

First, we install the repository command:

rpm -Uvh http://rpms.litespeedtech.com/centos/litespeed-repo-1.1-1.el8.noarch.rpm

And we check to see if it is visible in the system:

dnf repolist

Then install OpenliteSpeed

sudo dnf install openlitespeed

Run it on your system:

systemctl start lsws
systemctl enable lsws

We also check its status:

systemctl status lsws

PHP Installation 7.4

For starters, add repositories EPEL

sudo dnf install epel-release

Then install the packages php

sudo dnf install lsphp74 lsphp74-mysqlnd lsphp74-process lsphp74-mbstring lsphp74-mcrypt lsphp74-gd lsphp74-opcache lsphp74-bcmath lsphp74-pdo lsphp74-common lsphp74-xml

We can also check if lsphp listening correctly:

netstat -pl | grip lsphp

Installing MariaDB

sudo dnf install mariadb mariadb-server

Run it on your system

systecmtl start mariadb
systemctl enable mariadb

We issue the command to carry out the basic configuration of the server and the MySQL root password giving

mysql_secure_installation

I answer questions:

Set a root password? [Y / N] Y
Remove anonymous users? [Y / N] Y
Remove test database and access to it? [Y / N] Y
Reload privilege tables now? [Y / N] Y

Now login to the shell using the MySQL root user

mysql -u root -p
Type Your Root Password:

I enter the password.

The next step is configuration management panel OpenliteSpeed ​​listening on port 7080 it unlocks the firewall

firewall-cmd --add-port=7080/tcp --permanent
firewall-cmd --reload

Password panel can generate by going to the directory:

cd /usr/local/lsws/admin/misc

And by typing:

sh admpass.sh

Configuration OpenliteSpeed ​​with PHP 7.4

Log in to the admin panel and go to openlitespeed Server Configuration 'External App

Then add LiteSpeed ​​SAPI App with the following parameters:

Name: lsphp74
Address: You://tmp/lshttpd/lsphp.sock
Notes: lsphp74 for OpenLiteSpeed
Max Connections: 35
Initial Request Timeout (secs): 60
Retry Timeout (secs): 0
Command: $SERVER_ROOT/lsphp74/bin/lsphp

Then we change the default PHP for the PHP version OpenLiteSpeed 7.4.

In the "Server Configuration", click the "Scripting".
In the "Name service module" select "lsphp74", which just added and click "Save".

The whole should look like

Add http and https to the firewall:

firewall-cmd --add-service=http --permanent
firewall-cmd --add-service=https --permanent
firewall-cmd --reload

The last step is to change the port the port Opellitespped 80

Go to the tab Listener

In the "Default", click "View".

In the "Address Settings", click "edit" to the right.

And change the port 8080 na 80

We save and reload lsphp

If everything is done correctly by using the browser on our server IP address we should see the home page OpenLiteSpeed

Linux

Udostępnij
Opublikowane przez
Linux

Recent posts

KeePass2 2.52 w Ubuntu 22.04

The guide below describes how to install KeePass on Ubuntu. Całość wykonamy za pomocą kilku poleceń

2 years temu

Installing Master PDF editor in Ubuntu 22.04

Master PDF Editor is a comprehensive PDF program, which includes many features. Oprócz tworzenia i edycji

2 years temu

iotop - memory monitoring

Iotop jest prostym narzędziem dla systemów Uniksowych umożliwiającym monitorowanie użycia dowolnego nośnika pamięci flash/hdd/ssd w

2 years temu

Run multiple commands in one cron job

You can separate two or more commands with semicolons (;), Semicolon (;): służy do oddzielania

2 years temu

Changing the exif data of a photo in the Linux terminal

Poniższy poradnik opisuje w jaki sposób za pomocą konsoli możemy dokonać edycji danych zdjęcia exif.

2 years temu

Installing Rocket.Chat Server on Rocky Linux 8

The following guide describes how to install Rocket.Chat on Rocky Linux 8 Całość bardzo prosto zainstalujemy

2 years temu