ngnix安装

ngnix安装 

1.下载ngnix 
Java代码  复制代码  收藏代码
  1. wget http://nginx.org/download/nginx-1.0.13.tar.gz  
[java]  view plain copy
  1. <span style="font-size:12px;">wget http://nginx.org/download/nginx-1.0.13.tar.gz</span>  


2.安装ngnix所依赖的环境 
Java代码  复制代码  收藏代码
  1. yum install gcc   
  2. yum install gcc-c++   
  3. yum install openssl-devel   
  4. yum install pcre-devel  
[java]  view plain copy
  1. <span style="font-size:12px;">yum install gcc  
  2. yum install gcc-c++  
  3. yum install openssl-devel  
  4. yum install pcre-devel</span>  


3.解压ngnix,并且做相关调整 
关闭debug模式,在ngnix源码目录中找到/ngnix/auto/cc,编辑gcc文件,删除 # debug CFLAGS="$CFLAGS -g" 
修改herder信息,到/ngnix/src/core,编辑ngnix.h文件,修改服务器信息就ok了。、 

4.安装ngnix 
Java代码  复制代码  收藏代码
  1. ./configure --prefix=/opt/nginx --with-mail --with-mail_ssl_module --without-http-cache --without-http_fastcgi_module --without-http_uwsgi_module --without-http_scgi_module  --with-http_stub_status_module --without-http_memcached_module --with-http_gzip_static_module  --with-http_ssl_module  --with-cc-opt=-O4   
  2. make && make install  
[java]  view plain copy
  1. <span style="font-size:12px;">./configure --prefix=/opt/nginx --with-mail --with-mail_ssl_module --without-http-cache --without-http_fastcgi_module --without-http_uwsgi_module --without-http_scgi_module  --with-http_stub_status_module --without-http_memcached_module --with-http_gzip_static_module  --with-http_ssl_module  --with-cc-opt=-O4  
  2. make && make install</span>  


在实际环境中,我多安装了两个模块,etag模块和upstream_jvm_route模块。
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值