From 04fb5f0a82e27b64c6c3a0801f7ef3421b3e9fbe Mon Sep 17 00:00:00 2001 From: "Christian P. MOMON" Date: Sat, 20 Nov 2021 04:12:10 +0100 Subject: [PATCH] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'services/minetest.?= =?UTF-8?q?libre-service.eu.md'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- services/minetest.libre-service.eu.md | 47 +++++++++++++++------------ 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/services/minetest.libre-service.eu.md b/services/minetest.libre-service.eu.md index e6e9061..bb46bbd 100644 --- a/services/minetest.libre-service.eu.md +++ b/services/minetest.libre-service.eu.md @@ -30,6 +30,7 @@ mv mineclone2 /usr/share/games/minetest/games/ ``` ## Création d'un monde + Créer un fichier de configuration vierge : ``` cp /etc/minetest/minetest.conf /etc/minetest/fooland.conf @@ -52,6 +53,9 @@ cp /etc/minetest/minetest.conf /etc/minetest/fooland.conf - motd = Welcome to Minetest. Enjoy your stay! + motd = Bienvenue sur le Minetest de Libre-service.eu \o/ +-# map-dir = ++map-dir = /srv/minetest.libre-service.eu/worlds/fooland + - max_users = 15 + max_users = 64 @@ -62,29 +66,20 @@ cp /etc/minetest/minetest.conf /etc/minetest/fooland.conf + disallow_empty_password = true ``` +Créer le dossier des mondes dans l'espace du service : +``` +mkdir -p /srv/minetest.libre-service.eu/worlds +``` + Créer le nouveau monde : ``` systemctl start minetest-server@fooland.service ``` Tester le nouveau monde en se connectant avec un client Minetest. -Déplacer les fichiers du nouveau monde dans l'espace de travail du service : +Créer un compte Postgreql : ``` -systemctl stop minetest-server@fooland.service -mkdir -p /srv/minetest.libre-service.eu/worlds -mv /var/games/minetest-server/.minetest/worlds/world /srv/minetest.libre-service.eu/worlds/ -``` - -Indiquer dans nouveau chemin dans le fichier de configuration ̀/etc/minetest/fooland.conf` : -``` --# map-dir = -+map-dir = /srv/minetest.libre-service.eu/worlds/fooland -``` - -Migrer le nouveau monde vers le backend Postgres : -``` -systemctl stop minetest-server@fooland.service -minetestserver --migrate postgresql --world /srv/minetest.libre-service.eu/worlds/fooland +su - postgres 'psql -c "CREATE DATABASE minetestdb OWNER minetestdba; GRANT ALL PRIVILEGES ON DATABASE minetestdb TO minetestdba;"' ``` Optimiser Postgresql : @@ -95,18 +90,28 @@ Optimiser Postgresql : ``` - avoir au moins 512MB de mémoire disponible pour Minetest hors Postgresql. -Vérifier les réglages du backend dans `/TODO` : +Définir la base de données dans `/srv/minetest.libre-service.eu/worlds/fooland/world.mt` : ``` backend = postgresql -pgsql_connection = host=127.0.0.1 port=5432 user=minetest password=XXXXX dbname=minetest-fooland-db +pgsql_connection = host=127.0.0.1 port=5432 user=minetestdba password=XXXXX dbname=minetestdb-fooland auth_backend = postgresql -pgsql_auth_connection = host=127.0.0.1 port=5432 user=minetest password=XXXXXX dbname=minetest-fooland-auth +pgsql_auth_connection = host=127.0.0.1 port=5432 user=minetestdba password=XXXXXX dbname=minetestdb-fooland player_backend = postgresql -pgsql_player_connection = host=127.0.0.1 port=5432 user=minetest password=XXXXXX dbname=minetest-fooland-users +pgsql_player_connection = host=127.0.0.1 port=5432 user=minetestdba password=XXXXXX dbname=minetestdb-fooland +``` + +Migrer le nouveau monde vers le backend Postgres : +``` +systemctl stop minetest-server@fooland.service +minetestserver --migrate postgresql --world /srv/minetest.libre-service.eu/worlds/fooland +minetestserver --migrate-auth postgresql --world /srv/minetest.libre-service.eu/worlds/fooland +minetestserver --migrate-players postgresql --world /srv/minetest.libre-service.eu/worlds/fooland +systemctl stop minetest-server@fooland.service ``` -## Play + +## Jouer Information about Mineclone2 : https://wiki.minetest.net/Games/MineClone_2/Differences_from_Minetest_Game