[PR]
- Category:
- Date:2026年01月13日
×
[PR]上記の広告は3ヶ月以上新規記事投稿のないブログに表示されています。新しい記事を書く事で広告が消えます。
[PR]上記の広告は3ヶ月以上新規記事投稿のないブログに表示されています。新しい記事を書く事で広告が消えます。
rpm -ivh http://nginx.org/packages/centos/6/SRPMS/nginx-1.4.7-1.el6.ngx.src.rpm
git clone https://github.com/fluent/nginx-fluentd-module.git ~/rpmbuild/SOURCES/nginx-fluentd-module
cat<<'@@_PATCH_@@'>/tmp/nginx.spec.patch
diff --git a/nginx.spec.org b/nginx.spec
index 0366f96..02d93f0 100644
--- a/nginx.spec.org
+++ b/nginx.spec
@@ -56,6 +56,7 @@ Source4: nginx.conf
Source5: nginx.vh.default.conf
Source6: nginx.vh.example_ssl.conf
Source7: nginx.suse.init
+Source8: nginx-fluentd-module
License: 2-clause BSD-like license
@@ -81,6 +82,7 @@ Not stripped version of nginx built with the debugging log support.
%build
./configure \
+ --add-module=%{SOURCE8} \
--prefix=%{_sysconfdir}/nginx \
--sbin-path=%{_sbindir}/nginx \
--conf-path=%{_sysconfdir}/nginx/nginx.conf \
@@ -118,6 +120,7 @@ make %{?_smp_mflags}
%{__mv} %{_builddir}/%{name}-%{version}/objs/nginx \
%{_builddir}/%{name}-%{version}/objs/nginx.debug
./configure \
+ --add-module=%{SOURCE8} \
--prefix=%{_sysconfdir}/nginx \
--sbin-path=%{_sbindir}/nginx \
--conf-path=%{_sysconfdir}/nginx/nginx.conf \
@@_PATCH_@@
cd ~/rpmbuild/SPECS
patch -p1 < /tmp/nginx.spec.patch
rpmbuild -bb nginx.spec