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
MySQL's index types include normal index, uni...
The layout of text has some formatting requiremen...
Preface Sometimes you come across business tables...
Table of contents nonsense Functions implemented ...
1. DNS server concept Communication on the Intern...
Table of contents 1. Relationship between parent ...
Table of contents Experimental environment Instal...
I used the label tag when I was doing something re...
Simple use of Vue bus Scenario description: Compo...
When inserting a set of data into the MySQL datab...
public function json_product_list($where, $order)...
Table of contents Semaphore Nginx hot deployment ...
Currently, almost all large websites and applicat...
Table of contents Preface 1. Get the current time...
1. Set up Chinese input method 2. Set the double ...