Is it possible to recompile this package

Hi, I asked this question to the superuser, but I did not have a good question, and I really need an answer. I know that some of you here can answer this question.

I installed nginx via yum. Now I want to add a module, but I need to compile the source again and enable the new module.

But I can not find the source. Does anyone know what I need to do to recompile the source and get the module.

Update

I did everything in response from Patrick, and everything worked out perfectly. However, when now, when I run the yum update, it wants to update the installed rpm with the same version.

Is it possible to simply update it, or should I indicate that it is already updated.

+5
source share
1 answer

Redhat and its related distributions (fedora, centos) keep their original rpms in a very regular directory tree. for RHEL5 you want: ftp://ftp.redhat.com/pub/redhat/linux/enterprise/5Server/en/os/SRPMS/ for other releases, you can browse the ftp server until you find what you want. Otherwise google for the exact version of nginx you have ( rpm -q nginx)

Assuming you can find srpm, install it with rpm:

rpm -ivh nginx-xxxx.src.rpm

This will create sources and create files in /usr/src/redhat/{BUILD,SPEC,SRC,SOURCES}. You can modify the file .specin /usr/src/redhat/SPECto build the module that you want along with the rest of nginx, or you can create nginx manually.

? fedora nginx.spec configure. , :

./configure \
[snip...]
--with-http_realip_module \
--with-http_addition_module \
--with-http_sub_module \
--with-http_dav_module \
--with-http_flv_module \
--with-http_gzip_static_module \
--with-http_stub_status_module \
--with-http_perl_module \
[snip...]

- nginx.spec rpm rpmbuild:

rpmbuild -ba nginx.spec

, , rpmbuild /usr/src/redhat/RPMS/

: yum nginx . , , , , . . , nginx , yum (, /etc/yum.repos.d/${repo}.repo . ):

exclude=nginx*

yum --exclude

yum --exclude=nginx*
+6

All Articles