Created
February 20, 2024 18:27
-
-
Save isaqueprofeta/7e9bec46d9911a4489a773b69791e862 to your computer and use it in GitHub Desktop.
Instalação OpenCTI com Docker no Ubuntu 22.04
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# DEFINA AS CREDENCIAIS E CUSTOMIZACOES AQUI | |
export OPENCTI_BASE_URL="http://localhost:8080" | |
export OPENCTI_ADMIN_EMAIL="[email protected]" | |
export OPENCTI_ADMIN_PASSWORD="ChangeMePlease" | |
export RABBITMQ_DEFAULT_USER="guest" | |
export RABBITMQ_DEFAULT_PASS="guest" | |
export SMTP_HOSTNAME="localhost" | |
export ELASTIC_MEMORY_SIZE="4G" | |
# Opções de memória de SO para o módulo de elasticsearch | |
sudo sysctl -w vm.max_map_count=1048575 | |
vm.max_map_count=1048575 | |
# Instalação do software básico | |
$ sudo apt-get update | |
$ sudo apt-get install \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
software-properties-common \ | |
git | |
# Instalação do docker | |
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
$ sudo add-apt-repository \ | |
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \ | |
$(lsb_release -cs) \ | |
stable" | |
$ sudo apt-get update | |
$ sudo apt-get install docker-ce docker-compose | |
# Copiar arquivos do OpenCTI | |
$ git clone https://github.com/OpenCTI-Platform/docker.git /opt/opencit | |
$ cd /opt/opencit | |
# Gerar configuração .env | |
$ (cat << EOF | |
OPENCTI_BASE_URL=$OPENCTI_BASE_URL | |
OPENCTI_ADMIN_EMAIL=$OPENCTI_ADMIN_EMAIL | |
OPENCTI_ADMIN_PASSWORD=$OPENCTI_ADMIN_PASSWORD | |
RABBITMQ_DEFAULT_USER=$RABBITMQ_DEFAULT_USER | |
RABBITMQ_DEFAULT_PASS=$RABBITMQ_DEFAULT_PASS | |
SMTP_HOSTNAME=$SMTP_HOSTNAME | |
ELASTIC_MEMORY_SIZE=$ELASTIC_MEMORY_SIZE | |
OPENCTI_ADMIN_TOKEN=$(cat /proc/sys/kernel/random/uuid) | |
MINIO_ROOT_USER=$(cat /proc/sys/kernel/random/uuid) | |
MINIO_ROOT_PASSWORD=$(cat /proc/sys/kernel/random/uuid) | |
CONNECTOR_HISTORY_ID=$(cat /proc/sys/kernel/random/uuid) | |
CONNECTOR_EXPORT_FILE_STIX_ID=$(cat /proc/sys/kernel/random/uuid) | |
CONNECTOR_EXPORT_FILE_CSV_ID=$(cat /proc/sys/kernel/random/uuid) | |
CONNECTOR_IMPORT_FILE_STIX_ID=$(cat /proc/sys/kernel/random/uuid) | |
CONNECTOR_EXPORT_FILE_TXT_ID=$(cat /proc/sys/kernel/random/uuid) | |
CONNECTOR_IMPORT_DOCUMENT_ID=$(cat /proc/sys/kernel/random/uuid) | |
EOF | |
) > .env | |
# Iniciar o ambiente | |
docker-compose up -d |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment