LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   How to build httpd-2.2.3-22 as a relocatable rpm package in RHEL 5.3 (https://www.linuxquestions.org/questions/linux-server-73/how-to-build-httpd-2-2-3-22-as-a-relocatable-rpm-package-in-rhel-5-3-a-763660/)

renjunix 10-22-2009 04:26 AM

How to build httpd-2.2.3-22 as a relocatable rpm package in RHEL 5.3
 
Hi Linux Experts,

Greetings to all. I'm a new member to this forum.

I’m looking forward to get the steps on How to build httpd-2.2.3-22 as a relocatable rpm package? I'm working on customizing RHEL 5.3.

I need to install Apache httpd-2.2.3-22 with supported versions of mod_ssl 2.2.3, mod_python (version 3.3.1), mod_perl 2.0.4, and mod_jk.
The most important thing is that we need to install all these applications under a different path like /abc/xyz_apps/, not under the default installation path. App configuration files must be under /abc/xyz_apps_config/
I changed the default path for --prefix option in httpd.spec file as follows
../configure \
--prefix=/abc
Then, I rebuilt the package using rpmbuild –bb httpd.spec.
Httpd is still not relocatable, even though I made a few changes to httpd.spec file and rebuilt the same.
1. Changed the default path to --prefix=/abc \
2. Added if statement to check whether the directory exists before removing $RPM_BUILD_ROOT%{_sysconfdir}/httpd/logs
3. Rebuilt the package successfully using rpmbuild –bb httpd.spec
4. Tried to install using rpm -ivh --prefix /abc/xyz_apps/apache/2.2.3 httpd-2.2.3-22.x86_64.rpm. However it failed with error: "package httpd is not relocatable"

Any help on this is appreciated.
Thanks and Regards,

Renju.

AlucardZero 10-23-2009 06:42 AM

http://rpm5.org/docs/api/relocatable.html

renjunix 11-02-2009 03:40 AM

Quote:

Originally Posted by AlucardZero (Post 3729702)


Hi AlucardZero,

Thank for your reply. I had already tried those things. However, I'm still trying to figure out how this specific package can be made relocatable.

Thanks and Regards,
Renju.

AlucardZero 11-02-2009 09:04 AM

put one or more:

Code:

  Prefix: <dir>
in your spec file? Not sure what the problem is?


All times are GMT -5. The time now is 10:57 PM.