LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to Compile httpd-2.2.13 on CentOS 5.3? (https://www.linuxquestions.org/questions/linux-software-2/how-to-compile-httpd-2-2-13-on-centos-5-3-a-755016/)

k_oudom 09-14-2009 03:59 AM

How to Compile httpd-2.2.13 on CentOS 5.3?
 
Can someone give me the instruction on how to compile httpd-2.2.13 on a specific Linux Distributor. Assume that I'm using CentOS 5.3.

This direct download link of httpd-2.2.13: http://apache.mirrors.tds.net/httpd/httpd-2.2.13.tar.gz

bathory 09-14-2009 04:28 AM

It depends from the options you want to enable for apache. In general running
Code:

./configure --prefix=/some/path/to/apache --enable-so
is enough if you want apache to support DSOs (like mod_php). Note that /somet/path/to/apache is the path you want to install apache.
If you want to enable more options (like mod_ssl, mod_rewrite etc), run
Code:

./configure --help
to see all the available ./configure options.

Regards

k_oudom 09-14-2009 04:30 AM

What is the default part for apache of /some/path/to/apache on CentOS 5.3?

bathory 09-14-2009 04:32 AM

There is no default path. You can install it where you want.
I always prefer to install apache in /usr/local/apache

k_oudom 09-14-2009 04:38 AM

But with default httpd come with CentOS, I can see httpd.conf is at /etc/httpd/conf.d/. It should be recommended part. What is Program Files in CentOS 5.3. In Windows is C:\Program Files\

knudfl 09-14-2009 04:49 AM

If you have a version of httpd installed,
please do the command : rpm -ql httpd
to get a file list with all locations.
Default for a CentOS httpd package is "--prefix=/usr/"

.....

k_oudom 09-14-2009 04:52 AM

After installation, how to start service? How to make it start when system boot up?

lutusp 09-14-2009 05:15 AM

Quote:

Originally Posted by k_oudom (Post 3682023)
After installation, how to start service? How to make it start when system boot up?

First start:

Code:

# service httpd start
Assure start every time computer boots (in levels 2,3,4 and 5):

Code:

# chkconfig httpd on

knudfl 09-14-2009 07:12 AM

1 Attachment(s)
... And the CentOS way to create httpd-2.2.13
is to create an rpm package :
Get this source ( which contains all patches , etc.) :
wget http://download.fedora.redhat.com/pu....11-10.src.rpm
> > httpd-2.2.11-10.src.rpm

Unpack (install) the package with the command :
rpm -Uvh httpd-2.2.11-10.src.rpm
.. and copy httpd-2.2.13.tar.gz to /usr/src/redhat/SOURCES/

Getting the required dependencies :
# yum install \
apr-devel apr-util-devel openldap-devel db4-devel \
expat-devel openssl-devel rpm-build

And using an edited spec file to build the package(s) with
# rpmbuild -bb httpd-2.2.13el5.spec

htppd.spec was edited to httpd-2.2.13el5.spec :
Edit line 9 to : Version: 2.2.13
Edit line 10 to : Release: 1el5
Un comment line 40 : # Patch55: httpd-2.2.4-oldflush.patch
Un comment line 129 : # %patch55 -p1 -b .oldflush
.. The new spec file is attached as httpd-2.2.13el5.spec.txt
.....

The build result :
usr/src/redhat/RPMS/noarch/httpd-2.2.13-10el5.noarch.rpm
/usr/src/redhat/RPMS/noarch/httpd-devel-2.2.13-10el5.noarch.rpm
/usr/src/redhat/RPMS/noarch/httpd-manual-2.2.13-10el5.noarch.rpm
/usr/src/redhat/RPMS/noarch/httpd-tools-2.2.13-10el5.noarch.rpm
/usr/src/redhat/RPMS/noarch/mod_ssl-2.2.13-10el5.noarch.rpm
.. Notice ' .noarch ' : ? a bug somewhere ?
.....

k_oudom 09-15-2009 04:54 AM

That is so messy. It doesn't look like an official installation instruction. Look harder than I think.

EricTRA 09-15-2009 04:58 AM

Hi k_oudom,

Why would you compile at all when almost every distro has a ready to install package available? Is there any specific reason why you want to compile?

Kind regards,

Eric

knudfl 09-15-2009 07:59 AM

The latest official update for CentOS 5.3 is
httpd-2.2.3-22.el5.centos.1.i386.rpm

As said by @ EricTRA : Install it ... with
# yum install httpd

or use the Fedora 12 spec file + the new source,
if you really want the latest version.

The method in post # 9 is just as "official" as Fedora 12.
.. And is the official way of rebuilding a package.
.. All the mentioned packages will build in 10 minutes.
.....

k_oudom 09-15-2009 07:46 PM

Quote:

Originally Posted by EricTRA (Post 3683376)
Hi k_oudom,

Why would you compile at all when almost every distro has a ready to install package available? Is there any specific reason why you want to compile?

Kind regards,

Eric

I create this topic since the problem about mod_ruby has not been solved. I was thinking that that error because of apache. Anyways, I want to learn about how to compile new release. They create it, so they should have a way to compile it.

Smartpatrol 09-15-2009 11:21 PM

...

knudfl 09-16-2009 07:53 AM

Quote:

the problem about mod_ruby has not been solved
How do you know it hasn't been solved ? You never asked.

Googling .. httpd mod ruby ..
http://www.google.com/search?hl=da&s...ng&lr=&aq=&oq=
has : "mod_ruby Wiki (en) - Installing mod_ruby"
http://wiki.modruby.net/en/?InstallGuide
in the first or third hit.

And why ask for httpd-2.2.13, when you as well can rebuild
the version for CentOS 5.x = httpd-2.2.3 ?
http://mirror.centos.org/centos/5.3/...centos.src.rpm
> > httpd-2.2.3-22.el5.centos.src.rpm
.....


All times are GMT -5. The time now is 07:33 PM.