Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 695821
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T02:59:56+00:00 2026-05-14T02:59:56+00:00

Hello I asked this question to superuser but I did not get a good

  • 0

Hello I asked this question to superuser but I did not get a good question there and i really need the answer. I know some of you here can answer this question.

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

But i can’t find the source. Does someone know what I have to do to recompile the source and get the module in.

Update

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

Can I just let it update, or should i specify that it is already up to date.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T02:59:57+00:00Added an answer on May 14, 2026 at 2:59 am

    Redhat and related distributions (fedora, centos) keep their source rpms in a highly 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 the srpm, install it with rpm:

    rpm -ivh nginx-xxxx.src.rpm
    

    This’ll put the sources and build files in /usr/src/redhat/{BUILD,SPEC,SRC,SOURCES}. You can modify the .spec file in /usr/src/redhat/SPEC to build the module you want along with the rest of nginx, or you can build nginx manually.

    Which module do you want to build? In fedora’s nginx.spec, several modules are specified when configure is run. This may be as simple as adding a line here:

    ./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...]
    

    After adding whatever changes to nginx.spec, you can build the final rpm with rpmbuild:

    rpmbuild -ba nginx.spec
    

    Assuming the package builds without error, rpmbuild will leave it in /usr/src/redhat/RPMS/

    Update: yum will want to replace your nginx package as updates become available. You will probably want to rebuild each new package as it becomes available, using the same process as above. However, If security is not a concern, you can simple exclude nginx from the update list by adding the following to your yum config (probably /etc/yum.repos.d/${repo}.repo or similar. Be sure to associate it with the right repo):

    exclude=nginx*
    

    Or running yum with the –exclude option

    yum --exclude=nginx*
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am sorry I have already asked this question on Superuser, but nobody answers
UPDATE 10/19/2010 I know I asked this question a while ago, but the workarounds
Hello everybody I've recently asked this question and I've given up with the 'replace
This exact question has been asked before but I am at my wits end!
Hello I am compiling a program with make but I get the error of
I asked the following question on SuperUser.com and the question was closed. Maybe it
Hello guys I think the question i asked in the previous post is unclear
Hello! There is a controller and an action which receives one param through GET,
Hello, this is the second time that I ask a question about this:( I
Hello I would like to know if there is a way to pull the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.