nginx离线安装安装

1 --先安装PCRE作用是让Nginx支持重写功能。

下载PCRE安装包,下载地址:

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

tar -zxvf pcre-8.38.tar.gz cd pcre-8.38 ./configure --prefix=/app/pcressl/pcre-8.38 #make && make install

报错:configure: error: You need a C++ compiler for C++ support

需要安装: yum install -y gcc gcc-c++

2 --安装 openssl openssl-1.0.2n.tar 强大的安全套接字层密码库

tar -xvf openssl-1.0.2n.tar cd openssl-1.0.2n ./config --prefix=/app/pcressl/openssl-1.0.2n # make && make install

3.--安装zlib 为的是解包gzip http://www.zlib.net/

tar -xvf zlib-1.2.11.tar cd zlib-1.2.11 ./configure --prefix=/app/pcressl/zlib-1.2.11 # make && make install

 

4 --安装阿里云 nginx

下载地址:

http://tengine.taobao.org/document_cn/install_cn.html

tar -zxvf tengine-2.2.3.tar.gz cd tengine-2.2.3

全部复制:

./configure --prefix=/wt/nginx --with-http_stub_status_module --with-http_ssl_module --with-openssl=/wt/tools/openssl-1.0.2n --with-pcre=/wt/tools/pcre-8.38 --with-zlib=/wt/tools/zlib-1.2.11

注意!!! 后面的路径说的是源码路径不是安装的路径,打错会报目录不存在 错误2

make make install

报错 nginx: [emerg] bind() to 0.0.0.0:80 failed (13: Permission denied)

更改端口,小端口没有权限访问。。

热安装:

./configure  --prefix=/app/nginx  --with-http_stub_status_module --with-http_ssl_module --with-openssl=/app/tools/openssl-1.0.2n --with-pcre=/app/tools/pcre-8.42

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值