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
Post a Comment