Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Apache: Users

Dual apache2 installations: Ubuntu Package and Locally Built (All on a single server)

 

 

Apache users RSS feed   Index | Next | Previous | View Threaded


tom.browder at gmail

Aug 2, 2012, 2:53 PM

Post #1 of 6 (301 views)
Permalink
Dual apache2 installations: Ubuntu Package and Locally Built (All on a single server)

I have a good instance of apache2 running as an Ubuntu package on
Ubuntu 10.04 LTS (64-bit), but it's version 2.2.14.

I would like to use the latest Apache version and build it from
source. Has anyone tried setting up a locally-built version of Apache
so as to be able to switch easily between the default
package-installed one and the locally-built one? If so, I would
appreciate any hints, pointers, or "gotchas."

Note the requirement for one server. And I don't want to run them
simultaneously, just be able to switch easily between the two. I
think I can somehow make the switch by making a copy of the
"/etc/init.d/apache2" script and call it, say, "/etc/init.d/apache2.2"
and edit it to run #2 installation. Then I rename the existing
"/etc/init.d/apache2" to "/etc/init.d/apache2.1". Then I switch
between the two by:

# apache2ctl stop
# cd /etc/init.d
# ln -sf apache2.1 apache2

or

# ln -sf apache2.2 apache2

and

# apache2ctl start

Of course the devil is in the details as there are some differences in
the default Apache2 set up (although with the Apache2 build
instructions we see that we can choose configure option "
--enable-layout=ID" where ID is "Debian").

The "Debian" option should make the situation somewhat easier, BUT,
will it overwrite existing configuration files? It's not supposed to,
but has anyone tried to do this?

Best regards,

-Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe [at] httpd
For additional commands, e-mail: users-help [at] httpd


tom.browder at gmail

Aug 2, 2012, 3:11 PM

Post #2 of 6 (288 views)
Permalink
Re: Dual apache2 installations: Ubuntu Package and Locally Built (All on a single server) [In reply to]

On Thu, Aug 2, 2012 at 4:53 PM, Tom Browder <tom.browder [at] gmail> wrote:
> I have a good instance of apache2 running as an Ubuntu package on
> Ubuntu 10.04 LTS (64-bit), but it's version 2.2.14.
...

I should have noted that the locally-installed Apache2 will be built
with the configure option "PREFIX=/opt/apache2".

-Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe [at] httpd
For additional commands, e-mail: users-help [at] httpd


raubvogel at gmail

Aug 2, 2012, 3:35 PM

Post #3 of 6 (285 views)
Permalink
Re: Dual apache2 installations: Ubuntu Package and Locally Built (All on a single server) [In reply to]

On Thu, Aug 2, 2012 at 5:53 PM, Tom Browder <tom.browder [at] gmail> wrote:
> I have a good instance of apache2 running as an Ubuntu package on
> Ubuntu 10.04 LTS (64-bit), but it's version 2.2.14.
>
> I would like to use the latest Apache version and build it from
> source. Has anyone tried setting up a locally-built version of Apache
> so as to be able to switch easily between the default
> package-installed one and the locally-built one? If so, I would
> appreciate any hints, pointers, or "gotchas."
>
> Note the requirement for one server. And I don't want to run them
> simultaneously, just be able to switch easily between the two. I
> think I can somehow make the switch by making a copy of the
> "/etc/init.d/apache2" script and call it, say, "/etc/init.d/apache2.2"
> and edit it to run #2 installation. Then I rename the existing
> "/etc/init.d/apache2" to "/etc/init.d/apache2.1". Then I switch
> between the two by:
>
> # apache2ctl stop
> # cd /etc/init.d
> # ln -sf apache2.1 apache2
>
> or
>
> # ln -sf apache2.2 apache2
>
> and
>
> # apache2ctl start
>
> Of course the devil is in the details as there are some differences in
> the default Apache2 set up (although with the Apache2 build
> instructions we see that we can choose configure option "
> --enable-layout=ID" where ID is "Debian").
>
> The "Debian" option should make the situation somewhat easier, BUT,
> will it overwrite existing configuration files? It's not supposed to,
> but has anyone tried to do this?
>
IMHO, if you are building apache from source, you should be able
to tell it to use a different location not only for its binaries but
also for its config files. At least that is what I have done with,
say, openldap before. Do configure -h (I think) and check the options
to specify where you want it to install itself.

Then you just write a quick startup script for this new apache; if you
need I might have something you can use for ideas.

Better yet: disable the original script from starting up at boot time
and then create a script that allows you to call either the
ubuntu-installed or your compiled apache (from what I ready you are
going to run one or the other, not both at the same time). The script
to run your compiled apache could specifically pass the config file it
will use (say, /opt/apache/conf/apache.conf or whatever).

> Best regards,
>
> -Tom
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe [at] httpd
> For additional commands, e-mail: users-help [at] httpd
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe [at] httpd
For additional commands, e-mail: users-help [at] httpd


tom.browder at gmail

Aug 2, 2012, 6:45 PM

Post #4 of 6 (280 views)
Permalink
Re: Dual apache2 installations: Ubuntu Package and Locally Built (All on a single server) [In reply to]

On Thu, Aug 2, 2012 at 5:35 PM, Mauricio Tavares <raubvogel [at] gmail> wrote:
> On Thu, Aug 2, 2012 at 5:53 PM, Tom Browder <tom.browder [at] gmail> wrote:
...
>> The "Debian" option should make the situation somewhat easier, BUT,
>> will it overwrite existing configuration files? It's not supposed to,
>> but has anyone tried to do this?
>>
...
> IMHO, if you are building apache from source, you should be able
> to tell it to use a different location not only for its binaries but
> also for its config files. At least that is what I have done with,
> say, openldap before. Do configure -h (I think) and check the options
> to specify where you want it to install itself.
>
> Then you just write a quick startup script for this new apache; if you
> need I might have something you can use for ideas.

Thanks, Marcio--good idea.

I'll call for help if I get stuck.

Best regards,

-Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe [at] httpd
For additional commands, e-mail: users-help [at] httpd


john.iliffe at iliffe

Aug 3, 2012, 8:05 AM

Post #5 of 6 (278 views)
Permalink
Re: Dual apache2 installations: Ubuntu Package and Locally Built (All on a single server) [In reply to]

One gotcha you may run into, some .conf parameters have changed.

You can't just copy the old 2.2.x .conf file over to 2.4.x without
checking. Since some of the changes occurred in various levels of 2.2
they aren't all referenced in the migration notes.

Been there, done that, got the bruises to prove it!

John
=============================================================
On 02/08/12 09:45 PM, Tom Browder wrote:
> On Thu, Aug 2, 2012 at 5:35 PM, Mauricio Tavares<raubvogel [at] gmail> wrote:
>> On Thu, Aug 2, 2012 at 5:53 PM, Tom Browder<tom.browder [at] gmail> wrote:
> ...
>>> The "Debian" option should make the situation somewhat easier, BUT,
>>> will it overwrite existing configuration files? It's not supposed to,
>>> but has anyone tried to do this?
>>>
> ...
>> IMHO, if you are building apache from source, you should be able
>> to tell it to use a different location not only for its binaries but
>> also for its config files. At least that is what I have done with,
>> say, openldap before. Do configure -h (I think) and check the options
>> to specify where you want it to install itself.
>>
>> Then you just write a quick startup script for this new apache; if you
>> need I might have something you can use for ideas.
>
> Thanks, Marcio--good idea.
>
> I'll call for help if I get stuck.
>
> Best regards,
>
> -Tom
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe [at] httpd
> For additional commands, e-mail: users-help [at] httpd
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe [at] httpd
For additional commands, e-mail: users-help [at] httpd


tom.browder at gmail

Aug 3, 2012, 9:37 AM

Post #6 of 6 (277 views)
Permalink
Re: Dual apache2 installations: Ubuntu Package and Locally Built (All on a single server) [In reply to]

On Fri, Aug 3, 2012 at 10:05 AM, John <john.iliffe [at] iliffe> wrote:
> One gotcha you may run into, some .conf parameters have changed.
>
> You can't just copy the old 2.2.x .conf file over to 2.4.x without checking.
> Since some of the changes occurred in various levels of 2.2 they aren't all
> referenced in the migration notes.
>
> Been there, done that, got the bruises to prove it!

Thanks for the heads up, John.

Best regards,

-Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe [at] httpd
For additional commands, e-mail: users-help [at] httpd

Apache users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.