Install the required environment 1. gcc installation To install nginx, you need to compile the source code downloaded from the official website. The compilation depends on the gcc environment. If you don’t have the gcc environment, you need to install it:
2. PCRE pcre-devel installation PCRE (Perl Compatible Regular Expressions) is a Perl library that includes a Perl compatible regular expression library. The http module of nginx uses pcre to parse regular expressions, so the pcre library needs to be installed on Linux. pcre-devel is a secondary development library developed using pcre. nginx also requires this library. Order:
3. zlib installation The zlib library provides many compression and decompression methods. Nginx uses zlib to gzip the contents of the http package, so the zlib library needs to be installed on Centos.
4. OpenSSL Installation OpenSSL is a powerful secure socket layer cryptographic library that includes major cryptographic algorithms, commonly used key and certificate packaging management functions, and SSL protocols, and provides a wealth of applications for testing or other purposes. Nginx not only supports the http protocol, but also supports https (that is, transmitting http over the ssl protocol), so you need to install the OpenSSL library on Centos.
Download the official website Download the .tar.gz installation package directly from: https://nginx.org/en/download.html Unzip
Configuration
Compile and install
Find the installation path:
Start and stop nginx
Query the nginx process: To enable automatic startup, just add the startup code in rc.local.
Add a row
Set Execute Permissions
You may also be interested in:
|
<<: Pitfalls encountered when installing MySQL 5.7.17 compressed version under Windows
>>: Implementation of WeChat applet message push in Nodejs
1. Dynamic parameters Starting from 2.6.0, you ca...
1. Find the corresponding nodejs package, refer t...
1. What is Vue Vue is a progressive framework for...
Table of contents 1. Implement the component time...
Table of contents Install vim plugin manager Add ...
Long story short, today we will talk about using ...
This article records the detailed tutorial for in...
For more information about operating elements, pl...
by Take the effect shown in the picture as an exa...
Toy Story 3 Online Marketing Website Zen Mobile I...
The main functions are as follows: Add product in...
Table of contents 1. Understanding Databases 1.1 ...
The effect is as follows: Example 1 Example 2: Ta...
1. Two ways to define react components 1. Functio...
Experimental environment • A minimally installed ...