documentation/services/minetest.libre-service.eu.md

123 lines
3.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Minetest
# Installation
Ouvrir les ports nécessaires :
```
iptables -A INPUT -i $WAN -p udp --dport 30000 -j ACCEPT
```
Installer le serveur Minetest :
```
apt-get install minetest-server minetestmapper
```
# Mineclone2
## Install
Récupérer le zip :
* https://content.minetest.net/packages/Wuzzy/mineclone2/
* cliquer sur le bouton `Download`
Décompresser :
```
unzip mineclone2_6745.zip
```
Ranger dans l'arborescence de Minetest :
```
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
```
Éditer le fichier de configuration `/etc/minetest/fooland.conf` :
```
- server_name = My Minetest server
+ server_name = LibreServiceEU Mineclone2 Fooland
- server_description = Minetest server powered by Debian
+ server_description = Mineclone2 en libre-service sur LibreServiceEU
- server_address = minetest.libre-service.eu
+ server_url = https://minetest.libre-service.eu/
- default_game = minetest
+ default_game = mineclone2
- 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
- enable_damage = false
+ enable_damage = true
- # disallow_empty_password = false
+ 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.
Créer un compte Postgreql :
```
su - postgres 'psql -c "CREATE DATABASE minetestdb-fooland OWNER minetestdba; GRANT ALL PRIVILEGES ON DATABASE minetestdb-fooland TO minetestdba;"'
```
Optimiser Postgresql :
- en modifiant `/etc/postgresql/13/main/postgresql.conf` :
```
-shared_buffers = 128MB # min 128kB
+shared_buffers = 512MB # min 128kB
```
- avoir au moins 512MB de mémoire disponible pour Minetest hors Postgresql.
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=minetestdba password=XXXXX dbname=minetestdb-fooland
auth_backend = postgresql
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=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 start minetest-server@fooland.service
```
## Jouer
Liens utiles :
- Mineclon2 : https://wiki.minetest.net/Games/MineClone_2/Differences_from_Minetest_Game
- Database backends : https://wiki.minetest.net/Database_backends
- Server commands : https://wiki.minetest.net/Server_commands
- Item strings : https://wiki.minetest.net/Itemstrings
- Privileges : https://wiki.minetest.net/Privilegesc