[FUGSPBR] iniciar apache

Renato Botelho rbgarga em gmail.com
Qui Out 7 08:35:08 BRT 2004


On Wed, 6 Oct 2004 16:51:17 -0300 (BRT), Mario Sergio Candian
<mscandian em freebsdbrasil.com.br> wrote:
> 
> Celso,
> 
> quando voce da um ./apache.sh start ele sobe? se sim, beleza... no caso
> voce teria que editar o apache.sh, e procurar por alguma linha que faz com
> que o apache suba no momento da inicializacao. Por padrao ele deixa essa
> opcao desabilitada.
> 
> # Add the following lines to /etc/rc.conf to enable apache2:
> # apache2_enable (bool):      Set to "NO" by default.
> #                             Set it to "YES" to enable apache2
> 
> Procure por alguma linha tipo esta abaixo, e onde estiver
> apache_enable="NO" mude para YES.
> 
> [ -z "$apache2_enable" ]       && apache2_enable="YES"
> 
> Ou entao, adicione a linha ao rc.conf.

A grande sacada do rcNG, eh você não precisar mais editar os arquivos
.sh no /usr/local/etc/rc.d, evitando assim problemas se o seu .sh for
substituido por outro na hora de atualizar o pacote.

O *ideal* é você adicionar a linha com a opção no /etc/rc.conf, lá
você vai conseguir não penas fazer seu pacote inicializar quando a
máquina bootar como também setar várias opções.

No caso do apache-13, quando você o instalou via ports, no final ele
exibiu essa mensagem

===>  BE CAREFULL HOW TO BOOT on 1.3.29_4 or after:
        To run apache www server from startup, add apache_enable="YES"
        in your /etc/rc.conf.

como você pode observar em /usr/ports/www/apache13/pkg-message.

No caso do 2.x, a mensagem foi essa

         ***********************************
         * !!!!!!!!!!! WARNING !!!!!!!!!!! *
         ***********************************
Since 2.0.49_2, to run apache www server from startup, add apache2_enable="YES"
in your /etc/rc.conf.
Available variables you add/set to /etc/rc.conf.
- apache2_enable (bool):      Set to "NO" by default.
                              Set it to "YES" to enable apache2.
- apache2ssl_enable (bool):   Set to "NO" by default.
                              Set it to "YES" to start apache with SSL
                              (if <IfDefined SSL> exists in httpd.conf).
- apache2limits_enable (bool):Set to "NO" by default.
                              Set it to yes to run `limits $limits_args`
                              just before apache starts.
- apache2_flags (str):        Set to "" by default.
                              Extra flags passed to start command.
- apache2limits_args (str):   Default to "-e -C daemon"
                              Arguments of pre-start limits run.

Como você pode conferir em /usr/ports/www/apache2/pkg-message

Procure sempre ler as mensagens que aparecem no final do make install
do ports, pois sempre que algo mudar, é ali ou no /usr/ports/UPDATING
que vai estar anotado.

[]´s
-- 
Renato Botelho
ICQ: 54596223
AIM: RBGargaBR
_______________________________________________________________
Para enviar um novo email para a lista: fugspbr em fugspbr.org
Sair da Lista: http://lists.fugspbr.org/listinfo.cgi
Historico: http://www4.fugspbr.org/lista/html/FUG-BR/



Mais detalhes sobre a lista de discussão freebsd