Open Lite Speed Web server installation on centOs7

1
317

Open Lite Speed Web server

Open Lite Speed is an open source web server. Which can be used to manage and serve websites. It has some interesting features with good optimization.In this article, We will learn about how to install and configure OpenLite Speed Webserver on Centos 7/RHEL 7.

Make sure that the system is up to date as follows

#yum -y update

Add the EPEL repository as follows

#yum install epel-release

Open-lite Speed Web server Repository as follows

#rpm -ivh http://rpms.litespeedtech.com/centos/litespeed-repo-1.1-1.el7.noarch.rpm
Retrieving http://rpms.litespeedtech.com/centos/litespeed-repo-1.1-1.el7.noarch.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:litespeed-repo-1.1-1.el7.centos  ################################# [100%]

Now install the openlite webserver and mariadb as follows

#yum -y install openlitespeed mariadb-server


Once the installation completes, enable and start MariaDB-server as follows

#systemctl enable mariadb
#systemctl start mariadb

Now secure the MariaDB installation

#mysql_secure_installation 

Now set the password administrator

[root@localhost ~]# /usr/local/lsws/admin/misc/admpass.sh

Please specify the user name of administrator.
This is the user name required to login the administration Web interface.

User name [admin]: admin

Please specify the administrator's password.
This is the password required to login the administration Web interface.

Password:
Retype password:
Administrator's username/password is updated successfully!
[root@localhost ~]#

Now access the OpenLiteWebsite homepage by using URL: http://ip-address:8088 in your favorite browser.

The default version of PHP comes with open lite web server is 5.6

We can also install the latest version of PHP and replace with that in Open lite webserver.

Install latest version of PHP 7 as follows

[root@localhost ~]# yum -y install lsphp71 lsphp71-mysqlnd
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirror.fibergrid.in
 * epel: kartolo.sby.datautama.net.id
 * extras: mirror.fibergrid.in
 * updates: mirror.fibergrid.in
Resolving Dependencies
--> Running transaction check
---> Package lsphp71.x86_64 0:7.1.2-1.el7.centos will be installed
--> Processing Dependency: lsphp71-common(x86-64) = 7.1.2-1.el7.centos for package: lsphp71-7.1.2-1.el7.centos.x86_64
---> Package lsphp71-mysqlnd.x86_64 0:7.1.2-1.el7.centos will be installed
--> Processing Dependency: lsphp71-pdo(x86-64) = 7.1.2-1.el7.centos for package: lsphp71-mysqlnd-7.1.2-1.el7.centos.x86_64
--> Running transaction check
---> Package lsphp71-common.x86_64 0:7.1.2-1.el7.centos will be installed
---> Package lsphp71-pdo.x86_64 0:7.1.2-1.el7.centos will be installed
--> Finished Dependency Resolution

Dependencies Resolved

======================================================================================================================================
 Package                           Arch                     Version                                 Repository                   Size
======================================================================================================================================
Installing:
 lsphp71                           x86_64                   7.1.2-1.el7.centos                      litespeed                   4.2 M
 lsphp71-mysqlnd                   x86_64                   7.1.2-1.el7.centos                      litespeed                   132 k
Installing for dependencies:
 lsphp71-common                    x86_64                   7.1.2-1.el7.centos                      litespeed                   610 k
 lsphp71-pdo                       x86_64                   7.1.2-1.el7.centos                      litespeed                    66 k

Transaction Summary
======================================================================================================================================
Install  2 Packages (+2 Dependent packages)

Total download size: 5.0 M
Installed size: 20 M
Downloading packages:
(1/4): lsphp71-common-7.1.2-1.el7.centos.x86_64.rpm                                                            | 610 kB  00:00:05
(2/4): lsphp71-mysqlnd-7.1.2-1.el7.centos.x86_64.rpm                                                           | 132 kB  00:00:00
(3/4): lsphp71-pdo-7.1.2-1.el7.centos.x86_64.rpm                                                               |  66 kB  00:00:00
(4/4): lsphp71-7.1.2-1.el7.centos.x86_64.rpm                                                                   | 4.2 MB  00:00:14
--------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                 349 kB/s | 5.0 MB  00:00:14
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : lsphp71-common-7.1.2-1.el7.centos.x86_64                                                                           1/4
  Installing : lsphp71-pdo-7.1.2-1.el7.centos.x86_64                                                                              2/4
  Installing : lsphp71-mysqlnd-7.1.2-1.el7.centos.x86_64                                                                          3/4
  Installing : lsphp71-7.1.2-1.el7.centos.x86_64                                                                                  4/4
  Verifying  : lsphp71-pdo-7.1.2-1.el7.centos.x86_64                                                                              1/4
  Verifying  : lsphp71-mysqlnd-7.1.2-1.el7.centos.x86_64                                                                          2/4
  Verifying  : lsphp71-common-7.1.2-1.el7.centos.x86_64                                                                           3/4
  Verifying  : lsphp71-7.1.2-1.el7.centos.x86_64                                                                                  4/4

Installed:
  lsphp71.x86_64 0:7.1.2-1.el7.centos                           lsphp71-mysqlnd.x86_64 0:7.1.2-1.el7.centos

Dependency Installed:
  lsphp71-common.x86_64 0:7.1.2-1.el7.centos                          lsphp71-pdo.x86_64 0:7.1.2-1.el7.centos

Complete!

Now install the PHP-dependencies by using the following command

#yum -y install lsphp71-gd lsphp71-xml lsphp71-mbstring lsphp71-opcache lsphp71-mcrypt

Now link the latest version of PHP to OpenLite web server

[root@localhost ~]# ln -sf /usr/local/lsws/lsphp71/bin/lsphp /usr/local/lsws/fcgi-bin/lsphp5

Restart and check the status of Open Lite Web server

#systemctl restart lsws
#systemctl status lsws
● lsws.service - LSB: lshttpd
   Loaded: loaded (/etc/rc.d/init.d/lsws)
   Active: active (exited) since Thu 2017-03-02 03:17:26 EST; 3min 17s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 11031 ExecStart=/etc/rc.d/init.d/lsws start (code=exited, status=0/SUCCESS)

Mar 02 03:17:24 localhost.localdomain systemd[1]: Starting LSB: lshttpd...
Mar 02 03:17:26 localhost.localdomain systemd[1]: Started LSB: lshttpd.

Now check the php version


To configure all the settings access administrator dashboard by using the URL Address https://ip-address:7080 in your favorite browser.

Now login with credentials created above to access the dashboard.

We can change the default port by clicking on listeners and click on view and edit options. Change the port number and click on save option to write changes into configuration files.

Now restart the lsws service by clicking on Graceful restart at the top right corner. Now we can access website using address http://ip-address/

We can also change web admin port from Webadminsettings->Listerners.

We can create virtual hosts easily by clicking on add virtual host, but before, we start to create a directory for the virtual host.

Enjoy Open Lite Webserver, It is much more optimized than apache web server.  if you want to join this discussion, feel free to leave a comment!

1 COMMENT