What is nginxNginx is a high-performance http server/reverse proxy server and email (IMAP/POP3) proxy server. Developed by Russian programmer Igor Sysoev, official tests show that nginx can support 50,000 concurrent connections, and its CPU, memory and other resource consumption is very low, and it runs very stably. Application Scenario http server. Nginx is an http service that can provide http services independently. Can be used as a static web server. Virtual hosts. It is possible to virtualize multiple websites on one server. For example, a virtual host used by a personal website. Reverse proxy, load balancing. When the website traffic reaches a certain level and a single server cannot meet the user's requests, multiple server clusters are needed and nginx can be used as a reverse proxy. In addition, multiple servers can share the load evenly, and there will be no situation where a server is idle due to downtime due to high load. 1. Download the required dependenciesyum install gcc gcc-c++ make automake autoconf libtool pcre* zlib openssl openssl-devel 2. Download the nginx compressed packagewget http://nginx.org/download/nginx-1.16.1.tar.gz 3. Unzip, usually unzip to the /usr/local directorytar zxvf nginx-1.16.1.tar.gz 4. Compile and installEnter the unzipped directory ( the path is critical ) cd /usr/local/nginx-1.16.1 Use the configure command to check the installation environment ./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module –prefix specifies the installation directory of nginx. The default path is /usr/local/nginx. Compile using the make command make
Now check the directory and find Makefile and objs Install the compiled program make install Go to the installation directory to check whether the installation is complete Installation Completed! 5. Start nginxEnter the /usr/local/nginx/sbin directory and see the nginx executable file, as shown above ./nginx nginx started successfully! Go to the page to visit and see that the default listening port is 80. Just access the ip where nginx is located. Note: If the previously specified installation directory is not /usr/local/nginx, a file missing error may be reported at startup. Follow the prompts to create the corresponding files. Extensions:./configure is the first step of source code installation. It configures the software to be installed and checks whether the installation environment has dependencies on the software. For example, it checks whether gcc is installed and generates makefiles. You can use make and make install to compile and install the program. You can add parameters such as –with, –enable, –without, –disable, etc. to control the compilation. Make reads the makefile file, which is usually used to compile the makefile file when installing the program through the source code package. make install is to install the compiled program make clean deletes some temporary files (if executed here, Makefile and objs will be deleted) SummarizeThis is the end of this article on how to quickly install Nginx in Linux. For more information about installing Nginx in Linux, 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:
|
<<: WEB Chinese Font Application Guide
>>: Detailed explanation of Vue lazyload picture lazy loading example
Table of contents 1. Introduce cases 2. View the ...
Scenario You need to authorize the tester to use ...
Table of contents 1. Easy to read code 1. Unified...
name Specify a name for the tag. Format <input...
background Speaking of MySQL deadlock, I have wri...
Problem Description Today, when I was modifying t...
When we write some UI components, if we don't...
Table of contents 1. Introduction 2. Implementati...
The effect is as follows: Example 1 Example 2: Ta...
Mixins provide a very flexible way to distribute ...
I summarized the previous notes on installing MyS...
Preface For the permissions of files or directori...
SMIL adds support for timing and media synchroniz...
Configure Tomcat First install Tomcat Installing ...
Table of contents 1. setTimeout() timer 2. Stop t...