Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Centos7.3 methods and steps for installing and deploying Nginx and configuring https

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Installation environment

1. Gcc installation

To install nginx, you need to compile the source code downloaded from the official website.

Compilation depends on the gcc environment:

Yum install gcc-c++

2. PCRE pcre-devel installation

Installing pcre-devel is a secondary development library developed using pcre. :

Yum install-y pcre pcre-devel

3. Zlib installation

The zlib library provides many ways to compress and decompress, and nginx can use zlib to gzip the contents of the http package:

Yum install-y zlib zlib-devel

4. OpenSSL installation

A powerful secure socket layer password library, with main cryptographic algorithms, commonly used key and certificate encapsulation management functions and SSL protocol. Nginx is required to support https (http over ssl protocol)

Yum install-y openssl openssl-devel

Install Nginx

Download using the wget command

Wget-c https://nginx.org/download/nginx-1.9.9.tar.gz

Decompression

Tar-zxvf nginx-1.9.9.tar.gzcd nginx-1.9.9/

Configuration

General configuration

#. / configure

Configure https:

. / configure-- with-http_ssl_module

Installation

Makemake install

Find the installation path:

Whereis nginx

Start and stop nginx

Cd / usr/local/nginx/sbin/./nginx./nginx-s stop./nginx-s quit./nginx-s reload

Note:

. / nginx-t: check whether the nginx.conf configuration file is correct

. / nginx-s quit: in this way, the stop step is to stop after the nginx process has finished processing the task.

. / nginx-s stop: this method is equivalent to finding out the nginx process id and then using the kill command to force the killing of the process.

To configure ssl, please check which server you use to apply for a ssl certificate while applying for a domain name, and then configure it directly in the server load balancer.

The above is the whole content of this article, I hope it will be helpful to your study, and I also hope that you will support it.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report