Phone :  +370 (5) 204-1903
Email: sales@1gbits.com

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.

Centos Tutorials Sep 15, 16 by admin 3 min Read
How To Install OpenLiteSpeed on CentOS 7

  • Install OpenLiteSpeed on CentOS 7

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
  • Installing OpenLitespeed

Now install OpenLiteSpeed with this simple yum command:

yum install openlitespeed
  • 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
  •  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:

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 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):

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:

/usr/local/lsws/bin/lswsctrl start
  • Accessing OpenLiteSpeed

OpenLiteSpeed will be available on HTTP port 7080 by default. Open your favorite browser and navigate to http://yourdomain.com:7080 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.

author img


Leave A Comment