DEV Community


Posted on • Updated on

How to install web server OpenLiteSpeed on instance Oracle Cloud.

Hello Everyone, Let's Learn With Me!

In my post this time, We will learn how to install the OpenLiteSpeed web server on instance Oracle Cloud.

openlite speed
Pay attention to the topology above. On topology, we can see that in the VCN with CIDR, we will create a new instance. within the new instance, we will install OpenLiteSpeed`s web server. With an internet gateway, we can access the Web server on the internet.

Log in Oracle Cloud

we must log in to the platform Oracle Cloud in first.
Put in your name tenancy here, and click next.
login tenancy

You can log in with your user. then click sign in.

Prepare Server

Create VCN

After we login, click the menu button we will create a new VCN in the aksb tenancy. Okay, we just create it. !
home page oracle cloud
Click Networking's menu, and then click Virtual Cloud Network.
VCN menu

Don't forget to choose your compartment.

Click Create VCN
create VCN

In here, my VCN, I named is VCN-Web with training's compartment. As a topology, the CIDR is Click create VCN to create it.
vcn web


Create Subnet

In the VCN-Web, we will create a new public subnet. Click Create Subnet button.
create subnet

for the CIDR, use
public subnet

Don't forget to choose a public subnet. For the route-table and DHCP option, you can choose by default.

And for security lists choose by default too. And then click Create Subnet to create it.
security list

Wait a minute, and your subnet running or available.

If VCN and subnet already, the next step we will create a new instance for the server.

Create instance

Okay, click the menu button, and select Compute and choose Instances.

instance menu

Here we can create a new instance. Click create a new instance.
create instance

The instance named is OpenLiteSpeed-VM in Availability Domain 1.
name ad

For Image, I use CentOS 7, you can change the image as wish you. And for shape, I change to 1 GB.
shape image

For network, make sure you choose VCN-Web and select public-subnet for the subnet.

And now, you create an ssh-key in your pc. Here, I use WSL2 (Windows Subsystem for Linux 2) Ubuntu 20.04.
use ssh-keygen for command.
And see with cat command, to see RSA public.
For example: cat /home/aksb/.ssh/

Copy then paste on console SSH Keys. And click Create.


The next step, try to connect OpenLiteSpeed-VM with SSH.
Yes, the result is failed. We can't still connect in VM. Because VM still not allowed to connect. Therefore, we must add an Internet Gateway on VCN-Web.

Create Internet Gateway

Log in to VCN-Web, select Internet Gateway. As you can see, we do not have an Internet Gateway for access to the internet. Click Create Internet Gateway to add it.


Then, add Internet-Gateway-WEB to Route Table. Choose Default Route Table.
route table

In Route Rules, click Add Route Rules.

In Route Rule, choose Internet Gateway for the target type. And for destination CIDR. Choose Internet-Gateway-WEB that we have created. Click Add Route Rule.
add route table

internetgatway in route rule

Connect Instance

Try to connect VM again with ssh.
ssh username@ippublicserver
For example: ssh opc@ and then Enter

Yaps! We have successfully login in with SSH.

Install OpenLiteSpeed

After login to the OpenLiteSpeed-VM instance, we can start to Install OpenLiteSpeed now.

Add repo

sudo rmp -ivh

add repo

Install epel-release

sudo yum install epel-release

Install OpenLiteSpeed

sudo yum install openlitespeed
install openlitespeed

Install PHP

sudo yum install lsphp74 lsphp74-json lsphp74-xmlrpc lsphp74-xml lsphp74-tidy lsphp74-soap lsphp74-snmp lsphp74-pspell lsphp74-process lsphp74-pgsql lsphp74-pear lsphp74-pdo lsphp74-opcache lsphp74-odbc lsphp74-mysqlnd lsphp74-mcrypt lsphp74-mbstring lsphp74-ldap lsphp74-intl lsphp74-imap lsphp74-gmp lsphp74-gd lsphp74-enchant lsphp74-dba lsphp74-common lsphp74-bcmath lsphp74-memcached lsphp74-redis
install PHP

Check OpenLiteSpeed

Checking the status OpenLiteSpeed, whether it's running or not.
You can check with this command :
sudo /usr/local/lsws/bin/lswsctrl status
If not running you must enable OpenLiteSpeed first. And then, check the status again.
sudo /usr/local/lsws/bin/lswsctrl start

Firewall Configuration On Server

Enable port

In OpenLiteSpeed-VM enable ports 8088 and 7080 to OpenLiteSpeed web server can access on the internet(public).

sudo firewall-cmd --zone=public --permanent --add-port=8088/tcp
sudo firewall-cmd --zone=public --permanent --add-port=7080/tcp

Reload firewall configuration

sudo firewall-cmd --reload

Adding Port on Security List

So that the web server can be accessed via the internet by using a port from OpenLiteSpeed, we must add ports 7080 and 8088 to the Security list in Oracle Cloud.

Open VCN-Web, and then select Security List. Edit default security list.
menu security

In the ingress rule, click Add Ingress Rules
menu ingress rule

For CIDR use with TCP protocol and 8088 and 7080 for the port.
add ingress rule p.8088



###Check Web Server
Copy your IP public and add port 8088 to check.
Yaps.. you have successfully installed the OpenLiteSpeed Web Server.

Setting WebAdmin

Web Admin

And add the port 7080 to login Web Admin.
If your web like this, click Advance button.

Click proceed to your IP (unsafe)


Change Username and Password

sudo /usr/local/lsws/admin/misc/


And then check again, and log in with a new username and password
u np!

You can set configuration here.

Okay, that is all my post about how to install the OpenLiteSpeed web server on the Oracle Cloud instance.

Thank you for reading:)

Top comments (0)