Web Hosting Talk







View Full Version : Apache MaxClients (recompile)


emkatzen
11-12-2001, 03:42 PM
Does anybody have any experience with recompiling apache from redhat's source rpm's? My current situation is that my install of apache from rpm has the HARD_SERVER_LIMIT compiled at 256. I'd like to bump this up without having to reconfigure PHP or Perl or any of the other modules installed on the server. What is the easiest path to accomplish this without disrupting service on the machine?

Thanks in advance,

Eli

emkatzen
11-12-2001, 09:09 PM
I have since actually tried doing a compile and install and as I thought, PHP and Perl stopped functioning. I gave the configure command the same settings for paths as my current install. I verified this with the --show-layout command. Everything matches up identical to the rpm install of apache. Clues anybody?

Thanks,

Eli

bitserve
11-13-2001, 06:28 AM
When you say you rcompiled, you modified the source rpm and rebuilt it?

emkatzen
11-13-2001, 11:03 AM
Well, I installed the source rpm. Unpacked the apache tar.gz. Ran the "./configure --show-layout" with options until the output matched my current directory layout. Once I had that, I did the "make". Backed up everything for my current install of apache and did "make install" Then I dump back the config that I backed up and start apache. All the vhosts seem to work, but php and perl or not functional. So to recover from this quickly, I just refresh the rpm for apache and I'm back to where I was before with everything working ok. (except MaxClients is back to locked at 256)

Eli

emkatzen
11-13-2001, 04:14 PM
I have recently tried rebuilding an actual rpm from source.

rpm -bp ./SPECS/apache.spec
finishes with no errors

rpm -bc ./SPECS/apache.spec
dies with the following errors

+ adding selected modules
o rewrite_module uses ConfigStart/End
disabling DBM support for mod_rewrite
(perhaps you need to add -ldbm, -lndbm or -lgdbm to EXTRA_LIBS)
o dbm_auth_module uses ConfigStart/End
o db_auth_module uses ConfigStart/End
Error: None of Berkeley-DB 1.x, 2.x or 3.x libraries found.
Either disable mod_auth_db or provide us with the paths
to the Berkeley-DB include and library files.
(Hint: INCLUDES, LDFLAGS, LIBS)
+ make
===> src
make[1]: Entering directory `/usr/src/redhat/BUILD/apache_1.3.14'
make[2]: Entering directory `/usr/src/redhat/BUILD/apache_1.3.14/src'
make[2]: *** No rule to make target `all'. Stop.
make[2]: Leaving directory `/usr/src/redhat/BUILD/apache_1.3.14/src'
make[1]: *** [build-std] Error 2
make[1]: Leaving directory `/usr/src/redhat/BUILD/apache_1.3.14'
make: *** [build] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.94224 (%build)


RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.94224 (%build)

Hope this helps.

Eli

bitserve
11-13-2001, 11:54 PM
Give me a link to the src rpm that you're using, and I'll download it, modify it for you, and make it available to you.

Then you can just rebuild the binary rpm and install. Is that how you installed it when it works?

rpm --rebuild whatever.src.rpm
rpm -i /usr/src/redhat/RPMS/i386/whatever.i386.rpm

emkatzen
11-14-2001, 12:39 AM
No, the original install is from the Redhat binary rpm of apache.

bitserve
11-14-2001, 02:55 PM
Even better. Give me the link to the binary RPM, and I'll see what I can do.

If you want.

emkatzen
11-14-2001, 10:46 PM
http://www.rpmfind.net//linux/RPM/redhat/updates/7.0/i386/apache-1.3.14-3.i386.html

bitserve
11-15-2001, 09:05 AM
http://www.bitserve.com/apache-1.3.14-4.src.rpm

rpm --rebuild apache-1.3.14-4.src.rpm

It will tell you where it wrote the binary rpm. Then just install the binary rpm.

If you have RedHat 6.2 then you can probably just install the binary rpm that I compiled:

http://www.bitserve.com/apache-1.3.14-4.i386.rpm

Don't forget to backup your httpd configuration files.

Good luck, and I don't make any warranties, but read the changelog to see what I did:

rpm -qp --changelog apache-1.3.14-4.i386.rpm

emkatzen
11-15-2001, 11:54 AM
Well, I didn't have any luck running the rebuild, so I gave your binary a try and it seems to be working. (Even tho its a RH7.0 box)

Below are the relevant errors from the rebuild process.

Creating Makefile in src
+ configured for Linux platform
+ setting C compiler to gcc
+ setting C pre-processor to gcc -E
+ checking for system header files
+ adding selected modules
o rewrite_module uses ConfigStart/End
disabling DBM support for mod_rewrite
(perhaps you need to add -ldbm, -lndbm or -lgdbm to EXTRA_LIBS)
o dbm_auth_module uses ConfigStart/End
o db_auth_module uses ConfigStart/End
Error: None of Berkeley-DB 1.x, 2.x or 3.x libraries found.
Either disable mod_auth_db or provide us with the paths
to the Berkeley-DB include and library files.
(Hint: INCLUDES, LDFLAGS, LIBS)
+ make
===> src

bitserve
11-15-2001, 06:33 PM
I figured you'd be able to run the binary one that I compiled even if you had redhat 7.x, but I doubt that it will be as efficient as if you would compile it yourself.

I think that libdb is included with glibc-devel. You should see what version of glibc you have installed:

rpm -qa |grep glibc

Then download and install the appropriate glibc-devel rpm from redhat or rpmfind.

Then try recompiling the apache src rpm.

bitserve
11-16-2001, 01:19 PM
You're welcome, by the way.