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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 2, 2012 at 5:53 PM, Tom Browder <tom.browder@xxxxxxxxx> 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@xxxxxxxxxxxxxxxx
> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux