跟上回差不多,去掉了GeoIP模块,除了做外贸网站,一般用不到。

集成的第三方模块

google perf tool

naxsi

upstream url hash

cache purge

详见附件,去掉.zip后缀名即可

另外,还有一个编译包,添加了最新的google的ngx_pagespeed模块,那家伙比较大,这里只提供spec文件

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
#
%define nginx_home %{_localstatedir} /cache/nginx
%define nginx_user nginx
%define nginx_group nginx
Summary: nginx is a high performance web server
Name: nginx
Version: 1.4.4
Release: 2%{?dist}.pagespeed
Vendor: nginx inc.
URL: http: //nginx .org/
Source0: http: //nginx .org /download/ %{name}-%{version}. tar .gz
Source1: logrotate
Source2: nginx.init
Source3: nginx.sysconf
Source4: nginx.conf
Source5: nginx.vh.default.conf
Source6: nginx.vh.example_ssl.conf
Source7: nginx.suse.init
Source8: fastcgi_params
Source50: ngx_pagespeed-1.7.30.1-beta. tar .gz
Source51: pagespeed.conf
License: 2-clause BSD-like license
% if  0%{?suse_version}
Group: Productivity /Networking/Web/Servers
% else
Group: System Environment /Daemons
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: zlib-devel
BuildRequires: pcre-devel
BuildRequires: perl
BuildRequires: gperftools-devel
BuildRequires: gcc-c++
% if  0%{?suse_version}
BuildRequires: libopenssl-devel
Requires(pre): pwdutils
% else
BuildRequires: openssl-devel
Requires: initscripts >= 8.36
Requires(pre): shadow-utils
Requires(post): chkconfig
%endif
Provides: webserver
%description
nginx [engine x] is an HTTP and reverse proxy server, as well as
a mail proxy server
%package debug
Summary: debug version of nginx
Group: System Environment /Daemons
Requires: nginx
%description debug
not stripped version of nginx build with the debugging log support
%prep
%setup -q
%{__tar} zxvf %{SOURCE50}
%build
. /configure  \
         --prefix=%{_sysconfdir} /nginx  \
         --sbin-path=%{_sbindir} /nginx  \
         --conf-path=%{_sysconfdir} /nginx/nginx .conf \
         --error-log-path=%{_localstatedir} /log/nginx/error .log \
         --http-log-path=%{_localstatedir} /log/nginx/access .log \
         --pid-path=%{_localstatedir} /run/nginx .pid \
         --lock-path=%{_localstatedir} /run/nginx .lock \
         --http-client-body-temp-path=%{_localstatedir} /cache/nginx/client_temp  \
         --http-proxy-temp-path=%{_localstatedir} /cache/nginx/proxy_temp  \
         --http-fastcgi-temp-path=%{_localstatedir} /cache/nginx/fastcgi_temp  \
         --http-uwsgi-temp-path=%{_localstatedir} /cache/nginx/uwsgi_temp  \
         --http-scgi-temp-path=%{_localstatedir} /cache/nginx/scgi_temp  \
         --user=%{nginx_user} \
         --group=%{nginx_group} \
         --with-http_ssl_module \
         --with-http_realip_module \
         --with-http_gzip_static_module \
         --with-http_stub_status_module \
     --with-google_perftools_module \
     --add-module=ngx_pagespeed-1.7.30.1-beta  \
         --with- file -aio \
         --with-debug \
         --with-cc-opt= "%{optflags} $(pcre-config --cflags)"  \
         $*
make  %{?_smp_mflags}
%{__mv} %{_builddir}/%{name}-%{version} /objs/nginx  \
         %{_builddir}/%{name}-%{version} /objs/nginx .debug
. /configure  \
         --prefix=%{_sysconfdir} /nginx  \
         --sbin-path=%{_sbindir} /nginx  \
         --conf-path=%{_sysconfdir} /nginx/nginx .conf \
         --error-log-path=%{_localstatedir} /log/nginx/error .log \
         --http-log-path=%{_localstatedir} /log/nginx/access .log \
         --pid-path=%{_localstatedir} /run/nginx .pid \
         --lock-path=%{_localstatedir} /run/nginx .lock \
         --http-client-body-temp-path=%{_localstatedir} /cache/nginx/client_temp  \
         --http-proxy-temp-path=%{_localstatedir} /cache/nginx/proxy_temp  \
         --http-fastcgi-temp-path=%{_localstatedir} /cache/nginx/fastcgi_temp  \
         --http-uwsgi-temp-path=%{_localstatedir} /cache/nginx/uwsgi_temp  \
         --http-scgi-temp-path=%{_localstatedir} /cache/nginx/scgi_temp  \
         --user=%{nginx_user} \
         --group=%{nginx_group} \
         --with-http_ssl_module \
         --with-http_realip_module \
         --with-http_gzip_static_module \
         --with-http_stub_status_module \
         --with- file -aio \
     --with-google_perftools_module \
     --add-module=ngx_pagespeed-1.7.30.1-beta  \
         --with-cc-opt= "%{optflags} $(pcre-config --cflags)"  \
         $*
make  %{?_smp_mflags}
% install
%{__rm} -rf $RPM_BUILD_ROOT
%{__make} DESTDIR=$RPM_BUILD_ROOT  install
%{__mkdir} -p $RPM_BUILD_ROOT%{_datadir} /nginx
%{__mv} $RPM_BUILD_ROOT%{_sysconfdir} /nginx/html  $RPM_BUILD_ROOT%{_datadir} /nginx/
%{__rm} -f $RPM_BUILD_ROOT%{_sysconfdir} /nginx/ *.default
%{__rm} -f $RPM_BUILD_ROOT%{_sysconfdir} /nginx/fastcgi .conf
%{__mkdir} -p $RPM_BUILD_ROOT%{_localstatedir} /log/nginx
%{__mkdir} -p $RPM_BUILD_ROOT%{_localstatedir} /run/nginx
%{__mkdir} -p $RPM_BUILD_ROOT%{_localstatedir} /cache/nginx
%{__mkdir} -p $RPM_BUILD_ROOT%{_sysconfdir} /nginx/conf .d
%{__rm} $RPM_BUILD_ROOT%{_sysconfdir} /nginx/nginx .conf
%{__install} -m 644 -p %{SOURCE4} \
    $RPM_BUILD_ROOT%{_sysconfdir} /nginx/nginx .conf
%{__install} -m 644 -p %{SOURCE5} \
    $RPM_BUILD_ROOT%{_sysconfdir} /nginx/conf .d /default .conf
%{__install} -m 644 -p %{SOURCE6} \
    $RPM_BUILD_ROOT%{_sysconfdir} /nginx/conf .d /example_ssl .conf
%{__mkdir} -p $RPM_BUILD_ROOT%{_sysconfdir} /sysconfig
%{__install} -m 644 -p %{SOURCE3} \
    $RPM_BUILD_ROOT%{_sysconfdir} /sysconfig/nginx
%{__install} -m 644 -p %{SOURCE8} \
    $RPM_BUILD_ROOT%{_sysconfdir} /nginx/fastcgi_params
%{__install} -m 644 -p %{SOURCE51} \
    $RPM_BUILD_ROOT%{_sysconfdir} /nginx/pagespeed .conf
# install SYSV init stuff
%{__mkdir} -p $RPM_BUILD_ROOT%{_initrddir}
% if  0%{?suse_version}
%{__install} -m755 %{SOURCE7} \
    $RPM_BUILD_ROOT%{_initrddir} /nginx
% else
%{__install} -m755 %{SOURCE2} \
    $RPM_BUILD_ROOT%{_initrddir} /nginx
%endif
# install log rotation stuff
%{__mkdir} -p $RPM_BUILD_ROOT%{_sysconfdir} /logrotate .d
%{__install} -m 644 -p %{SOURCE1} \
    $RPM_BUILD_ROOT%{_sysconfdir} /logrotate .d /nginx
%{__install} -m644 %{_builddir}/%{name}-%{version} /objs/nginx .debug \
    $RPM_BUILD_ROOT%{_sbindir} /nginx .debug
%clean
%{__rm} -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%{_sbindir} /nginx
% dir  %{_sysconfdir} /nginx
% dir  %{_sysconfdir} /nginx/conf .d
%config(noreplace) %{_sysconfdir} /nginx/nginx .conf
%config(noreplace) %{_sysconfdir} /nginx/conf .d /default .conf
%config(noreplace) %{_sysconfdir} /nginx/conf .d /example_ssl .conf
%config(noreplace) %{_sysconfdir} /nginx/mime .types
%config(noreplace) %{_sysconfdir} /nginx/fastcgi_params
%config(noreplace) %{_sysconfdir} /nginx/scgi_params
%config(noreplace) %{_sysconfdir} /nginx/uwsgi_params
%config(noreplace) %{_sysconfdir} /nginx/koi-utf
%config(noreplace) %{_sysconfdir} /nginx/koi-win
%config(noreplace) %{_sysconfdir} /nginx/win-utf
%config(noreplace) %{_sysconfdir} /nginx/pagespeed .conf
%config(noreplace) %{_sysconfdir} /logrotate .d /nginx
%config(noreplace) %{_sysconfdir} /sysconfig/nginx
%{_initrddir} /nginx
% dir  %{_datadir} /nginx
% dir  %{_datadir} /nginx/html
%{_datadir} /nginx/html/ *
%attr(0755,root,root) % dir  %{_localstatedir} /cache/nginx
%attr(0755,root,root) % dir  %{_localstatedir} /log/nginx
%files debug
%attr(0755,root,root) %{_sbindir} /nginx .debug
%pre
# Add the "nginx" user
getent group %{nginx_group} > /dev/null  || groupadd -r %{nginx_group}
getent  passwd  %{nginx_user} > /dev/null  || \
     useradd  -r -g %{nginx_group} -s  /sbin/nologin  \
     -d %{nginx_home} -c  "nginx user"   %{nginx_user}
exit  0
%post
# Register the nginx service
if  [ $1 - eq  1 ];  then
     /sbin/chkconfig  --add nginx
     # print site info
     cat  <<BANNER
----------------------------------------------------------------------
Thanks  for  using NGINX!
This is NOT an official build ,at your own risk.
----------------------------------------------------------------------
BANNER
     # Touch and set permisions on default log files on installation
     if  [ -d %{_localstatedir} /log/nginx  ];  then
         if  [ ! -e %{_localstatedir} /log/nginx/access .log ];  then
             touch  %{_localstatedir} /log/nginx/access .log
             %{__chmod} 640 %{_localstatedir} /log/nginx/access .log
             %{__chown} nginx:adm %{_localstatedir} /log/nginx/access .log
         fi
         if  [ ! -e %{_localstatedir} /log/nginx/error .log ];  then
             touch  %{_localstatedir} /log/nginx/error .log
             %{__chmod} 640 %{_localstatedir} /log/nginx/error .log
             %{__chown} nginx:adm %{_localstatedir} /log/nginx/error .log
         fi
         if  [ ! -d %{_localstatedir} /cache/nginx/pagespeed_cache  ]; then
             %{__mkdir} -p %{_localstatedir} /cache/nginx/pagespeed_cache
             %{__chown} nginx:nginx %{_localstatedir} /cache/nginx/pagespeed_cache
         else
             %{__chown} nginx:nginx %{_localstatedir} /cache/nginx/pagespeed_cache
         fi
     fi
fi
%preun
if  [ $1 - eq  0 ];  then
     /sbin/service  nginx stop >  /dev/null  2>&1
     /sbin/chkconfig  --del nginx
fi
%postun
if  [ $1 - ge  1 ];  then
     /sbin/service  nginx upgrade &> /dev/null  || :
fi
%changelog
* Sat Nov 23 2013 Purple Grape <purplegrape4@gmail.com>
- update to 1.4.4
- google_perftools_module add
- ngx_pagespeed module add

最后更新 2013-11-23

升级到nginx1.4.4,添加一个包含ngx_pagespeed模块的spec文件

附件:http://down.51cto.com/data/2362688

本文转自 紫色葡萄 51CTO博客,原文链接:http://blog.51cto.com/purplegrape/1186837,如需转载请自行联系原作者

【编译打包】nginx 1.4.0 SRPM相关推荐

  1. 源码编译打包_Atlas 2.1.0 实践(1)—— 编译Atlas

    为什么要做数据治理? 业务繁多,数据繁多,业务数据不断迭代.人员流动,文档不全,逻辑不清楚,对于数据很难直观理解,后期很难维护. 在大数据研发中,原始数据就有着非常多的数据库,数据表. 而经过数据的聚 ...

  2. Ubuntu 16.04源码编译安装nginx 1.10.0

    一.下载相关的依赖库 pcre 下载地址 http://120.52.73.43/jaist.dl.sourceforge.net/project/pcre/pcre/8.38/pcre-8.38.t ...

  3. CentOS7.0下编译安装Nginx 1.10.0

    2019独角兽企业重金招聘Python工程师标准>>> 准备工作 安装编译工具.依赖包 $ yum -y install gcc gcc-c++ autoconf automake ...

  4. php编译打包,解压即用,Ubuntu上Nginx/Apache/PHP编译打包

    适用环境 : 64位Ubuntu14.04 下载地址( 22MB ): http://pan.baidu.com/s/1o6FlEUQ md5sum png.tar.xz aaa62279d036c3 ...

  5. ansible-playbook 手工编译安装nginx

    虽然nginx也可以通过yum安装,但是如何使用源码包安装并自定义开启一些nginx功能模块,并且通过ansible下发到被管理集群呢?下面给给位看官提供一个具体实例以供参考. 首先我们需要手工编译好 ...

  6. 使用sbt编译打包,spark-submit命令提交的详细步骤

    Spark2.1.0入门:Spark的安装和使用 使用sbt打包Scala程序 该程序依赖 Spark API,因此我们需要通过 sbt 进行编译打包. 请在./sparkapp 中新建文件 simp ...

  7. Centos7 编译安装 Nginx、MariaDB、PHP

    前言 本文主要大致介绍CentOS 7下编译安装Nginx.MariaDB.PHP.面向有Linux基础且爱好钻研的朋友.技艺不精,疏漏再所难免,还望指正. 环境简介: 系统: CentOS 7,最小 ...

  8. CentOS 6下编译安装Nginx

    CentOS 6下编译安装Nginx  By:老宁 一.准备make环境  yum -y install gcc gcc-c++ automake autoconf libtool make 二.准备 ...

  9. ubuntu14.04 nginx php编译安装,Ubuntu 14.04 编译安装 Nginx

    在Ubuntu 14.04下编译安装 Nginx过程笔记. 下载源码包 nginx 地址: http://nginx.org/en/download.html 编译前先安装两个包: 直接编译安装会碰到 ...

最新文章

  1. C#new出来的结构体内存分配
  2. java queue源码_java源码解读--queue
  3. Vue 封装的组件生命周期钩子
  4. 移动端返回上一页实现方法
  5. 商家为什么要接受BCH支付?
  6. 力扣回文字串的动态规划解法
  7. 通过100个单词掌握英语语法(二十三)go
  8. php api框架 登录验证码,thinkphp3.2 框架如何使用验证码
  9. AUTOCAD——样条曲线命令
  10. YAMAHA XJR NK年代划分[网络]
  11. 各种单片机芯片封装形式
  12. MacBook使用HHKB键盘设置
  13. 亲爱的面试官,这个我可没看过!(Android部分)
  14. python处理netcdf_Python处理netCDF文件
  15. x-data-spreadsheet 在线编辑excel文件,支持导入/导出/上传/读取网络 excel,合并单元格(vue版本)
  16. 使用网站域名封装Web2App
  17. mini2440+阿里云+Qt/android 打造智能音箱
  18. Unity2019新建空项目都报错(有两个看不到的红色报错)怎么解决?
  19. 基于SpringBoot的在线招聘网站
  20. 学习笔记:带你十天轻松完成 Go 微服务系列(二)- 服务拆分

热门文章

  1. 【Python赚钱思路】如何利用Python业余时间月赚1k~6k不等?
  2. 华为平板m6 鸿蒙,第一眼就爱上它:华为平板M6开箱体验
  3. python RGB图像处理
  4. python界面设置中文_Python Spyder 怎么操作才能打开用户设置的界面(如图),python spyder教程中文...
  5. isset() 函数
  6. 地址锁存器,总线控制器,双向总线控制器(数据缓冲器,总线缓冲器),时钟发生器。8088最小工作模式。
  7. 德国访问学者签证材料准备
  8. 寒门难再出贵子(2),一篇值得思考的文章
  9. IKE协议的重要功能有哪些?
  10. 分布式任务调度(XXL-JOB)