当前位置: 首页 > news >正文

编译安装nginx

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

在Ubuntu下编译安装nginx,首先去下载nginx的安装包。

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

下载对应的压缩包后,解压。执行命令编译安装

tar -zxvf ./nginx-1.10.1.tar.gz
cd nginx-1.10

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

#这时候出现了第一个问题

./configure: error: the HTTP rewrite module requires the PCRE library.
You can either disable the module by using --without-http_rewrite_module
option, or install the PCRE library into the system, or build the PCRE library
statically from the source with nginx by using --with-pcre=<path> option.

此时需要安装pcre这个插件,本企图手动编译这个插件,无奈多次都失败,有大神知道的话,还请评论解答。

使用ubuntu的依赖安装

sudo apt-get install libpcre3 libpcre3-dev 

#这时出现了第二个问题

./configure: error: the HTTP gzip module requires the zlib library.
You can either disable the module by using --without-http_gzip_module
option, or install the zlib library into the system, or build the zlib library
statically from the source with nginx by using --with-zlib=<path> option.

此时需要安装zlib插件,手动编译失败后,转向ubuntu的依赖安装

 sudo apt-get install zlib1g-dev

#接下来就是编译安装

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

make

make install

 

转载于:https://my.oschina.net/jasonwung/blog/731450

相关文章:

  • Vue 跨组件传参 (1.事件总线eventBus,2.vuex)实现购物车
  • 阿里云机器学习8月特别推荐
  • [工具]json转类
  • 数据请求一个数组,向数组里push新增内容
  • iOS - MVP 架构模式
  • <component :is=“动态组件“></component>
  • 大数据解决方案如何满足零售行业进销存数据的实时性存储与更新
  • react项目中实现打印预览功能
  • easyUI loyout tabs自适应宽度
  • react封装一个打印功能
  • 在linux环境下编译C++ 程序
  • react项目中,在tab列表上展示某个字段以 数组形式 展示
  • Spark Streaming官方文档学习--下
  • Vue 判断两个时间选择框的校验element 。开始时间不能大于结束时间
  • 为什么不能访问django自带的索引页
  • [数据结构]链表的实现在PHP中
  • 《深入 React 技术栈》
  • iOS帅气加载动画、通知视图、红包助手、引导页、导航栏、朋友圈、小游戏等效果源码...
  • js继承的实现方法
  • Node.js 新计划:使用 V8 snapshot 将启动速度提升 8 倍
  • php的插入排序,通过双层for循环
  • php中curl和soap方式请求服务超时问题
  • React Native移动开发实战-3-实现页面间的数据传递
  • spark本地环境的搭建到运行第一个spark程序
  • Vue ES6 Jade Scss Webpack Gulp
  • 安卓应用性能调试和优化经验分享
  • 初探 Vue 生命周期和钩子函数
  • 二维平面内的碰撞检测【一】
  • 实习面试笔记
  • 微信小程序实战练习(仿五洲到家微信版)
  • 新海诚画集[秒速5センチメートル:樱花抄·春]
  • ​configparser --- 配置文件解析器​
  • #pragma once
  • $.ajax()
  • (html5)在移动端input输入搜索项后 输入法下面为什么不想百度那样出现前往? 而我的出现的是换行...
  • (NO.00004)iOS实现打砖块游戏(九):游戏中小球与反弹棒的碰撞
  • (python)数据结构---字典
  • (Redis使用系列) SpirngBoot中关于Redis的值的各种方式的存储与取出 三
  • (层次遍历)104. 二叉树的最大深度
  • (附源码)springboot 基于HTML5的个人网页的网站设计与实现 毕业设计 031623
  • (黑客游戏)HackTheGame1.21 过关攻略
  • (转载)虚函数剖析
  • .gitignore文件_Git:.gitignore
  • .htaccess配置常用技巧
  • .NET 8 编写 LiteDB vs SQLite 数据库 CRUD 接口性能测试(准备篇)
  • .NET Core 版本不支持的问题
  • .NET Framework 4.6.2改进了WPF和安全性
  • .Net 路由处理厉害了
  • .net 无限分类
  • .NET 中创建支持集合初始化器的类型
  • .net通用权限框架B/S (三)--MODEL层(2)
  • /deep/和 >>>以及 ::v-deep 三者的区别
  • @Autowired自动装配
  • @WebServiceClient注解,wsdlLocation 可配置
  • [ vulhub漏洞复现篇 ] AppWeb认证绕过漏洞(CVE-2018-8715)