[Linux] High-performance web server Nginx installation tutorial (Ubuntu 22.04)

Preface

Nginx is a high-performance open source web server software that can also be used as a reverse proxy server, load balancer, HTTP cache, and as a mail proxy server. Known for its high performance, stability, and rich functionality, Nginx is widely used to build high-traffic websites and applications.


step

  1. Update software source
    First, you need to update the system's software source to ensure that the installed software is the latest version.

    sudo apt update
    
  2. Install Nginx
    Use the following command to install Nginx on your Linux system:

    sudo apt install nginx
    

  3. Check Nginx version
    After the installation is complete, you can use the following command to check the Nginx version information:

sudo nginx -v

  1. Check the running status of Nginx
    You can use the following command to check the running status of Nginx:

    sudo systemctl status nginx
    

  2. Verify installation
    Visit localhost in the browser. If the installation is successful, you will see the "Welcome to nginx!" page. /var/www/html is the default web server root directory
    Nginx Welcome Page


Summarize

Through the above steps, we successfully installed and verified Nginx on the Linux system. Now you can start configuring and using Nginx to deploy your web application or website.

Guess you like

Origin blog.csdn.net/qq_34988204/article/details/134952697