• Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial News Comments FAQ Related Articles

How to Install Nginx web server on Rocky Linux 9.2

  • 00:39 cat /etc/os-release
  • 00:55 dnf install nginx
  • 01:30 systemctl enable nginx
  • 01:44 systemctl start nginx
  • 02:02 systemctl status nginx
{{postValue.id}}

To Install Nginx web server on Rocky Linux 9.2

Introduction :

NGINX (Engine X) is one of the most popular, powerful, and high-performance open-source HTTP web servers and reverse proxies that has an event-driven architecture and can also be used as a load balancer, mail proxy, and HTTP cache which is free, fast, stable, easy to configure, and consumes little resources.

Installation steps :

Step 1: Check the version of the OS by using the below command.

[root@Linuxhelp ~]# cat /etc/os-release
NAME="Rocky Linux"
VERSION="9.2 (Blue Onyx)"
ID="rocky"
ID_LIKE="rhel centos fedora"
VERSION_ID="9.2"
PLATFORM_ID="platform:el9"
PRETTY_NAME="Rocky Linux 9.2 (Blue Onyx)"
ANSI_COLOR="0;32"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:rocky:rocky:9::baseos"
HOME_URL="https://rockylinux.org/"
BUG_REPORT_URL="https://bugs.rockylinux.org/"
SUPPORT_END="2032-05-31"
ROCKY_SUPPORT_PRODUCT="Rocky-Linux-9"
ROCKY_SUPPORT_PRODUCT_VERSION="9.2"
REDHAT_SUPPORT_PRODUCT="Rocky Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="9.2"

Step 2: Install Nginx package with DNF install

[root@Linuxhelp ~]# dnf install nginx
google-chrome                                                                  5.6 kB/s | 3.6 kB     00:00    
Last metadata expiration check: 0:00:01 ago on Sat 01 Jul 2023 06:08:04 AM IST.
Dependencies resolved.
===============================================================================================================
 Package                        Architecture        Version                       Repository              Size
===============================================================================================================
Installing:
 nginx                          x86_64              1:1.20.1-14.el9               appstream               38 k
Installing dependencies:
 nginx-core                     x86_64              1:1.20.1-14.el9               appstream              567 k
 nginx-filesystem               noarch              1:1.20.1-14.el9               appstream               10 k


 rocky-logos-httpd              noarch              90.14-1.el9                   appstream               24 k

Transaction Summary
===============================================================================================================
Install  4 Packages

Total download size: 640 k
Installed size: 1.8 M
Is this ok [y/N]: y
Downloading Packages:
(1/4): nginx-filesystem-1.20.1-14.el9.noarch.rpm                                23 kB/s |  10 kB     00:00    
(2/4): rocky-logos-httpd-90.14-1.el9.noarch.rpm                                 52 kB/s |  24 kB     00:00    
(3/4): nginx-1.20.1-14.el9.x86_64.rpm                                           82 kB/s |  38 kB     00:00    
(4/4): nginx-core-1.20.1-14.el9.x86_64.rpm                                     1.8 MB/s | 567 kB     00:00    
---------------------------------------------------------------------------------------------------------------
Total                                                                          397 kB/s | 640 kB     00:01     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                       1/1 
  Running scriptlet: nginx-filesystem-1:1.20.1-14.el9.noarch                                               1/4 
  Installing       : nginx-filesystem-1:1.20.1-14.el9.noarch                                               1/4 
  Installing       : nginx-core-1:1.20.1-14.el9.x86_64                                                     2/4 
  Installing       : rocky-logos-httpd-90.14-1.el9.noarch                                                  3/4 
  Installing       : nginx-1:1.20.1-14.el9.x86_64                                                          4/4 



  Running scriptlet: nginx-1:1.20.1-14.el9.x86_64                                                          4/4 
  Verifying        : rocky-logos-httpd-90.14-1.el9.noarch                                                  1/4 
  Verifying        : nginx-filesystem-1:1.20.1-14.el9.noarch                                               2/4 
  Verifying        : nginx-1:1.20.1-14.el9.x86_64                                                          3/4 
  Verifying        : nginx-core-1:1.20.1-14.el9.x86_64                                                     4/4 

Installed:
  nginx-1:1.20.1-14.el9.x86_64                            nginx-core-1:1.20.1-14.el9.x86_64                   
  nginx-filesystem-1:1.20.1-14.el9.noarch                 rocky-logos-httpd-90.14-1.el9.noarch                

Complete!

Step 3: Enable the Nginx service by using the below command.

[root@Linuxhelp ~]# systemctl enable nginx
Created symlink /etc/systemd/system/multi-user.target.wants/nginx.service → /usr/lib/systemd/system/nginx.service.

Step 4: Start the Nginx service by using the below command..

 [root@Linuxhelp ~]# systemctl start nginx

Step 5: Check the Status of the Nginx service by using the below command.

 [root@Linuxhelp ~]# systemctl status nginx
● nginx.service - The nginx HTTP and reverse proxy server
     Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; preset: disabled)
     Active: active (running) since Sat 2023-07-01 06:09:34 IST; 18s ago
    Process: 6508 ExecStartPre=/usr/bin/rm -f /run/nginx.pid (code=exited, status=0/SUCCESS)
    Process: 6509 ExecStartPre=/usr/sbin/nginx -t (code=exited, status=0/SUCCESS)
    Process: 6511 ExecStart=/usr/sbin/nginx (code=exited, status=0/SUCCESS)
   Main PID: 6512 (nginx)
      Tasks: 3 (limit: 22877)


     Memory: 2.9M
        CPU: 120ms
     CGroup: /system.slice/nginx.service
             ├─6512 "nginx: master process /usr/sbin/nginx"
             ├─6513 "nginx: worker process"
             └─6514 "nginx: worker process"

Jul 01 06:09:34 Linuxhelp systemd[1]: Starting The nginx HTTP and reverse proxy server...
Jul 01 06:09:34 Linuxhelp nginx[6509]: nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
Jul 01 06:09:34 Linuxhelp nginx[6509]: nginx: configuration file /etc/nginx/nginx.conf test is successful
Jul 01 06:09:34 Linuxhelp systemd[1]: Started The nginx HTTP and reverse proxy server.

Step 6: Go to browser and search your server ip address. You should receive the default Nginx landing page as shown in the below image:

Snap 1

Conclusion:

We have reached the end of this article. In this guide, we have walked you through the steps required to install Nginx web server on Rocky Linux 9.2. Your feedback is much welcome.

Tags:
stephan
Author: 

Comments ( 0 )

No comments available

Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

Does Nginx support load balance?

A

Yes, its supports load balance.

Q

What is the speciality of Nginx?

A

A Nginx is built to offer low memory usage and high concurrency.

Q

What are the main benefits of using NGINX Plus over NGINX Open Source?

A

A NGINX Plus is convenient, fully supported by NGINX, Inc., and provides a range of advanced features.

Q

Does Nginx have FastCGI support?

A

yes, it supports FastCGI support.

Q

Is Nginx an open-source server?

A

Yes, it is free of cost.

Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Luk Van De Looverbosch ?
How to create a root ?

Hello,
How to create root@linuxhelp in Linux Mint 20.1 64-bit ?
Thanks in advance for your reply.
Best regards.

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.