Nginx(从源代码构建)在 Ubuntu 14.04 x64 上?

     2023-03-10     61

关键词:

【中文标题】Nginx(从源代码构建)在 Ubuntu 14.04 x64 上?【英文标题】:Nginx (Build From Source) On Ubuntu 14.04 x64? 【发布时间】:2014-10-09 14:06:10 【问题描述】:

我是从源代码设置 NGINX 的新手,我尝试的每个 .sh 配置都有某种类型的错误 - 我已经这样做了好几天了! - 大声笑

我需要至少设置 pageSpeed、OppenSSL、SPDY 和 Naxsi 模块,以在网站上驱动等量的静态和动态 php 文件。

以下是我整理的最新尝试,但我得到“.configure command not found”:P

如果有人可以通过它(我也不确定依赖项),看看我有什么问题?任何建议也将不胜感激。谢谢!

# Since I am not going to be using a distribution to install Nginx,
# I need to ensure all the necessary dependencies are installed for it
# as well as for PageSpeed and SPDY:
sudo apt-get install build-essential zlib1g-dev libpcre3 libpcre3-dev libbz2-dev libssl-dev tar unzip openssl

# create a directory root directory called src to download all the filles to,
# including Nginx:
sudo mkdir src
cd src

# NGINX
wget http://nginx.org/download/nginx-1.7.4.tar.gz
tar -xvzf nginx-1.7.4.tar.gz

# Google PageSpeed:
wget https://github.com/pagespeed/ngx_pagespeed/archive/release-1.8.31.4-beta.zip
unzip release-1.8.31.4-beta.zip
cd ngx_pagespeed-release-1.8.31.4-beta/
wget https://dl.google.com/dl/page-speed/psol/1.8.31.4.tar.gz
sudo tar -xzvf 1.8.31.4.tar.gz

# Switch back to src directory
cd
cd src

# HTTP Substitutions Module:
wget https://github.com/arut/nginx-dav-ext-module/archive/master.zip
unzip master.zip

# Now let’s grab the Headers More Mod:
wget https://github.com/agentzh/headers-more-nginx-module/archive/v0.25.tar.gz
tar -xvzf v0.25.tar.gz

# and the naxsi module:
wget https://github.com/nbs-system/naxsi/archive/0.53-2.tar.gz
tar -xvzf 0.53-2.tar.gz

# cd to the uncompresses Nginx directory
cd
cd nginx-1.7.4


# Run a .configure command:
.configure \
--add-module=/src/naxsi-0.53-2 \
--prefix=/usr/share/nginx \
--conf-path=/etc/nginx/nginx.conf \
--error-log-path=/var/log/nginx/error.log \
--user=www-data \
--group=www-data \
--http-client-body-temp-path=/var/lib/nginx/body \
--http-fastcgi-temp-path=/var/lib/nginx/fastcgi \
--http-log-path=/var/log/nginx/access.log \
--http-proxy-temp-path=/var/lib/nginx/proxy \
--http-scgi-temp-path=/var/lib/nginx/scgi \
--http-uwsgi-temp-path=/var/lib/nginx/uwsgi \
--lock-path=/var/lock/nginx.lock \
--pid-path=/run/nginx.pid \
--with-pcre-jit \
--with-debug \
--with-http_addition_module \
--with-http_dav_module \
--with-http_geoip_module \
--with-http_gzip_static_module \
--with-http_image_filter_module \
--with-http_realip_module \
--with-http_stub_status_module \
--with-http_ssl_module \
--with-http_sub_module \
--with-http_xslt_module \
--with-ipv6 \
--with-http_spdy_module \
--add-module=/src/nginx-dav-ext-module-master \
--add-module=/src/ngx_http_substitutions_filter_module \
--add-module=/src/ngx_pagespeed-release-1.8.31.4-beta \
--add-module=/src/headers-more-nginx-module-0.25

# Now create the Makefile:
make

【问题讨论】:

【参考方案1】:

你确定这不是错字吗?它应该是 ./configure(不是 .configure)。

【讨论】:

Thnx - 我真的抓住了那个 b4 来这里寻找答案。

sh从源代码为ubuntu14.04安装最新的nginx(代码片段)

查看详情

在 Windows 上从源代码构建 nginx

】在Windows上从源代码构建nginx【英文标题】:BuildingnginxFromSourceonWindows【发布时间】:2015-12-2706:01:10【问题描述】:我正在尝试。我完成了以下工作:1)安装了mingw、gcc和msys2)下载了nginx源码3)在nginx源文件夹中的msys控制台中运行... 查看详情

Jenkins 服务在节点 js 构建期间完全停止,在 Ubuntu 上使用 nginx 设置获得 502 错误网关

】Jenkins服务在节点js构建期间完全停止,在Ubuntu上使用nginx设置获得502错误网关【英文标题】:Jenkinsservicestopscompletelyduringanodejsbuild,gettinga502badgatewaywithannginxsetuponUbuntu【发布时间】:2016-03-0911:12:14【问题描述】:我已经在UbuntuVPS... 查看详情

markdown如何在ubuntu14.04+上使用uwsgi和nginx为flask应用程序提供服务(代码片段)

查看详情

在 Ubuntu 14.04 上从源代码编译时如何链接到 opencv 3.0?

】在Ubuntu14.04上从源代码编译时如何链接到opencv3.0?【英文标题】:Howtolinktoopencv3.0whencompiledfromsourceonUbuntu14.04?【发布时间】:2014-12-0720:48:35【问题描述】:我正在尝试编译和链接我在网上找到的以下opencv程序:main.cpp:#include<op... 查看详情

sh在一个命令中使用自定义补丁,配置和名称后缀为nginx构建ubuntu或debian软件包(代码片段)

查看详情

我是不是必须在 Ubuntu 18.04 上从源代码构建 clang-11 才能卸载 OpenMP GPU 目标?

】我是不是必须在Ubuntu18.04上从源代码构建clang-11才能卸载OpenMPGPU目标?【英文标题】:DoIhavetobuildclang-11fromsourceonUbuntu18.04tohaveOpenMPGPUtargetoffload?我是否必须在Ubuntu18.04上从源代码构建clang-11才能卸载OpenMPGPU目标?【发布时间】:20... 查看详情

我是不是必须在 Ubuntu 18.04 上从源代码构建 gcc-10 才能卸载 OpenMP GPU 目标?

】我是不是必须在Ubuntu18.04上从源代码构建gcc-10才能卸载OpenMPGPU目标?【英文标题】:DoIhavetobuildgcc-10fromsourceonUbuntu18.04tohaveOpenMPGPUtargetoffload?我是否必须在Ubuntu18.04上从源代码构建gcc-10才能卸载OpenMPGPU目标?【发布时间】:2021-02-... 查看详情

sh使用附加模块从源代码构建nginx(代码片段)

查看详情

MariaDB + phpmyadmin 在 ubuntu 14.04 上使用 Nginx

】MariaDB+phpmyadmin在ubuntu14.04上使用Nginx【英文标题】:MariaDB+phpmyadminwithNgnixonubuntu14.04【发布时间】:2016-09-2920:32:54【问题描述】:我正在尝试安装phpmyadmin+mariadb。我的PHP配置字符串具有以下mysql标志CONFIGURE_STRING="--prefix=/etc/php7--ena... 查看详情

来自 Ubuntu 14.04 的 NGINX 1.4.7 与最新版本 NGINX 1.8.0

】来自Ubuntu14.04的NGINX1.4.7与最新版本NGINX1.8.0【英文标题】:NGINX1.4.7fromUbuntu14.04vslatestversionNGINX1.8.0【发布时间】:2015-07-1202:15:51【问题描述】:我注意到ubuntu14.04中的标准NGINX版本与NGINXwebsite上的(!stable)版本(目前是1.8.0)相比确... 查看详情

如何从源代码构建 Debian/Ubuntu 软件包?

】如何从源代码构建Debian/Ubuntu软件包?【英文标题】:HowtobuildaDebian/Ubuntupackagefromsource?【发布时间】:2010-09-1222:52:47【问题描述】:我有一个程序的源代码(取自cvs/svn/git/...),我想为它构建一个Debian/Ubuntu软件包。该软件包存... 查看详情

如何在 ubuntu 14.04 上使用 nginx 和 gunicorn 部署 django 1.8 应用程序

】如何在ubuntu14.04上使用nginx和gunicorn部署django1.8应用程序【英文标题】:howtodeploydjango1.8applicationwithnginxandgunicornonubuntu14.04【发布时间】:2016-08-0612:27:10【问题描述】:您好,我正在开发我的第一个Web应用程序,我也使用过django... 查看详情

nginx源码安装配置详解(./configure),最全解析(代码片段)

..."表示启用模块,也就是说这些模块在编译时不会自动构建"--without"表示禁用模块,也就是说这些模块在编译时会自动构建,若你想Nginx轻量级运行,可以去除一些不必要的模块。[[email protected]nginx-1.14.0]#. 查看详情

如何从源代码正确构建包

】如何从源代码正确构建包【英文标题】:Howtoproperlybuildpackagefromsources【发布时间】:2018-05-1509:59:35【问题描述】:我正在使用ubuntu18.04。我想修改和构建一个项目并将其安装为一个包。例如gstreamer1.5。所以我克隆repo,修改代码... 查看详情

在 Ubuntu 14.04 中使用 SOIL

】在Ubuntu14.04中使用SOIL【英文标题】:UsingSOILinUbuntu14.04【发布时间】:2016-05-1615:45:34【问题描述】:我时遇到了一些实际问题。我已经设法让SOIL在Windows环境中工作,并将代码从Windows移植到ubuntu。我确信我已经设法让SOIL安装在... 查看详情

如何在 Ubuntu 14.04 上卸载从 jenkins.war 安装的 Jenkins

】如何在Ubuntu14.04上卸载从jenkins.war安装的Jenkins【英文标题】:HowtouninstallJenkinsinstalledfromjenkins.waronUbuntu14.04【发布时间】:2017-11-1810:54:37【问题描述】:我已经在Ubuntu14.04操作系统上下载并安装了Jenkins。Jenkins当前作为服务运行... 查看详情

如何在 ubuntu 14.04 中从本地主机发送邮件

】如何在ubuntu14.04中从本地主机发送邮件【英文标题】:Howtosendmailfromlocalhostinubuntu14.04【发布时间】:2016-07-2910:57:11【问题描述】:您好,我已经尝试过这些命令,但我无法发送邮件,请帮帮我..1)安装sendmailSendmail可能已经安装... 查看详情