In this tutorial, we will show you how to install and configuration of OpenLiteSpeed on your CentOS 7. For those of you who didn’t know, 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. As far as Linux web servers are concerned, OpenLiteSpeed has some interesting features that make it a solid choice for many installations. It features Apache compatible rewrite rules, a web administration interface, and customized PHP processing optimized for the server.
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘
sudo‘ to the commands to get root privileges. I will show you through the step-by-step installation OpenLiteSpeed on a CentOS 7 server.
Install OpenLiteSpeed on CentOS 7
Step 1. First, add the OpenLitespeed repository to your server.
Use this command to add the repo into your VPS:
rpm -ivh http://rpms.litespeedtech.com/centos/litespeed-repo-1.1-1.el7.noarch.rpm
Next, you need to enable EPEL repository on your system:
yum install epel-release
Step 2. Installing OpenLitespeed.
Now install OpenLiteSpeed with this simple yum command:
yum install openlitespeed
Step 3. 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:
yum install lsphp56 lsphp56-mysql lsphp56-process lsphp56-mbstring lsphp56-mcrypt lsphp56-gd
Now enable PHP 5.6 by simply linking it into the location that OpenLiteSpeed calls when attempting to execute PHP code. Issue command below:
ln -sf /usr/local/lsws/lsphp56/bin/lsphp /usr/local/lsws/fcgi-bin/lsphp5
Step 4. Configure the 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:
Step 5. Installing MariaDB on CentOS 7.
MariaDB is a drop-in replacement for MySQL. It is a robust, scalable, and reliable SQL server that comes with a rich set of enhancements. We will also be using yum to install MariaDB:
yum install mariadb mariadb-server mysql
By default, MariaDB is not hardened. You can secure MariaDB using the
mysql_secure_installation script. you should read and below each step carefully which will set a 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):
mysql -u root -p
To start the database, run the commands below:
systemctl start mariadb systemctl enable mariadb
Finally, You can give it a test whether OLSWS is running or not:
Step 6. Accessing OpenLiteSpeed.
OpenLiteSpeed will be available on HTTP port 7080 by default. Open your favorite browser and navigate to
http://server-ip:7080 and complete the required steps to finish the installation. If you are using a firewall, please open port 7080 to enable access to the control panel.
Congratulations! You have successfully installed OpenLiteSpeed. Thanks for using this tutorial for installing the OpenLiteSpeed web server on your CentOS 7 system. For additional help or useful information, we recommend you to check the official OpenLiteSpeed website.