Nginx installation(Centos7)

V Records 1,597 Views No comment

1.Install gcc

Nginx source code compilation depends on the gcc environment

2.Install PCRE pcre-devel

PCRE (Perl Compatible Regular Expressions) is a Perl library that includes a perl-compatible regular expression library. Nginx’s http module uses pcre to parse regular expressions, so you need to install the pcre library on Centos ,Pcre-devel is a secondary development library developed with pcre which is also required by nginx.

3.Install zlib

The zlib library provides a variety of ways to compress and decompress. nginx uses zlib to gzip the contents of the http package, so you need to install the zlib library on Centos.

4.Install OpenSSL

OpenSSL is a powerful Secure Sockets Layer cryptographic library that includes major cryptographic algorithms, common key and certificate encapsulation management functions, and SSL protocols, and provides a rich set of applications for testing or other purposes. Nginx not only supports the http protocol, but also supports https (that is, transmits http on the ssl protocol), so you need to install the OpenSSL library in Centos.

5.Nginx download and install

Download Nginx from official website

https://nginx.org/en/download.html

download the Stable version .tar.gz installation package

Start and stop nginx

The nginx process

Start Nginx automatically when booting

Add one line

and set execution permissions

At this point, centos nginx installation is complete.


This article was first published by V on 2018-10-10 and can be reprinted with permission, but please be sure to indicate the original link address of the article :http://www.nginxer.com/records/nginx-installationcentos7/

Leave a Reply

Your email address will not be published. Required fields are marked *

Go