【编译打包】tengine 1.5.1 SRPM
Tengine 1.5.1是最新稳定版,打包出一个SRPM,分享给大家。
此次打包tengine的特性相对比较完整,主要是包含跟原版nginx区别开来的dso-tool
1、根据CPU数量自动设置进程数和CPU亲缘性
2、大量实用的功能模块(nginx没有,而tengine改进或者新增的模块)
tengine.spec基于nginx.spec,仅供参考,欢迎给出改进意见
# %define nginx_home %{_localstatedir}/cache/nginx %define nginx_user nginx %define nginx_group nginx Summary: tengine is a high performance web server Name: tengine Version: 1.5.1 Release: 1%{?dist} Vendor: taobao inc. URL: http://tengine.taobao.org/ Source0: http://tengine.taobao.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 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 %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 tengine is a fork of nginx, which is an high performance HTTP and reverse proxy server. %package debug Summary: debug version of tengine Group: System Environment/Daemons Requires: tengine %description debug not stripped version of tengine build with the debugging log support %prep %setup -q %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 \--dso-path=%{_sysconfdir}/nginx/modules \--dso-tool-path=%{_sbindir}/dso-tool \--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-http_concat_module \--with-http_upstream_check_module \--with-google_perftools_module \--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 \--dso-path=%{_sysconfdir}/nginx/modules \--dso-tool-path=%{_sbindir}/dso-tool \--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-http_concat_module \--with-http_upstream_check_module \--with-google_perftools_module \--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 %{__mkdir} -p $RPM_BUILD_ROOT%{_sysconfdir}/nginx/modules %{__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 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 %{_sbindir}/dso-tool %dir %{_sysconfdir}/nginx %dir %{_sysconfdir}/nginx/conf.d %dir %{_sysconfdir}/nginx/modules %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/browsers %config(noreplace) %{_sysconfdir}/nginx/module_stubs %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 infocat <<BANNER ---------------------------------------------------------------------- Thanks for using Tengine! Check out our community web site: * http://tengine.taobao.org If you have questions about Tengine please visit: * http://tengine.taobao.org/faq.html ---------------------------------------------------------------------- BANNER# Touch and set permisions on default log files on installationif [ -d %{_localstatedir}/log/nginx ]; thenif [ ! -e %{_localstatedir}/log/nginx/access.log ]; thentouch %{_localstatedir}/log/nginx/access.log%{__chmod} 640 %{_localstatedir}/log/nginx/access.log%{__chown} nginx:adm %{_localstatedir}/log/nginx/access.logfiif [ ! -e %{_localstatedir}/log/nginx/error.log ]; thentouch %{_localstatedir}/log/nginx/error.log%{__chmod} 640 %{_localstatedir}/log/nginx/error.log%{__chown} nginx:adm %{_localstatedir}/log/nginx/error.logfifi 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 Sep 14 2013 Purple Grape <purplegrape4@gmail.com> - update to 1.5.1 * Wed Apr 29 2013 Purple Grape <purplegrape4@gmail.com> - 3 modules added: http_concat_module http_upstream_check_module google_perftools_module - 1.3.0
跟上次一样,安装需要 gperftools-libs
tengine 有个命令跟apache相似,列出已安装的模块,nginx -m输出如下
# nginx -m Tengine version: Tengine/1.5.1 (nginx/1.2.9) loaded modules:ngx_core_module (static)ngx_errlog_module (static)ngx_conf_module (static)ngx_dso_module (static)ngx_syslog_module (static)ngx_events_module (static)ngx_event_core_module (static)ngx_epoll_module (static)ngx_procs_module (static)ngx_proc_core_module (static)ngx_openssl_module (static)ngx_regex_module (static)ngx_http_module (static)ngx_http_core_module (static)ngx_http_log_module (static)ngx_http_upstream_module (static)ngx_http_static_module (static)ngx_http_gzip_static_module (static)ngx_http_autoindex_module (static)ngx_http_index_module (static)ngx_http_concat_module (static)ngx_http_auth_basic_module (static)ngx_http_access_module (static)ngx_http_limit_conn_module (static)ngx_http_limit_req_module (static)ngx_http_realip_module (static)ngx_http_geo_module (static)ngx_http_map_module (static)ngx_http_split_clients_module (static)ngx_http_referer_module (static)ngx_http_rewrite_module (static)ngx_http_ssl_module (static)ngx_http_proxy_module (static)ngx_http_fastcgi_module (static)ngx_http_uwsgi_module (static)ngx_http_scgi_module (static)ngx_http_memcached_module (static)ngx_http_empty_gif_module (static)ngx_http_browser_module (static)ngx_http_user_agent_module (static)ngx_http_upstream_ip_hash_module (static)ngx_http_upstream_consistent_hash_module (static)ngx_http_upstream_check_module (static)ngx_http_upstream_least_conn_module (static)ngx_http_upstream_keepalive_module (static)ngx_http_stub_status_module (static)ngx_http_write_filter_module (static)ngx_http_header_filter_module (static)ngx_http_chunked_filter_module (static)ngx_http_range_header_filter_module (static)ngx_http_gzip_filter_module (static)ngx_http_postpone_filter_module (static)ngx_http_ssi_filter_module (static)ngx_http_charset_filter_module (static)ngx_http_userid_filter_module (static)ngx_http_footer_filter_module (static)ngx_http_trim_filter_module (static)ngx_http_headers_filter_module (static)ngx_http_upstream_session_sticky_module (static)ngx_http_copy_filter_module (static)ngx_http_range_body_filter_module (static)ngx_http_not_modified_filter_module (static)ngx_google_perftools_module (static)
配置文件略有修改,仅供参考,
模块目前全部静态编译,因为有dso-tool,可动态载入新编译的模块,也可根据需要修改SRPM或二次打包。
附件源名称为tengine-1.5.1-1.el6.src.rpm,上传时直接添加了zip后缀,下载后请改回原来的名字。
( follow the link of " tengine-1.5.1-1.el6.src.rpm",you may get a zip file,
just like "1330104_1379093530.zip",
please directly rename it to “tengine-1.5.1-1.el6.src.rpm”
it's not really a zip file but due to the naming limitation of the blog system )
【编译打包】tengine 1.5.1 SRPM相关推荐
- 使用sbt编译打包,spark-submit命令提交的详细步骤
Spark2.1.0入门:Spark的安装和使用 使用sbt打包Scala程序 该程序依赖 Spark API,因此我们需要通过 sbt 进行编译打包. 请在./sparkapp 中新建文件 simp ...
- PayPal 开发详解(六):下载paypal立即付款SDK 并编译打包
PayPal 开发详解(六):下载paypal立即付款SDK 并编译打包 1.下载PayPal REST SDKs,地址:https://developer.paypal.com/docs/api/r ...
- Android-Ant自动编译打包android项目 -- 2 ----签名与渠道包
上篇介绍了怎么使用ant自动编译打包现有的android项目,这篇将继续介绍如果如何在ant打包应用的时候加入签名信息以及自动打包渠道包. 1. 加入签名信息: 在项目的根目录下建一个ant.prop ...
- 【编译打包】haproxy 1.4.23
haproxy 1.4.23 修复了一个严重的安全问题,官方建议立即升级.官网首页原文: A vulnerability in all 1.4 and 1.5 releases was fixed i ...
- gradle编译打包过程 之 ProcessAndroidResources的源码分析
首先,如何查看gradle源码,我们在项目里依赖com.android.tools.build:gradle即可,如下: compile gradleApi() compile 'com.androi ...
- maven 打包编译_您是否真的想加快Maven的编译/打包速度? 那么takari生命周期插件就是答案。...
maven 打包编译 像你们中的许多人一样,我正在使用多模块Maven项目 . 与现有的许多系统相比,它不是一个巨大的系统,它具有15个模块,3种不同的耳朵部署,带有属性文件的大量参数化以及大约10万 ...
- 您是否真的要加快Maven的编译/打包速度? 那么takari生命周期插件就是答案。
像你们中的许多人一样,我正在使用多模块Maven项目 . 与现有的许多系统相比,这不是一个很大的数目,它具有15个模块,3种不同的耳朵部署,带有属性文件的大量参数化以及大约10万行Java代码. 在开 ...
- VSCode内npm run build编译打包时候报错:code ELIFECYCLE - (已解决)
文章目录 win10系统使用VSCode打包项目进行build编译的时候,报错:Module build failed: Error: "extract-text-webpack-plugi ...
- vue中webpack编译打包使用之Vue知识点归纳(十一)
本文中将描述 webpack 简述 webpack 项目的初始化配置 webpack 打包运行一个 vue 项目 1 什么是webpack,到底需要解决什么问题 近几年前端的快速发展,前端已不是简单的 ...
最新文章
- ubuntu 12.04 clang 3.4 安装
- 【个人随笔】准备整理整理以往的资料
- Integer to Roman 问题
- Python enumerate 函数 - Python零基础入门教程
- [zoj3593]扩展欧几里得+三分
- 交换机中tag、untag的理解
- 用C语言写的爬虫项目
- 自学单片机入门学习建议
- amd显卡用黑苹果输出黑屏_黑苹果XFX讯景显卡刷vBIOS教程,使其黑苹果显卡更稳定完美,不再黑屏...
- python程序设计基础教程慕课版课后题答案薛景_Python程序设计基础教程(慕课版)...
- DataGrid Bind Checkbox....
- 【前端——Node.js】:Express、数据库与身份认证
- 微信小程序跳转微信小程序,使用微信开发者工具的测试记录
- 机器视觉中的像素、分辨率、灰度值等概念
- 对薛兆丰经济学思维的研究:价格的教益
- java中package_java 中 package 是什么?
- android kotlin 上传文件 上传图片
- 涉密学位论文不得在联网的计算机上撰写,华南理工大学涉密学位论文管理暂行规定.doc...
- MoveIt——9.MoveItCpp教程
- 这位华裔天才数学家情商也蛮高,他给了25条职业建议