1. OverviewNginx is an indispensable tool when we develop Java projects. Most of the time, it is used as a reverse proxy backend server to achieve load balancing and solve high concurrency. Most of the time, Nginx installation and configuration is done by operation and maintenance personnel, but in some companies without operation and maintenance positions, developers are still needed to do this work. Today we will explain how to quickly install Nginx on CentOS7 system without going into details. 2. Download the Nginx installation package1) Go to the Nginx official website (https://nginx.org/) and click the download link Screenshot from the official website 2) In the Stable version, download the latest version Screenshot from the official website 3. Install dependency packagesIn CentOS7 command line mode, enter the following commands in sequence to install the required dependency packages
4. Copy the Nginx installation package to the CentOS7 system and decompress itThere are many ways to copy the installation package to the CentOS7 system. You can use the Xshell tool to connect to the CentOS7 system and use the rz command to upload it, or you can use Xftp or other tools to upload it. Here we put the Nginx installation package in the /home directory. Enter the /home directory Enter the tar -zxvf nginx-1.20.1.tar.gz command to decompress the installation package. 5. Configure Nginx Enter the unzipped Nginx folder, # cd nginx-1.20.1 Enter the configuration command:
6. Compile and installCompile, enter the command: # make After installation and compilation is complete, enter the command: # make install 7. Start NginxEnter the Nginx directory: # cd /usr/local/nginx/sbin Enter the startup command: # ./nginx At this time, use the browser to access the IP address of the CentOS7 server, and you can see the homepage of Nginx. 8. Common commands of NginxNginx forced stop command: # ./nginx -s stop Nginx graceful stop command: # ./nginx -s quit // Graceful stop means waiting until the last interaction is completed before stopping. Nginx checks the configuration file for errors: # ./nginx -t Nginx reload command: # ./nginx -s reload Check the Nginx version: # ./nginx -v View the detailed version of Nginx: # ./nginx -V 9. OverviewThe installation of Nginx is relatively simple. Later, I will introduce other uses of Nginx. Everyone is welcome to communicate more. This is the end of this article about how to quickly install Nginx in CentOS7. For more information about how to install Nginx in CentOS7, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: CSS controls the spacing between words through the letter-spacing property
>>: HTML+CSS+JS to implement the Don't Step on the Whiteboard game
1. Call the parent component method directly thro...
Subquery in MySql database: Subquery: nesting ano...
When we are doing front-end development, we will ...
The full name of SSH is Secure SHell. By using SS...
I solved a problem tonight that has been botherin...
1. Introduction I have taken over a project of th...
In the front-end layout of the form, we often nee...
How to find slow SQL statements in MySQL? This ma...
Table of contents Let's talk about flattening...
Things to note 1. First, you need to create a my....
Preface This experiment prepares two virtual mach...
This article shares the specific code of node+soc...
<br />Related articles: Web skills: Multiple...
Table of contents 1. Middleman Model 2. Examples ...
Change the default style of select, usually throug...