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
-
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
-
Install Nginx
Use the following command to install Nginx on your Linux system:sudo apt install nginx
-
Check Nginx version
After the installation is complete, you can use the following command to check the Nginx version information:
sudo nginx -v
-
Check the running status of Nginx
You can use the following command to check the running status of Nginx:sudo systemctl status nginx
-
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
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.