OpenLiteSpeed Benchmark

Install OpenLiteSpeed on CentOS

To install OpenLiteSpeed web server on CentOS, install repository for your CentOS version

For CentOS 6

For CentOS 7

For CentOS 8

To install OpenLiteSpeed, run

Before you can install PHP, you need epel repository enabled with

Install PHP with

Set symlink

Start OpenLiteSpeed with

To stop OpenLiteSpeed, run

By default, OpenLiteSpeed will run on port 8088

You can login to Admin Interface at

By default, you see an example application. The configuration file for this is at

Default DocumentRoot is /usr/local/lsws/Example/html. To change, edit file

Find

Replace $VH_ROOT/html/ with whatever path you need. You need to restart OpenLiteSpeed to make the change go live

CentOS 7 VestaCP Upgrade PHP to 7.x

On CentOS 7 VestaCP install PHP 5.6 by default. This is very old version of PHP. To upgrade PHP to latest version 7.x, you can install remi repo.

Install EPEL repo

Install yum-utils

Install remi repo

Select PHP version you need

Here i selected PHP 7.3. You can select differnt PHP versions with commands like.

Make sure you only enable one PHP version. If you enabled a PHP version from remi repo, disable it with

Once you have desired version enabled, run yum upgrade

Or only for PHP, run

WHM php.ini editor

Disable PHP disable_functions on Cpanel Server

On a Cpanel Server using CentOS 7 + php-fpm, site phpinfo() shows few functions are set to disabled in disable_functions.

PHP disable_functions

I checked server wide PHP configuration in WHM for the PHP version the site is using. There is no disable_functions specified.

WHM php.ini editor

This is because in Cpanel server running in PHP-FPM, you need to edit php-fpm pool config file at

Replace ea-php73 with whatever PHP version you selected for this web site.

Remove the line

Restart php-fpm with

See Cpanel Server

apache-http-webserver

Apache Increase FD limit

On CentOS 7 sevrer running apache, when try to install plugin in WordPress admin area, i get error

This is due to Apache File Descriptor Limits.

To see current Limits, use following PHP script

To see system wide limits, use following commands

Normally this will be high value. You need to increse limit for user running Apache. On CentOS 7, the username is “apache”. To increase limit for this user, edit

Add following lines

To verify, we need to login as user Apache, and verify limits, for this, lets enable SSH or bash terminal for user apache. By default no SSH login allowed for this user.

Now change to user, verify the limits

Exit back to root, disable shell for user apache with command.

We need to edit service file for Apache. Default service file look like following.

Find

Add below

Method 2

create file

Add

Reload service file with

Restart Apache

See Apache

Download RPM package from yum repository

To download RPM file from yum repo, you need to install yum-utils package.

Now you can use command

Example

This will download and store all rpm files in /var/yum folder. –resolve will resolve dependency and download them. This will be helpful if you need to install a package on a system with no direct internet connection.

See yum

Zimbra Mail Server CentOS firewall settings

On CentOS 7 server with firewalld running, used following command to open ports used by Zimbra Mail Server.

See Zimbra, firewall-cmd