Nginx学习(1)——Nginx 源码安装

一、源码地址

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

二、安装步骤

1.解压安装包

tar xzvf nginx-1.14.2.tar.gz

2../configure 配置

./configure --prefix=/home/lxs/global_co/nginx --sbin-path=/home/lxs/global_co/nginx --conf-path=/home/lxs/global_co/nginx/conf/nginx.conf --error-log-path=/home/lxs/global_co/nginx/log/error.log --http-log-path=/home/lxs/global_co/nginx/log/access.log --pid-path=/home/lxs/global_co/nginx/pid/nginx.pid --lock-path=/home/lxs/global_co/nginx/lock/nginx.lock --user=root --group=root --with-mail --with-mail_ssl_module --with-http_ssl_module --with-http_stub_status_module --with-http_gzip_static_module --with-http_ssl_module --http-client-body-temp-path=/var/tmp/nginx/client/ --http-proxy-temp-path=/var/tmp/nginx/proxy/ --http-fastcgi-temp-path=/var/tmp/nginx/fcgi/ --http-uwsgi-temp-path=/var/tmp/nginx/uwsgi --http-scgi-temp-path=/var/tmp/ngin

./configure参数详解

–prefix= 指向安装目录
–sbin-path 指向(执行)程序文件(nginx)
–conf-path= 指向配置文件(nginx.conf)
–error-log-path= 指向错误日志目录
–pid-path= 指向pid文件(nginx.pid)
–lock-path= 指向lock文件(nginx.lock)(安装文件锁定,防止安装文件被别人利用,或自己误操作。)
–user= 指定程序运行时的非特权用户
–group= 指定程序运行时的非特权用户组
–builddir= 指向编译目录
–with-rtsig_module 启用rtsig模块支持(实时信号)
–with-select_module 启用select模块支持(一种轮询模式,不推荐在高载环境下使用)禁用:–without-select_module
–with-poll_module 启用poll模块支持(功能与select相同,与select特性相同,为一种轮询模式,不推荐在高载环境下使用)
–with-file-aio 启用file aio支持(一种APL文件
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值