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

1. 从Nginx官网下载二进制安装包

2.解压

tar zxvf nginx-1.10.1.tar.gz

3.编译并安装Nginx

./configure --with-http_stub_status_module --with-http_ssl_module --with-http_realip_module --with-http_gzip_static_module

Ubuntu 16.04 LTS 下不出意外的话会出现以下错误提示:

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

错误原因是没有Pcre支持,安装之:

sudo apt-get install libpcre3 libpcre3-dev

再次执行编译操作, 会出现以下错误:

./configure: error: SSL modules require the OpenSSL library.You can either do not enable the modules, or install the OpenSSL libraryinto the system, or build the OpenSSL library statically from the sourcewith nginx by using --with-openssl=<path> option.

这是因为我编译选项里为了支持https加入了ssl模块,需要安装ssl支持:

sudo apt-get install openssl libssl-dev

安装成功后再次执行编译,一系列检查过后会出现以下提示,表示通过:

Configuration summary+ using system PCRE library+ using system OpenSSL library+ md5: using OpenSSL library+ sha1: using OpenSSL library+ using system zlib librarynginx path prefix: "/usr/local/nginx"nginx binary file: "/usr/local/nginx/sbin/nginx"nginx modules path: "/usr/local/nginx/modules"nginx configuration prefix: "/usr/local/nginx/conf"nginx configuration file: "/usr/local/nginx/conf/nginx.conf"nginx pid file: "/usr/local/nginx/logs/nginx.pid"nginx error log file: "/usr/local/nginx/logs/error.log"nginx http access log file: "/usr/local/nginx/logs/access.log"nginx http client request body temporary files: "client_body_temp"nginx http proxy temporary files: "proxy_temp"nginx http fastcgi temporary files: "fastcgi_temp"nginx http uwsgi temporary files: "uwsgi_temp"nginx http scgi temporary files: "scgi_temp"
sudo makesudo make install

4.启动Nginx

Nginx默认安装路径是/usr/local/nginx, 启动Nginx:

sudo /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf

5.验证安装

浏览器输入:http://localhost/

出现上图所示界面表示启动成功。

转载于:https://my.oschina.net/u/923772/blog/704637

Ubuntu 16.04 LTS 下Nginx的编译安装与启动相关推荐

  1. Ubuntu 16.04 LTS下编译GPU版tensorflow

    Ubuntu 16.04 LTS下编译GPU版tensorflow 机器学习与数学 · 2016-06-10 13:51 作者: 比特小组 机器学习与数学出品 机器学习必然涉及到代码,本小组选择sci ...

  2. 在Ubuntu 16.04 LTS下编译安装OpenCV 4.1.1

    目录 一 安装前的准备 二 编译并安装OpenCV 4.1.1 注:原创不易,转载请务必注明原作者和出处,感谢支持! OpenCV目前(2019-8-1)的最新版本为4.1.1.本文将介绍如何在Ubu ...

  3. linux的lnmp环境,Ubuntu 16.04 LTS下LNMP环境配置简述

    Ubuntu 16.04 LTS下LNMP环境配置简述 1.安装mysql sudo aptinstall mysql-server 安装过程会提示密码 2.安装nginx和php #添加nginx和 ...

  4. 使用新的 apt 命令在 Ubuntu 16.04 LTS 下管理软件包

    前文 Ubuntu 16.04 新特性中 我们已经介绍过,随着 Ubuntu 16.04 LTS 的发布,Ubuntu 的软件包管理命令也发生了变化,新系统采用了 Debian 项目中所使用的 APT ...

  5. Ubuntu 16.04 LTS 下安装PyCharm

    PyCharm一个是Python集成开发环境,它既提供收费的专业版,也提供免费的社区版本.PyCharm带有一整套可以帮助用户在使用Python语言开发时提高其效率的工具,比如调试.语法高亮.Proj ...

  6. Ubuntu 16.04 LTS 64位下安装steam游戏平台

    此文章翻译来自外国的友人写的 原文链接:点我 这次安装比较有问题的就一点,steam平台下载的deb文件是32位的,而如果64位系统想安装的话,就会不断的提示libc6-i386 依赖关系出错.这是因 ...

  7. Linux微信运行错误,Ubuntu 16.04 运行微信开发者工具编译出错的解决办法

    最近有折腾小程序的意向,但微信的开发者工具只提供了 Windows 和 Mac 两个版本,对于我这样的 Linux 用户来说不是那么地友好. 经过观察发现,那个开发者工具实际上是基于nw.js开发的, ...

  8. Ubuntu 16.04系统下CUDA8.0配置Caffe教程

    由于最近安装了Ubuntu 16.04,本文教程的特点是不需要降级gcc的版本,毕竟cuda8.0已经支持gcc5以上(默认不支持,实际支持). 本文是在参考caffe官网教程以及http://www ...

  9. win10安装linux分配两个磁盘,Win10 与 Ubuntu 16.04 LTS 双硬盘双系统安装及环境配置...

    笔记本主系统是Win10(64bit),想硬盘安装子系统Ubuntu 16.04 LTS (64bit),于是在自己的笔记本电脑上尝试安装. 笔记本配置: 系统:Windows 10 64bit  p ...

  10. Ubuntu 14.04 LTS 下升级 gcc 到 gcc-4.9、gcc-5 版本

    转载: http://www.cnblogs.com/BlackStorm/p/5183490.html Ubuntu 14.04 LTS 下升级 gcc 到 gcc-4.9.gcc-5 版本 如果没 ...

最新文章

  1. C++ 虚函数表解析
  2. MySQL数据库备份及二进制文件恢复
  3. 链表之判断一个链表是否为回文结构(一)
  4. java内存漏洞_处理Java程序中的内存漏洞
  5. 设置元素浮动的几种方式
  6. 虚拟主机金华php空间,金华虚拟主机_金华云虚机_金华主机申请_金华网站空间_爱名网(www.22.cn)...
  7. 如何安装SQL server2005的查询分析器(绝对原创)
  8. 计算机视觉 图像算法工程师 面试问题总结
  9. Zemax OpticsViewer
  10. Linux CentOS 6不能使用yum安装命令
  11. 局域网内查询嵌入式设备IP的几种方式
  12. JavaScript基础入门10
  13. 第九章:深度学习平台及框架
  14. 封装实现电子宠物系统的企鹅类正确输入健康值和亲密度
  15. 实验六 连续信号的频域分析
  16. 一年2k+ star -- GitHub生存之道
  17. 【Ansys Fluent】All cell zones in Fluent may be automatically set to Fluid.
  18. 爬楼梯-ClimbingStairs
  19. 基于OTSU(大津法)的图像分块的阈值分割
  20. 为什么知乎上很多人都反对创业?

热门文章

  1. Atitit. 构造ast 语法树的总结attilax oao
  2. paip.java UrlRewrite 的原理and实现 htaccess正则表达式转换
  3. paip.php调试imcompatible debug sever version..with zend debugger
  4. 软件逆向分析方法小结
  5. (转)【特征工程】特征工程技术与方法
  6. 阿里巴巴集团 CTO 约你聊聊这些事
  7. 阿里云 cGPU 容器技术白皮书
  8. 新型肺炎数据,可以用Excel绘制成3维地图
  9. 【路径规划】基于matlab蚁群算法求解机器人栅格地图最短路径规划问题【含Matlab源码 1618期】
  10. 【滤波器】基于matlab平方根升余弦滤波器【含Matlab源码 994期】