linux下编译安装nginx,Linux(CentOS6.5)下编译安装Nginx官方最新稳定版(nginx-1.10.1)

一、下载组件

1.pcre​

,官网(http://www.pcre.org/)

下载地址:

http://120.52.73.43/jaist.dl.sourceforge.net/project/pcre/pcre/8.38/pcre-8.38.tar.gz​

2.openssl​

,官网(https://www.openssl.org/source/)

下载地址:

https://www.openssl.org/source/openssl-1.0.2h.tar.gz​

3.zlib ,官网(http://zlib.net/)

下载地址:

http://zlib.net/zlib-1.2.8.tar.gz​

4.nginx ,官网(http://nginx.org/)

下载地址:

http://nginx.org/download/nginx-1.10.1.tar.gz​

二、解压相关组件

tar -zxvf zlib-1.2.8.tar.gz

tar -zxvf pcre-8.38.tar.gz​

tar -zxvf openssl-1.0.2h.tar.gz

三、进行安装nginx

1. cd ​/home/zzht/soft/nginx-1.10.1

2. ./configure --prefix=/usr/local/nginx

--pid-path=/usr/local/nginx/nginx.pid

--error-log-path=/usr/local/nginx/error.log

--http-log-path=/usr/local/nginx/access.log --with-http_ssl_module

--with-pcre=/home/zzht/soft/pcre-8.38

--with-zlib=/home/zzht/soft/zlib-1.2.8

--with-openssl=/home/zzht/soft/openssl-1.0.2h​

​3.make

4.make install

​5.cp /usr/local/nginx/sbin/nginx

/usr/sbin

6.查看nginx是否安装成功:nginx -V

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值