1 |
Maik Musall wrote: |
2 |
> Hello, |
3 |
> |
4 |
> I find it difficult to minimize service downtime for things like apache |
5 |
> when the package is to be updated. If I stop the service before |
6 |
> emerging, downtime is longer than necessary since during the compile |
7 |
> stage it could stay running. On the other hand, when I don't stop the |
8 |
> service before emerge exchanges the binaries, things can become unstable |
9 |
> (initscripts reporting service running but it isn't, or vice versa, |
10 |
> segfaulting running binaries...). |
11 |
> |
12 |
> Ideal would be an emerge option that asks back for confirmation just |
13 |
> before exchanging files. But that doesn't seem to exist. |
14 |
> |
15 |
> How do you handle this problem? |
16 |
|
17 |
emerge -B apache && /etc/init.d/apache stop && emerge -1k apache && etc-update |
18 |
&& /etc/init.d/apache start |
19 |
|
20 |
This builds a binary package of the updated apache, stops apache, installs the |
21 |
binary, updates config files, and then starts apache again. This results in the |
22 |
minimal amount of downtime. |
23 |
|
24 |
-- |
25 |
Andrew Gaffney http://dev.gentoo.org/~agaffney/ |
26 |
Gentoo Linux Developer Installer Project |
27 |
|
28 |
-- |
29 |
gentoo-server@g.o mailing list |