LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 09-05-2006, 06:51 AM   #1
fschaller
LQ Newbie
 
Registered: Sep 2006
Posts: 2

Rep: Reputation: 0
2 apache instances


Hi everybody!

I'm new to redhat and d'like to know, how to install 2 independent instances of apache (one with tomcat, the other one with php). I know that tomcat and php can run on the same instance, but it is a requirement of a customer.

Can I do this with rpm? Or do I have to compile the webserver with to different /prefix=?

Thank you very much.
Frederik
 
Old 09-05-2006, 07:05 AM   #2
zulfilee
Member
 
Registered: Apr 2004
Location: India
Distribution: Redhat,Fedora
Posts: 430

Rep: Reputation: 39
Get the tarball distribution of apache [rpm will be looking for the same location].

And install in two different locations.
That will not be very difficult,you will have to change the configuration file before installing to set u`r installation path.
 
Old 09-05-2006, 07:33 AM   #3
Samoth
Member
 
Registered: Apr 2005
Distribution: Exherbo
Posts: 474
Blog Entries: 1

Rep: Reputation: 32
Why do you have to have two seperate apache binarys installed? Why can't you just run the same binary twice with different options? Or am I missing something....
 
Old 09-05-2006, 07:53 AM   #4
zulfilee
Member
 
Registered: Apr 2004
Location: India
Distribution: Redhat,Fedora
Posts: 430

Rep: Reputation: 39
Ok that must be possible.

But you will have to tweak a bit isnt it?

Can you try this

Install apache through rpm

Copy the initialization file [/etc/init.d/httpd ] and in that change the configuration file $CONFFILE to point to some other new conf file you have created ]

The new conf file must have the port changed.

In my case it was
Listen 0.0.0.0:80

Change the port address to some other unused value.


Now try starting both

/etc/init.d/httpd
/etc/init.d/httpdnew

Httpd must run as two instances.

Note:
This may have problems like lock file created by the exe, pid file etc.But its worth a try.
 
Old 09-05-2006, 08:31 AM   #5
fschaller
LQ Newbie
 
Registered: Sep 2006
Posts: 2

Original Poster
Rep: Reputation: 0
Guys, thank you for your support!

Although the solution of Samoth is very interesting I should run two completly (maybe with different version in the future) apaches. So I try to install them into seperate directories. Does anyone know the rpm parameter for this (sorry, comming from gentoo; we use ebuilds not rpm packages ;-)).

Last edited by fschaller; 09-05-2006 at 08:33 AM.
 
Old 09-05-2006, 11:18 AM   #6
Samoth
Member
 
Registered: Apr 2005
Distribution: Exherbo
Posts: 474
Blog Entries: 1

Rep: Reputation: 32
If you are going to try and install apache into two directories try building the rpm from source using a .src.rpm and "rpmbuild". You can usually pass PREFIX parameters to it.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
svcadm: Pattern 'apache' doesn't match any instances xpucto Solaris / OpenSolaris 8 02-19-2006 07:30 AM
Multiple Apache instances on Debian solferino Debian 2 08-23-2005 08:44 AM
New instances of X? nagromo Linux - Software 2 04-16-2005 02:42 AM
why are there two instances of the kernel? denning Slackware 9 02-06-2005 11:19 AM
Two instances of Firefox? subnet_rx Linux - Software 3 07-17-2004 02:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 08:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration