From b5c15a249501561e992d2877208f254ddf7feb41 Mon Sep 17 00:00:00 2001 From: Nathan Genret Date: Thu, 7 Nov 2024 15:52:43 +0100 Subject: [PATCH] =?UTF-8?q?=09nouveau=20fichier=C2=A0:=20ap32-prod/journal?= =?UTF-8?q?isation/journald-dst.sh=20=09nouveau=20fichier=C2=A0:=20ap32-pr?= =?UTF-8?q?od/journalisation/journald-rcv.sh=20=09modifi=C3=A9=C2=A0:=20?= =?UTF-8?q?=20=20=20=20=20=20=20=20ap32-test/README.md=20=09nouveau=20fich?= =?UTF-8?q?ier=C2=A0:=20ap32-test/journalisation/journald-dst.sh=20=09nouv?= =?UTF-8?q?eau=20fichier=C2=A0:=20ap32-test/journalisation/journald-rcv.sh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ap32-prod/journalisation/journald-dst.sh | 8 ++++++++ ap32-prod/journalisation/journald-rcv.sh | 13 +++++++++++++ ap32-test/README.md | 13 ++++++++++++- ap32-test/journalisation/journald-dst.sh | 8 ++++++++ ap32-test/journalisation/journald-rcv.sh | 13 +++++++++++++ 5 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 ap32-prod/journalisation/journald-dst.sh create mode 100644 ap32-prod/journalisation/journald-rcv.sh create mode 100644 ap32-test/journalisation/journald-dst.sh create mode 100644 ap32-test/journalisation/journald-rcv.sh diff --git a/ap32-prod/journalisation/journald-dst.sh b/ap32-prod/journalisation/journald-dst.sh new file mode 100644 index 0000000..60cde56 --- /dev/null +++ b/ap32-prod/journalisation/journald-dst.sh @@ -0,0 +1,8 @@ +#!/bin/bash +sudo timedatectl set-timezone Europe/Paris +sudo apt-get update +sudo apt-get install -y systemd-journal-remote +rpl="s/^# URL=/URL=http:\/\/ap32-mon:19532/" +sudo sed -i "$rpl" /etc/systemd/journal-upload.conf +sudo systemctl enable --now systemd-journal-upload.service +sudo systemctl restart systemd-journal-upload.service diff --git a/ap32-prod/journalisation/journald-rcv.sh b/ap32-prod/journalisation/journald-rcv.sh new file mode 100644 index 0000000..673b692 --- /dev/null +++ b/ap32-prod/journalisation/journald-rcv.sh @@ -0,0 +1,13 @@ +#!/bin/bash +sudo timedatectl set-timezone Europe/Paris +sudo apt-get update +sudo apt-get install -y systemd-journal-remote +sudo systemctl enable --now systemd-journal-remote.socket +sudo cp /lib/systemd/system/systemd-journal-remote.service /etc/systemd/system +sudo sed -i 's/--listen-https=-3/--listen-http=-3/' /etc/systemd/system/systemd-journal-remote.service +[[ -d /var/log/journal/remote ]] || sudo mkdir /var/log/journal/remote +sudo chown systemd-journal-remote /var/log/journal/remote +sudo systemctl daemon-reload +sudo systemctl restart systemd-journal-remote.service + ss -lnt + diff --git a/ap32-test/README.md b/ap32-test/README.md index 15ae486..f228b3e 100644 --- a/ap32-test/README.md +++ b/ap32-test/README.md @@ -1,2 +1,13 @@ -# sdis29-2 + ### AP32-Test ### + * Création des serveurs ap31-prod et ap31-test via un clone intégral d'une template debian 12.7 KVM sur pxlab2. + +## Matériel: + + * Mémoire : 1G + * Disques redimensionnés de 2Go a 10Go. + * Définition de l'adresses IP et ajout des clé publique pour la connexion a la machine + +** Paquets: + + * diff --git a/ap32-test/journalisation/journald-dst.sh b/ap32-test/journalisation/journald-dst.sh new file mode 100644 index 0000000..60cde56 --- /dev/null +++ b/ap32-test/journalisation/journald-dst.sh @@ -0,0 +1,8 @@ +#!/bin/bash +sudo timedatectl set-timezone Europe/Paris +sudo apt-get update +sudo apt-get install -y systemd-journal-remote +rpl="s/^# URL=/URL=http:\/\/ap32-mon:19532/" +sudo sed -i "$rpl" /etc/systemd/journal-upload.conf +sudo systemctl enable --now systemd-journal-upload.service +sudo systemctl restart systemd-journal-upload.service diff --git a/ap32-test/journalisation/journald-rcv.sh b/ap32-test/journalisation/journald-rcv.sh new file mode 100644 index 0000000..673b692 --- /dev/null +++ b/ap32-test/journalisation/journald-rcv.sh @@ -0,0 +1,13 @@ +#!/bin/bash +sudo timedatectl set-timezone Europe/Paris +sudo apt-get update +sudo apt-get install -y systemd-journal-remote +sudo systemctl enable --now systemd-journal-remote.socket +sudo cp /lib/systemd/system/systemd-journal-remote.service /etc/systemd/system +sudo sed -i 's/--listen-https=-3/--listen-http=-3/' /etc/systemd/system/systemd-journal-remote.service +[[ -d /var/log/journal/remote ]] || sudo mkdir /var/log/journal/remote +sudo chown systemd-journal-remote /var/log/journal/remote +sudo systemctl daemon-reload +sudo systemctl restart systemd-journal-remote.service + ss -lnt +