【01】Nginx的编译安装

Nginx编译安装

安装前的准备

yum install -y vim lrzsz tree screen psmisc lsof tcpdump wget ntpdate gcc gcc-c++ glibc glibc-devel pcre pcre-devel openssl openssl-devel systemd-devel net-tools iotop bc zip unzip zlib-devel bash-completion nfs-utils automake libxml2 libxml2-devel libxslt libxslt-devel perl perl-ExtUtils-Embed

1.1 安装Nginx

官方源码包下载地址:

https://nginx.org/en/download.html

nginx-1.16.1地址:https://nginx.org/download/nginx-1.16.1.tar.gz

[root@localhost@~]->cd /usr/local/src/
[root@localhost@src]->wget https://nginx.org/download/nginx-1.16.1.tar.gz
[root@localhost@src]->tar xvf nginx-1.16.1.tar.gz 
[root@localhost@src]->cd nginx-1.16.1

1.2 编译

[root@localhost@nginx-1.16.1]->./configure --prefix=/apps/nginx \ # 选择安装目录
> --user=nginx \ # 选择属主
> --group=nginx \ # 选择属组
> --with-http_ssl_module \ # 选择安装的模组
> --with-http_v2_module \
> --with-http_realip_module \ # 开启转发后,往后端服务器转发用户真实地址
> --with-http_stub_status_module \ # 开启状态页
> --with-http_gzip_static_module \
> --with-pcre \ # 开启正则表达式
> --with-stream \ # TC
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值