nginx安装教程

本文档介绍了如何下载、解压、编译及安装Nginx 1.17.3版本。在编译过程中可能会遇到PCRE库缺失的问题,解决方法是下载并安装pcre库。通过./configure、make和make install步骤完成安装,并提供了检查安装成功的命令。
摘要由CSDN通过智能技术生成

1、下载安装包:

wget https://nginx.org/download/nginx-1.17.3.tar.gz

2、解压:

tar xvfz nginx-1.17.3.tar.gz
cd  nginx-1.17.3

3、编译:

./configure --prefix=/usr/local/nginx
make
make install
如果编译失败:./configure: error: the HTTP rewrite module requires the PCRE library.You can either disable the module by using--without-http_rewrite_moduleoption, orinstallthe PCRElibraryintothesystem,orbuildthe PCRElibrarystaticallyfromthesourcewithnginxbyusing--with-pcre=<path> option.
①、需要安装pcre包:https://ftp.pcre.org/pub/pcre/
②、tar zxvf pcre-8.12.tar.gz
③、cd pcre-8.12
④、./configure
⑤、make
⑥、make install

4、查看是否安装成功:

/usr/local/nginx/sbin/nginx -t

在这里插入图片描述

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值