How To Install OpenLiteSpeed on CentOS 7

September 15, 2016

How To Install OpenLiteSpeed on CentOS 7

OpenLiteSpeed is an open source HTTP server developed by LiteSpeed Technologies. OpenLiteSpeed is a high performance and lightweight HTTP server which comes with a Web Gui administration interface. It can handle more than hundred thousand concurrent connections with low resource usage (CPU and RAM). OpenLiteSpeed supports many OS like Linux, Mac OS, FreeBSD, and SunOS and can be used to run website scripts written in PHP, Ruby Perl, and java.

  • Install OpenLiteSpeed on CentOS 7

First, add the OpenLitespeed repository to your server.

Use this command to add the repo into your VPS:

Next, you need to enable EPEL repository on your system:

  • Installing OpenLitespeed

Now install OpenLiteSpeed with this simple yum command:

  • Installing PHP for OpenLitespeed

There is a different version of PHP used by OpenLitespeed, PHP versions for openLiteSpeed start with “ls”. Install PHP 7 with many of the extensions to get a rich feature set by typing:

Now enable PHP 5.6 by simply linking it into the location that OpenLiteSpeed calls when attempting to execute PHP code. Issue command below:

  •  Configure OpenLiteSpeed web server

OpenLiteSpeed has an Admin Gui for management, so we will configure the admin password for the openLiteSpeed GUI, and then configure PHP 7 to work with openLiteSpeed and open standard HTTP port 80:

  • Installing MariaDB on CentOS 7

MariaDB is a drop in replacement for MySQL. It is a robust, scalable and reliable SQL server that comes rich set of enhancements. We will also be using yum to install MariaDB:

By default, MariaDB is not hardened. You can secure MariaDB using the mysql_secure_installation script. you should read and below each steps carefully which will set root password, remove anonymous users, disallow remote root login, and remove the test database and access to secure MySQL:

To log into MariaDB, use the following command (note that it’s the same command you would use to log into a MySQL database):

To start the database, run the commands below:

Finally, You can give it a test whether OLSWS is running or not:

  • Accessing OpenLiteSpeed

OpenLiteSpeed will be available on HTTP port 7080 by default. Open your favorite browser and navigate to or http://server-ip:7080 and complete the required the steps to finish the installation. If you are using a firewall, please open port 7080 to enable access to the control panel.

Congratulation’s! You have successfully installed OpenLiteSpeed.