OpenResty.spec
Name: openresty
Version: 1.13.6.1
Release: 2%{?dist}
Summary: OpenResty, scalable web platform by extending NGINX with Lua Group: System Environment/Daemons # BSD License (two clause)
# http://www.freebsd.org/copyright/freebsd-license.html
License: BSD
URL: https://openresty.org/ Source0: https://openresty.org/download/openresty-%{version}.tar.gz
Source1: nginx.service #Patch0: openresty-%{version}.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: perl-File-Temp
BuildRequires: gcc, make, perl, systemtap-sdt-devel
BuildRequires: openresty-zlib-devel >= 1.2.11-3
BuildRequires: openresty-openssl-devel >= 1.0.2k-1
BuildRequires: openresty-pcre-devel >= 8.40-1
Requires: openresty-zlib >= 1.2.11-3
Requires: openresty-openssl >= 1.0.2k-1
Requires: openresty-pcre >= 8.40-1 # for /sbin/service
Requires(post): chkconfig
Requires(preun): chkconfig, initscripts AutoReqProv: no %define orprefix %{_usr}/local/%{name}
%define zlib_prefix %{orprefix}/zlib
%define pcre_prefix %{orprefix}/pcre
%define openssl_prefix %{orprefix}/openssl %description
This package contains the core server for OpenResty. Built for production
uses. OpenResty is a full-fledged web platform by integrating the standard Nginx
core, LuaJIT, many carefully written Lua libraries, lots of high quality
3rd-party Nginx modules, and most of their external dependencies. It is
designed to help developers easily build scalable web applications, web
services, and dynamic web gateways. By taking advantage of various well-designed Nginx modules (most of which
are developed by the OpenResty team themselves), OpenResty effectively
turns the nginx server into a powerful web app server, in which the web
developers can use the Lua programming language to script various existing
nginx C modules and Lua modules and construct extremely high-performance
web applications that are capable to handle 10K ~ 1000K+ connections in
a single box. %package resty Summary: OpenResty command-line utility, resty
Group: Development/Tools
Requires: perl, openresty >= %{version}-%{release}
Requires: perl(File::Spec), perl(FindBin), perl(List::Util), perl(Getopt::Long), perl(File::Temp), perl(POSIX), perl(Time::HiRes) %if 0%{?fedora} >= 10 || 0%{?rhel} >= 6 || 0%{?centos} >= 6
BuildArch: noarch
%endif %description resty
This package contains the "resty" command-line utility for OpenResty, which
runs OpenResty Lua scripts on the terminal using a headless NGINX behind the
scene. OpenResty is a full-fledged web platform by integrating the standard Nginx
core, LuaJIT, many carefully written Lua libraries, lots of high quality
3rd-party Nginx modules, and most of their external dependencies. It is
designed to help developers easily build scalable web applications, web
services, and dynamic web gateways. %package doc Summary: OpenResty documentation tool, restydoc
Group: Development/Tools
Requires: perl, perl(Getopt::Std), perl(File::Spec), perl(FindBin), perl(Cwd), perl(File::Temp), perl(Pod::Man), perl(Pod::Text) %if (!0%{?rhel} || 0%{?rhel} < 7) && !0%{?fedora}
Requires: groff
%endif %if (0%{?rhel} && 0%{?rhel} >= 7) || 0%{?fedora}
Requires: groff-base
%endif Provides: restydoc, restydoc-index, md2pod.pl %if 0%{?fedora} >= 10 || 0%{?rhel} >= 6 || 0%{?centos} >= 6
BuildArch: noarch
%endif %description doc
This package contains the official OpenResty documentation index and
the "restydoc" command-line utility for viewing it. OpenResty is a full-fledged web platform by integrating the standard Nginx
core, LuaJIT, many carefully written Lua libraries, lots of high quality
3rd-party Nginx modules, and most of their external dependencies. It is
designed to help developers easily build scalable web applications, web
services, and dynamic web gateways. %package opm Summary: OpenResty Package Manager
Group: Development/Tools
Requires: perl, openresty >= %{version}-%{release}, perl(Digest::MD5)
Requires: openresty-doc >= %{version}-%{release}, openresty-resty >= %{version}-%{release}
Requires: curl, tar, gzip
#BuildRequires: perl(Digest::MD5)
Requires: perl(Encode), perl(FindBin), perl(File::Find), perl(File::Path), perl(File::Spec), perl(Cwd), perl(Digest::MD5), perl(File::Copy), perl(File::Temp), perl(Getopt::Long) %if 0%{?fedora} >= 10 || 0%{?rhel} >= 6 || 0%{?centos} >= 6
BuildArch: noarch
%endif %description opm
This package provides the client side tool, opm, for OpenResty Pakcage Manager (OPM). %prep
%setup -q -n "openresty-%{version}" #%patch0 -p1 %build
./configure \
--prefix="%{orprefix}" \
--with-cc-opt="-DNGX_LUA_ABORT_AT_PANIC -I%{zlib_prefix}/include -I%{pcre_prefix}/include -I%{openssl_prefix}/include" \
--with-ld-opt="-L%{zlib_prefix}/lib -L%{pcre_prefix}/lib -L%{openssl_prefix}/lib -Wl,-rpath,%{zlib_prefix}/lib:%{pcre_prefix}/lib:%{openssl_prefix}/lib" \
--with-pcre-jit \
--without-http_rds_json_module \
--without-http_rds_csv_module \
--without-lua_rds_parser \
--with-stream \
--with-stream_ssl_module \
--with-stream_ssl_preread_module \
--with-http_v2_module \
--without-mail_pop3_module \
--without-mail_imap_module \
--without-mail_smtp_module \
--with-http_stub_status_module \
--with-http_realip_module \
--with-http_addition_module \
--with-http_auth_request_module \
--with-http_secure_link_module \
--with-http_random_index_module \
--with-http_gzip_static_module \
--with-http_sub_module \
--with-http_dav_module \
--with-http_flv_module \
--with-http_mp4_module \
--with-http_gunzip_module \
--with-threads \
--with-luajit-xcflags='-DLUAJIT_NUMMODE=2 -DLUAJIT_ENABLE_LUA52COMPAT' \
--with-dtrace-probes \
--with-http_geoip_module \
--pid-path=/run/nginx.pid \
%{?_smp_mflags} make %{?_smp_mflags} %install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot} rm -rf %{buildroot}%{orprefix}/luajit/share/man
rm -rf %{buildroot}%{orprefix}/luajit/lib/libluajit-5.1.a mkdir -p %{buildroot}/usr/sbin
mkdir -p %{buildroot}/usr/bin
mkdir -p %{buildroot}/var/log
mkdir -p %{buildroot}/etc
ln -sf %{orprefix}/bin/resty %{buildroot}/usr/bin/
ln -sf %{orprefix}/bin/restydoc %{buildroot}/usr/bin/
ln -sf %{orprefix}/bin/opm %{buildroot}/usr/bin/
ln -sf %{orprefix}/nginx/sbin/nginx %{buildroot}/usr/sbin/nginx
ln -sf %{orprefix}/nginx/conf %{buildroot}/etc/nginx
ln -sf %{orprefix}/nginx/logs %{buildroot}/var/log/nginx mkdir -p %{buildroot}/usr/lib/systemd/system
%{__install} -p -m 0755 %{SOURCE1} %{buildroot}/usr/lib/systemd/system/nginx.service # to silence the check-rpath error
export QA_RPATHS=$[ 0x0002 ] %clean
rm -rf %{buildroot} %post
#/sbin/chkconfig --add %{name}
/usr/bin/systemctl daemon-reload %preun
if [ $1 = 0 ]; then
#/sbin/service nginx stop >/dev/null 2>&1
#/sbin/chkconfig --del %{name}
/usr/bin/systemctl disable nginx
/usr/bin/systemctl stop nginx
fi %files
%defattr(-,root,root,-) /etc/nginx
/var/log/nginx
/usr/lib/systemd/system/nginx.service
/usr/sbin/nginx
%{orprefix}/bin/openresty
%{orprefix}/site/lualib/
%{orprefix}/luajit/*
%{orprefix}/lualib/*
%{orprefix}/nginx/html/*
%{orprefix}/nginx/logs/
%{orprefix}/nginx/sbin/*
%{orprefix}/nginx/tapset/*
%config(noreplace) %{orprefix}/nginx/conf/*
%{orprefix}/COPYRIGHT %files resty
%defattr(-,root,root,-) /usr/bin/resty
%{orprefix}/bin/resty %files doc
%defattr(-,root,root,-) /usr/bin/restydoc
%{orprefix}/bin/restydoc
%{orprefix}/bin/restydoc-index
%{orprefix}/bin/md2pod.pl
%{orprefix}/bin/nginx-xml2pod
%{orprefix}/pod/*
%{orprefix}/resty.index %files opm
%defattr(-,root,root,-) /usr/bin/opm
%{orprefix}/bin/opm
%{orprefix}/site/manifest/
%{orprefix}/site/pod/ %changelog
* Tue May 8 2018 RainFlying 1.13.6.1-2
- Set pid file location to /run/nginx.pid by default
- Created symlinks /etc/nginx, /usr/sbin/nginx, /var/log/nginx
- Changed to use sysemd
- Enabled geoip module
* Sun Nov 12 2017 Yichun Zhang (agentzh) 1.13.6.1-1
- upgraded openresty to 1.13.6.1.
* Thu Sep 21 2017 Yichun Zhang (agentzh) 1.11.2.5-2
- enabled -DNGX_LUA_ABORT_AT_PANIC by default.
* Thu Aug 17 2017 Yichun Zhang (agentzh) 1.11.2.5-1
- upgraded OpenResty to 1.11.2.5.
* Tue Jul 11 2017 Yichun Zhang (agentzh) 1.11.2.4-1
- upgraded OpenResty to 1.11.2.4.
* Sat May 27 2017 Yichun Zhang (agentzh) 1.11.2.3-14
- bugfix: the openresty-opm subpackage did not depend on openresty-doc and openresty-resty.
* Sat May 27 2017 Yichun Zhang (agentzh) 1.11.2.3-14
- centos 6 and opensuse do not have the groff-base package.
* Sat May 27 2017 Yichun Zhang (agentzh) 1.11.2.3-13
- openresty-doc now depends on groff-base.
* Thu May 25 2017 Yichun Zhang (agentzh) 1.11.2.3-12
- added missing groff/pod2txt/pod2man dependencies for openresty-doc.
* Thu May 25 2017 Yichun Zhang (agentzh) 1.11.2.3-11
- added missing perl dependencies for openresty-opm, openresty-resty, and openresty-doc.
* Sun May 21 2017 Yichun Zhang (agentzh) 1.11.2.3-10
- removed the geoip nginx module since GeoIP is not available everywhere.
* Fri Apr 21 2017 Yichun Zhang (agentzh)
- upgrade to the OpenResty 1.11.2.3 release: http://openresty.org/en/changelog-1011002.html
* Sat Dec 24 2016 Yichun Zhang
- init script: explicity specify the runlevels 345.
* Wed Dec 14 2016 Yichun Zhang
- opm missing runtime dependencies curl, tar, and gzip.
- enabled http_geoip_module by default.
* Fri Nov 25 2016 Yichun Zhang
- opm missing runtime dependency perl(Digest::MD5)
* Thu Nov 17 2016 Yichun Zhang
- upgraded OpenResty to 1.11.2.2.
* Fri Aug 26 2016 Yichun Zhang
- use dual number mode in our luajit builds which should usually
be faster for web application use cases.
* Wed Aug 24 2016 Yichun Zhang
- bump OpenResty version to 1.11.2.1.
* Tue Aug 23 2016 zxcvbn4038
- use external packages openresty-zlib and openresty-pcre through dynamic linking.
* Thu Jul 14 2016 Yichun Zhang
- enabled more nginx standard modules as well as threads and file aio.
* Sun Jul 10 2016 makerpm
- initial build for OpenResty 1.9.15.1.
OpenResty.spec的更多相关文章
- Nginx实现JWT验证-基于OpenResty实现
介绍 权限认证是接口开发中不可避免的问题,权限认证包括两个方面 接口需要知道调用的用户是谁 接口需要知道该用户是否有权限调用 第1个问题偏向于架构,第2个问题更偏向于业务,因此考虑在架构层解决第1个问 ...
- Lua OpenResty容器化(考古历程)
原文地址:Lua OpenResty容器化(考古历程) 背景 公司有几个"远古时期"的项目,一直都相对较为稳定,但是项目每天总会在一些时段,请求每分钟QPS到达峰值800K左右,导 ...
- 火焰图分析openresty性能瓶颈
注:本文操作基于CentOS 系统 准备工作 用wget从https://sourceware.org/systemtap/ftp/releases/下载最新版的systemtap.tar.gz压缩包 ...
- openresty 前端开发入门五之Mysql篇
openresty 前端开发入门五之Mysql篇 这章主要演示怎么通过lua连接mysql,并根据用户输入的name从mysql获取数据,并返回给用户 操作mysql主要用到了lua-resty-my ...
- pod Spec管理配置
pod Spec 为自己的项目添加pod管理功能.前言: 上一篇文章中提到,因为自己在操作的时候遇到很多坑,所在在此做一个记录,同样也希望可以帮到在这个操作上遇到坑的人. 本文将采用配图和加文字的方式 ...
- openresty 前端开发入门六之调试篇
大多数情况下,调试信息,都可以通过ngx.say打印出来,但是有的时候,我们希望打印调试日志,不影响到返回数据,所以系统打印到其它地方,比如日志文件,或者控制台 这里主要用到一个方法就是ngx.log ...
- openresty 前端开发序
还记得第一次尝试前后端分离的时候,是使用nginx + react 构建的spa应用,后端是java,主要处理业务逻辑逻辑部分,返回json数据,在nginx里面配置好html + js纯静态文件,再 ...
- openresty 前端开发入门一
OpenResty ™ 是一个基于 Nginx 与 Lua 的高性能 Web 平台,其内部集成了大量精良的 Lua 库.第三方模块以及大多数的依赖项.用于方便地搭建能够处理超高并发.扩展性极高的动态 ...
- mac下openresty安装
//openresty安装 http://openresty.org/ brew updatebrew install pcre openssl ./configure --prefix=/usr/l ...
随机推荐
- python3 继承与组合
什么叫继承? 所谓继承,就是class_A里面的功能从class_B中直接获取,从而节约了代码且使用方便. 什么叫组合? 除了继承,还有一种我们可以实现目的的方式,那就是组合,同样可以节约代码.只不过 ...
- 洛谷10月月赛II
#A: P4924 [1007]魔法少女小Scarlet 这道题考了矩阵旋转 其实很考验推公式的能力和代码能力 这里有个小技巧 可以设(x, y)为原点,然后去推公式,然后实际操作中横坐标加上x,纵坐 ...
- vue路由传值params和query的区别
vue路由传值params和query的区别1.query传参和接收参数传参: this.$router.push({ path:'/xxx' query:{ id:id } })接收参数: this ...
- 【Codeforces Round #482 (Div. 2) C】Kuro and Walking Route
[链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] 把x..y这条路径上的点标记一下. 然后从x开始dfs,要求不能走到那些标记过的点上.记录节点个数为cnt1(包括x) 然后从y开始 ...
- ActiveMQ学习总结(4)——业界消息队列简介
最近开发公司的短信平台,要用到消息队列,之前用的是亚马逊的SQS,考虑到后续业务发展,对消息推送的高并发要求,公司决定采用RabbitMQ来替换.借此机会开始熟悉各种MQ产品,下面先给大家简介下业界常 ...
- 关于nodejs的线程模型可以看这篇文章
虽然还是有一些没有讲全,但是整体还是讲的很不错的. http://www.ruanyifeng.com/blog/2014/10/event-loop.html
- objective-c訪问控制符
objective-c中成员变量的四个訪问控制符: @private:仅仅有当前类的内部才干訪问 @public:全部人都可訪问 @protected:仅仅限当前类和它的子类可以訪问 @package ...
- Laravel-HTTP-验证
Laravel-HTTP-验证 标签(空格分隔): php 第一种方式 **1 直接在controller里完成表单验证** **2 打印验证返回的错误信息 dd($errors)** 第二种方式 * ...
- OC冒泡排序算法
面试的时候很多公司会要求写一个冒泡排序算法,于是用OC写了一个,代码如下所示 需要注意的事项:oc数组只能存放oc对象,因此遍历数组输出的时候,记得通过NSString对象转换成intValue #i ...
- 配置 NTP 时间服务器
对于我们当前这种案例,主要目标是把 z01 这台服务器设置为时间服务器,剩下的 z02,z03 这两台机器同步 z01 的时间,我们需要这样做的原因是因为,整个集群架构中的时间,要保持一致. ** 检 ...