linux nginx 布置方案

一、安装前的准备

1 安装编译工具(nginx安装之前需要编译)

yum install -y gcc gcc-c++

2安装PCRE

#2.1下载

wget http://downloads.sourceforge.net/project/pcre/pcre/8.35/pcre-8.35.tar.gz

#2.2 解压

tar -zxvf pcre-8.35.tar.gz

#2.3进入目录

cd pre-8.35

#2.4配置

./configure

#2.5 安装配置

make && make install

3安装SSL库


cd /opt/software
wget http://www.openssl.org/source/openssl-1.0.1j.tar.gz
tar -zxvf openssl-1.0.1j.tar.gz

# 4.配置
./configure

# 5.编译安装
make && make install

4安装zlib库

wget http://zlib.net/zlib-1.2.11.tar.gz
tar -zxvf zlib-1.2.11.tar.gz  -C ../module/
cd zlib-1.2.11/
./configure
make && make install

5下载Nginx

get https://nginx.org/download/nginx-1.16.1.tar.gz
cd nginx-1.16.1/

 ./configure --prefix=nginx-1.16.1/ --with-http_stub_status_module --with-http_ssl_module --with-pcre=../pcre-8.35/
 make && make install

6.启动nginx:

cd /opt/software/nginx-1.16.1/nginx-1.16.1/sbin
./nginx

二、配置

你可能感兴趣的:(运维管理,Java模块,前端APP开发,linux,nginx,运维)