Skip to content

Instantly share code, notes, and snippets.

@djamp42
Created July 1, 2023 03:23
Show Gist options
  • Save djamp42/806cc4ba05e9f3a3c63024410b23c269 to your computer and use it in GitHub Desktop.
Save djamp42/806cc4ba05e9f3a3c63024410b23c269 to your computer and use it in GitHub Desktop.
Graylog 5.1 Install on Ubuntu 22.04 LTS
sudo nano /etc/graylog/server/server.conf
echo -n "Enter Password: " && head -1 </dev/stdin | tr -d '\n' | sha256sum | cut -d" " -f1
root_password_sha2 =
< /dev/urandom tr -dc A-Z-a-z-0-9 | head -c${1:-96};echo;
password_secret =
http_bind_address = 0.0.0.0
wget https://packages.graylog2.org/repo/packages/graylog-5.1-repository_latest.deb
sudo dpkg -i graylog-5.1-repository_latest.deb
sudo apt-get update
sudo apt-get install -y graylog-server
!!!!! STOP HERE AND CONFIG GRAYLOG PASSWORDS !!!!
sudo systemctl daemon-reload
sudo systemctl enable graylog-server.service
sudo systemctl start graylog-server.service
sudo systemctl status graylog-server.service
sudo apt-get install gnupg
curl -fsSL https://pgp.mongodb.com/server-6.0.asc | sudo gpg -o /usr/share/keyrings/mongodb-server-6.0.gpg --dearmor
echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-6.0.gpg ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list
sudo apt-get update
sudo apt-get install -y mongodb-org
sudo systemctl daemon-reload
sudo systemctl enable mongod.service
sudo systemctl start mongod.service
sudo systemctl status mongod.service
sudo apt-get -y install lsb-release ca-certificates curl gnupg2
curl -o- https://artifacts.opensearch.org/publickeys/opensearch.pgp | sudo gpg --dearmor --batch --yes -o /usr/share/keyrings/opensearch-keyring
echo "deb [signed-by=/usr/share/keyrings/opensearch-keyring] https://artifacts.opensearch.org/releases/bundle/opensearch/2.x/apt stable main" | sudo tee /etc/apt/sources.list.d/opensearch-2.x.list
sudo apt-get update
sudo apt-get install -y opensearch
sudo systemctl daemon-reload
sudo systemctl enable opensearch.service
sudo systemctl start opensearch.service
sudo systemctl status opensearch.service
cluster.name: graylog
node.name: ${HOSTNAME}
path.data: /var/lib/opensearch
path.logs: /var/log/opensearch
discovery.type: single-node
network.host: 0.0.0.0
action.auto_create_index: false
plugins.security.disabled: true
@josepfz
Copy link

josepfz commented Feb 21, 2024

mmgvo , porque me da puto error al instalarlo en una maquina virtual Ubuntu 22
jfz@ubuntusrv-jfz:~$ sudo systemctl status mongod.service

× mongod.service - MongoDB Database Server

 Loaded: loaded (/lib/systemd/system/mongod.service; enabled; vendor preset: enabled)

 Active: failed (Result: core-dump) since Wed 2024-02-21 12:32:57 UTC; 6s ago

   Docs: https://docs.mongodb.org/manual

Process: 9561 ExecStart=/usr/bin/mongod --config /etc/mongod.conf (code=dumped, signal=ILL)

Main PID: 9561 (code=dumped, signal=ILL)

    CPU: 11ms

feb 21 12:32:56 ubuntusrv-jfz systemd[1]: Started MongoDB Database Server.

feb 21 12:32:57 ubuntusrv-jfz systemd[1]: mongod.service: Main process exited, code=dumped, status=4/ILL

feb 21 12:32:57 ubuntusrv-jfz systemd[1]: mongod.service: Failed with result 'core-dump'.

jfz@ubuntusrv-jfz:~$

@JcCarmichael13
Copy link

mmgvo , porque me da puto error al instalarlo en una maquina virtual Ubuntu 22 jfz@ubuntusrv-jfz:~$ sudo systemctl status mongod.service

× mongod.service - MongoDB Database Server

 Loaded: loaded (/lib/systemd/system/mongod.service; enabled; vendor preset: enabled)

 Active: failed (Result: core-dump) since Wed 2024-02-21 12:32:57 UTC; 6s ago

   Docs: https://docs.mongodb.org/manual

Process: 9561 ExecStart=/usr/bin/mongod --config /etc/mongod.conf (code=dumped, signal=ILL)

Main PID: 9561 (code=dumped, signal=ILL)

    CPU: 11ms

feb 21 12:32:56 ubuntusrv-jfz systemd[1]: Started MongoDB Database Server.

feb 21 12:32:57 ubuntusrv-jfz systemd[1]: mongod.service: Main process exited, code=dumped, status=4/ILL

feb 21 12:32:57 ubuntusrv-jfz systemd[1]: mongod.service: Failed with result 'core-dump'.

jfz@ubuntusrv-jfz:~$

I ran into this too. The cause was in a VM, AVX instruction set needs to be passed through from the host OS. If your CPU type is showing "common KVM processor", then that is the issue you are facing.

@TheLinuxGuy
Copy link

Newer mongo 7.0 is getting installed using your commands above. I had to tweak the install and force the v6 like this

apt-get install -y mongodb-org=6.0.14 mongodb-org-database=6.0.14 mongodb-org-server=6.0.14 mongodb-mongosh=1.8.2 mongodb-org-mongos=6.0.14 mongodb-org-tools=6.0.14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment