> For the complete documentation index, see [llms.txt](https://software-telematica-com.gitbook.io/suricato-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://software-telematica-com.gitbook.io/suricato-docs/central-tecnica/instalacao-e-configuracao-do-suricato/instalacao-do-suricato/instalacao-e-atualizacao-do-apache.md).

# Instalação e Atualização do Apache

## Visão Geral

O Apache HTTP Server é o motor que processa as requisições do Suricato.

Manter este serviço atualizado e configurado corretamente garante que o sistema suporte o volume de acessos sem travamentos e utilize os recursos de segurança mais recentes do PHP.

O processo inclui:

* [Instalação do serviço Apache](#instalando-o-apache)
* [Desinstalação do serviço](#desinstalando-o-apache)
* [Atualização da versão do Apache](#atualizacao-do-apache)

## Regras de Negócio

* [x] **Linha Apache:** Utilize obrigatoriamente a linha 2.4.x (sempre a versão mais atual disponível).
* [x] **Versão PHP:** Para o Suricato 3.1.0, a migração para o PHP 8.5 é mandatória.

#### <mark style="color:$primary;">IMPORTANTE</mark> – Atualização para versão 3.1.0

Se você está atualizando o Suricato:

1. **Atualize obrigatoriamente na sequência:**
   * 3.0.0.0 → 3.0.0.25 → 3.1.0
2. Antes de instalar a versão 3.1.0:

* Atualize o Apache para uma versão recente (**2.4** atual)
* Atualize o PHP para **8.5**

#### Diferença entre versões (muito importante)

<table><thead><tr><th width="386.22222900390625">Cenário</th><th>O que fazer</th></tr></thead><tbody><tr><td>Ambiente antigo (PHP 8.1 / Apache antigo)</td><td>Siga todo o procedimento de atualização</td></tr><tr><td>Ambiente já atualizado (PHP 8.5 / Apache novo)</td><td>Ignore cópia de DLLs e validações antigas</td></tr><tr><td>Atualizando para 3.1.0</td><td>Atualize Apache + PHP antes</td></tr></tbody></table>

#### Regras críticas

* [x] Nem todos os módulos antigos existem na versão nova
* [x] Sempre valide o serviço após instalar

## Como instalar o serviço do Apache manualmente

Nome do serviço: **Telematica SURICATO**\
Nome interno: **TelematicaSURICATO**

{% stepper %}
{% step %}
Abra o Prompt de Comando como administrador (MS-DOS)
{% endstep %}

{% step %}
Acesse a pasta do Apache:&#x20;

```
cd C:\Program Files\Telematica\Suricato\apache\bin
```

{% endstep %}

{% step %}
Execute o comando abaixo para instalar o serviço:

```
httpd.exe -n "Telematica Suricato" -k install
```

<figure><img src="https://235558800-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fjphwa3C6HguhCU8RfNQR%2Fuploads%2F2sqhgptuTrEZeM80gxar%2Fimage.png?alt=media&amp;token=03e2cc11-0321-432a-9856-5771e904f1bd" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

## Como desinstalar o serviço manualmente

{% stepper %}
{% step %}
Abra o Prompt de Comando como administrador
{% endstep %}

{% step %}
Execute o comando:

```
sc delete TelematicaSURICATO
```

<figure><img src="https://235558800-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fjphwa3C6HguhCU8RfNQR%2Fuploads%2FJI6HWY7r6hESKeCIxAPY%2Fimage.png?alt=media&amp;token=824e8dc5-9c06-4d62-be0c-59e9cdd6431e" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

## FAQ – Perguntas Frequentes

<details>

<summary>Posso usar qualquer versão do Apache?</summary>

Não. Utilize apenas versões da linha 2.4 atualizadas.

</details>

<details>

<summary>Posso manter PHP 8.1?</summary>

Não. A versão 3.1.0.0 exige **PHP 8.5**.

</details>

<details>

<summary>Preciso copiar a DLL ssleay32.dll?</summary>

Não. Em versões atuais, isso pode causar erro. Utilize as DLLs da nova versão.

</details>

<details>

<summary>O Apache não inicia após atualizar. O que pode ser?</summary>

* Módulo incompatível
* DLL incorreta
* Porta ocupada
* Configuração inválida

</details>

<details>

<summary>Preciso copiar todos os módulos (LoadModule)?</summary>

Não necessariamente. Caso haja erro, remova módulos que não existem na nova versão.

</details>

<details>

<summary>Quando devo atualizar Apache e PHP?</summary>

Sempre que for atualizar para a versão **3.1.0.0 do Suricato**.

</details>

<details>

<summary>Posso reaproveitar configuração antiga?</summary>

Sim, mas apenas:

* caminhos (paths)
* configuração do PHP
* certificados

Não reaproveite:

* DLLs
* módulos incompatíveis

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://software-telematica-com.gitbook.io/suricato-docs/central-tecnica/instalacao-e-configuracao-do-suricato/instalacao-do-suricato/instalacao-e-atualizacao-do-apache.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
