给 openresty 打包的问题

72 views
Skip to first unread message

wd

unread,
Mar 26, 2013, 6:08:53 AM3/26/13
to open...@googlegroups.com
hi,

尝试给 openresty 打 rpm 包,发现有点问题。rpm 打包都是先 install 到一个 tmp 目录,然后 rpmbuild 会自己把里面的东西打到包里面。但是这样一来,nginx 自己的依赖也都是指向那个目录的,比如执行 sudo sbin/nginx 会提示在那个 tmp 目录下面没有配置文件,需要用 sudo sbin/nginx -p ./ 才行。

这种问题有简单的解决办法吗?

Jason Calio

unread,
Mar 26, 2013, 6:34:03 AM3/26/13
to open...@googlegroups.com
你应该是configure的时候写错了

在spec文件的%build段:

./configure --prefix=你真实的安装路径前缀

在spec文件的%install段:

make install DESTDIR=rpm打包根目录

另外,你可以用checkinstall去打rpm包,不需要手工去写spec文件,很方便。

--
--
邮件来自列表“openresty”,专用于技术讨论!
订阅: 请发空白邮件到 openresty...@googlegroups.com
发言: 请发邮件到 open...@googlegroups.com
退订: 请发邮件至 openresty+...@googlegroups.com
归档: http://groups.google.com/group/openresty
官网: http://openresty.org/
仓库: https://github.com/agentzh/ngx_openresty
教程: http://openresty.org/download/agentzh-nginx-tutorials-zhcn.html
 
 

wd

unread,
Mar 26, 2013, 6:56:25 AM3/26/13
to open...@googlegroups.com
赞哦,靠谱。
搞定了。多谢。


2013/3/26 Jason Calio <vipc...@gmail.com>

Calio

unread,
Mar 26, 2013, 11:09:22 AM3/26/13
to open...@googlegroups.com
不客气!
Reply all
Reply to author
Forward
0 new messages