Ubuntu下编译nginx

下载ubuntu.iso文件
通过虚拟机安装,时间有点长。
登录的时候使用自己设定的用户密码
登录以后通过sudo passwd root修改root密码
重启后使用root登录系统
执行

apt - get  update

 

进行系统更新(可先在/etc/apt/source.list修改更新源,针对不同版本系统更新源地址不同)
下载(wget)
nginx
openssl-1.0.0c.tar.gz
pcre-8.01.tar.gz
zlib-1.2.5.tar.tar
解压(tar)
nginx
openssl-1.0.0c.tar.gz
pcre-8.01.tar.gz
zlib-1.2.5.tar.tar
编译并安装没个程序
./configure
make
make install
中途可能需要先安装g++(apt-get install g++)

下面编译安装NGINX

. / configure  -- with - pcre = .. / pcre  -- with - zlib = .. / zlib  -- with - http_ssl_module  -- with - openssl = .. / openssl  -- with - http_sub_module  -- with - http_gzip_static_module  -- with - http_stub_status_module  -- with - http_flv_module  -- with - debug

 

make

make install

安装好后,通过nginx -V查看版本和模块是否正确(V是大写哈)


 

 

 

 

 

 

转载于:https://www.cnblogs.com/xewnwsl2001/archive/2010/12/14/1905707.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值