Skip to main content

How to install NGINX web server in oracle Linux cloud instance?

 

Step 1:

Login to oracle Linux instance using SSH client.

Step 2:

Enter the NGINX installation command as follows.

> sudo yum install nginx


If you face 'No package nginx available' error, we need to install the 'EPEL' repository.

To install the EPEL repo, use the below command.

> sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm


We can install NGINX server once EPEL is installed .

Enter the command  'sudo yum install nginx' again.


Wait until the installation is complete.

Step 3:

We need to start the NGINX server once the installation is complete.

Also, we need to make NGINX startup as a service.So that we don't need to start the NGINX server manually after reboot.

Command to make the NGINX as a service is as follows.

> sudo systemctl enable --now nginx.service


Step 4:

Verify the NGINX server status using the following command.

> sudo systemctl status nginx


Step 5:

Add the HTTP firewall for port 80 using the below command.

> sudo firewall-cmd --add-service=http --permanent

Step 6:

Reload the firewall configuration using the following command.

> sudo firewall-cmd --reload



Step 7:

Go back to browser and enter the cloud linux public IP address in URL and press enter.

You can see the default HTML index page of the NGINX web server.

You will access the web server using the internet through public IP.



Please click and subscribe to the below channel to see this tutorial in video format.

https://www.youtube.com/channel/UCtzdDJIXhQX6v3-8iXCJWQw?sub_confirmation=1





Comments

Popular posts from this blog

How to create free oracle cloud ubuntu vps and access through windows remote desktop connection?

In this post, We will see how to create a free ubuntu VPS server in oracle cloud and configure ubuntu xrdp to access via windows remote desktop connection. Creating Free UBUNTU VPS server in oracle cloud If you don't have Ubuntu VPS running, follow the link below and create the server. Also, You can watch the youtube video tutorial at the end of this post. Create Free VPS in oracle cloud While creating the compute instance, we need to select Canonical Ubuntu in the Operating system image selection below. Follow the below steps once you have the server up and running. Update firewall port configurations for RDP We need to allow connections via port 3389 in oracle cloud subnet configurations for remote desktop connection. To do that, Click 'Public subnet' on the ubuntu instance details page and add a new Ingress rule. Select Default security list. Click the 'Add Ingress rul

Install and configure free secure SSL certificate in NGINX web server in Oracle Linux cloud

SSL certificates are used to secure our website and encrypt the details sent to the server. We will use a free self-signed SSL certificate and configure the SSL certificate using the NGINX web server. We need the oracle Linux cloud instance and NGINX server up and running. This step is prerequisite for this tutorial. Please refer to below link to install the oracle Linux and NGINX server. https://www.tech4learners.com/2022/01/how-to-create-linux-instance-with-24-gb.html https://www.tech4learners.net/2022/01/install-nginx-web-server-in-linux-cloud.html Once your compute instance and NGINX are up and running, proceed with the following steps. First step is to create PRIVATE / PUBLIC keys using the openssl command. We are using the RSA algorithm as an encryption method.  Replace the <IP_ADDRESS> with your Linux instance IP ADDRESS. sudo openssl req -new -x509 -days 30 -nodes -newkey rsa:2048 -keyout private.key \-out public.crt -subj '/C=US/ST=Ca/L=Sunnydale/CN=<IP_ADDRESS>