CentOS 安装配置 Nginx
# CentOS 安装配置 Nginx
# 一、Nginx简介
http://nginx.org/
# 二、Nginx安装
http://nginx.org/en/download.html
# 1、下载Nginx(Stable version)
wget http://nginx.org/download/nginx-1.16.1.tar.gz
1
# 2、安装Nginx基础依赖环境
# Nginx依赖环境:gcc, PCRE, zlib, OpenSSL
yum install -y gcc-c++
yum install -y pcre pcre-devel
yum install -y zlib zlib-devel
yum install -y openssl openssl-devel
1
2
3
4
5
6
2
3
4
5
6
# 3、解压安装包
tar -zxvf nginx-1.16.1.tar.gz
cd nginx-1.16.1
1
2
2
# 4、编译安装
# A.一般安装
./configure
# B.启用SSL功能
# 需要在安装时开启SSL模块,否则会报错如下:nginx: [emerg] the "ssl" parameter requires ngx_http_ssl_module in /usr/local/nginx/conf/nginx.conf:37
./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module
make && make install
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
# 5、Nginx常用模块
http://nginx.org/en/docs/
- http_v2_module,http2模块
- http_ssl_module,SSL模块
- http_stub_status_module,stub status模块
# 三、Nginx配置
参考资料
- Nginx官网,Nginx
- 开始Nginx的SSL模块,博客园
上次更新: 2020/06/11, 15:06:00
- 01
- Activiti使用手册(4)- Bpmn2规范06-11
- 02
- linux手动RPM安装gcc,g++06-11