2021-11-03 01:49:27 +01:00
|
|
|
|
# Minetest
|
|
|
|
|
|
2021-11-03 02:14:32 +01:00
|
|
|
|
# Installation
|
|
|
|
|
|
2021-11-20 13:34:08 +01:00
|
|
|
|
Ouvrir le port par défaut :
|
2021-11-17 00:42:53 +01:00
|
|
|
|
```
|
2021-11-19 20:11:56 +01:00
|
|
|
|
iptables -A INPUT -i $WAN -p udp --dport 30000 -j ACCEPT
|
2021-11-17 00:42:53 +01:00
|
|
|
|
```
|
|
|
|
|
|
2021-11-03 01:49:27 +01:00
|
|
|
|
Installer le serveur Minetest :
|
|
|
|
|
```
|
|
|
|
|
apt-get install minetest-server minetestmapper
|
|
|
|
|
```
|
|
|
|
|
|
2021-11-21 03:52:07 +01:00
|
|
|
|
Pour privilégier le nommage des mondes, désactiver le monde par défaut :
|
|
|
|
|
```
|
|
|
|
|
systemctl stop minetest-server
|
|
|
|
|
systemctl disabled minetest-server
|
|
|
|
|
systemctl disabled minetest-server@minetest
|
|
|
|
|
```
|
|
|
|
|
|
2021-11-21 03:55:04 +01:00
|
|
|
|
Optimiser la configuration de Postgresql :
|
|
|
|
|
- avoir au moins 512MB de mémoire disponible pour Minetest hors Postgresql ;
|
|
|
|
|
- modifier `/etc/postgresql/13/main/postgresql.conf` :
|
|
|
|
|
```
|
|
|
|
|
-shared_buffers = 128MB # min 128kB
|
|
|
|
|
+shared_buffers = 512MB # min 128kB
|
|
|
|
|
```
|
|
|
|
|
|
2021-11-03 02:14:32 +01:00
|
|
|
|
# Mineclone2
|
|
|
|
|
|
2021-11-17 00:42:53 +01:00
|
|
|
|
## Install
|
2021-11-03 02:14:32 +01:00
|
|
|
|
Récupérer le zip :
|
|
|
|
|
* https://content.minetest.net/packages/Wuzzy/mineclone2/
|
|
|
|
|
* cliquer sur le bouton `Download`
|
2021-11-17 00:42:53 +01:00
|
|
|
|
|
|
|
|
|
Décompresser :
|
2021-11-17 00:44:06 +01:00
|
|
|
|
```
|
2021-11-17 00:42:53 +01:00
|
|
|
|
unzip mineclone2_6745.zip
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Ranger dans l'arborescence de Minetest :
|
|
|
|
|
```
|
|
|
|
|
mv mineclone2 /usr/share/games/minetest/games/
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Création d'un monde
|
2021-11-20 04:12:10 +01:00
|
|
|
|
|
2021-11-20 13:34:08 +01:00
|
|
|
|
Choisir un port et l'ouvrir :
|
|
|
|
|
```
|
|
|
|
|
iptables -A INPUT -i $WAN -p udp --dport 3000X -j ACCEPT
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Créer un fichier de configuration élémentaire :
|
2021-11-17 00:42:53 +01:00
|
|
|
|
```
|
|
|
|
|
cp /etc/minetest/minetest.conf /etc/minetest/fooland.conf
|
|
|
|
|
```
|
2021-11-19 20:11:56 +01:00
|
|
|
|
|
2021-11-20 03:51:36 +01:00
|
|
|
|
Éditer le fichier de configuration `/etc/minetest/fooland.conf` :
|
2021-11-19 20:11:56 +01:00
|
|
|
|
```
|
|
|
|
|
- server_name = My Minetest server
|
2021-11-20 11:49:10 +01:00
|
|
|
|
+ server_name = LibreServiceEU – Mineclone2 – Fooland
|
2021-11-19 20:11:56 +01:00
|
|
|
|
|
|
|
|
|
- server_description = Minetest server powered by Debian
|
|
|
|
|
+ server_description = Mineclone2 en libre-service sur LibreServiceEU
|
|
|
|
|
|
2021-11-20 13:34:08 +01:00
|
|
|
|
-# server_address = game.minetest.net
|
|
|
|
|
+ server_address = minetest.libre-service.eu
|
|
|
|
|
|
|
|
|
|
-# server_url = http://minetest.net
|
2021-11-19 20:11:56 +01:00
|
|
|
|
+ server_url = https://minetest.libre-service.eu/
|
|
|
|
|
|
2021-11-20 13:34:08 +01:00
|
|
|
|
-port = 30000
|
|
|
|
|
+port = 3000X
|
|
|
|
|
|
2021-11-19 20:11:56 +01:00
|
|
|
|
- default_game = minetest
|
2021-11-20 03:15:31 +01:00
|
|
|
|
+ default_game = mineclone2
|
2021-11-19 20:11:56 +01:00
|
|
|
|
|
|
|
|
|
- motd = Welcome to Minetest. Enjoy your stay!
|
|
|
|
|
+ motd = Bienvenue sur le Minetest de Libre-service.eu \o/
|
|
|
|
|
|
2021-11-20 04:12:10 +01:00
|
|
|
|
-# map-dir =
|
|
|
|
|
+map-dir = /srv/minetest.libre-service.eu/worlds/fooland
|
|
|
|
|
|
2021-11-19 20:11:56 +01:00
|
|
|
|
- max_users = 15
|
|
|
|
|
+ max_users = 64
|
|
|
|
|
|
|
|
|
|
- enable_damage = false
|
|
|
|
|
+ enable_damage = true
|
|
|
|
|
|
|
|
|
|
- # disallow_empty_password = false
|
2021-11-20 03:36:05 +01:00
|
|
|
|
+ disallow_empty_password = true
|
2021-11-19 20:11:56 +01:00
|
|
|
|
```
|
2021-11-17 00:42:53 +01:00
|
|
|
|
|
2021-11-20 04:12:10 +01:00
|
|
|
|
Créer le dossier des mondes dans l'espace du service :
|
2021-11-20 03:51:36 +01:00
|
|
|
|
```
|
|
|
|
|
mkdir -p /srv/minetest.libre-service.eu/worlds
|
2021-11-20 18:50:22 +01:00
|
|
|
|
chown Debian-minetest /srv/minetest.libre-service.eu/worlds
|
2021-11-20 03:51:36 +01:00
|
|
|
|
```
|
|
|
|
|
|
2021-11-20 04:12:10 +01:00
|
|
|
|
Créer le nouveau monde :
|
2021-11-20 03:51:36 +01:00
|
|
|
|
```
|
2021-11-20 04:12:10 +01:00
|
|
|
|
systemctl start minetest-server@fooland.service
|
2021-11-20 03:51:36 +01:00
|
|
|
|
```
|
2021-11-21 03:52:07 +01:00
|
|
|
|
|
|
|
|
|
Le démarrer au prochain boot :
|
|
|
|
|
```
|
|
|
|
|
systemctl enable minetest-server@fooland.service
|
|
|
|
|
```
|
|
|
|
|
|
2021-11-20 04:12:10 +01:00
|
|
|
|
Tester le nouveau monde en se connectant avec un client Minetest.
|
2021-11-17 00:42:53 +01:00
|
|
|
|
|
2021-11-20 12:43:29 +01:00
|
|
|
|
## Migration dans Posgreql
|
|
|
|
|
Créer un compte dédié (si pas déjà fait) :
|
2021-11-17 00:42:53 +01:00
|
|
|
|
```
|
2021-11-20 12:43:29 +01:00
|
|
|
|
su - postgres -c "psql -c \"create user minetestdba with password 'XXXXXXXX'; \" "
|
2021-11-17 00:42:53 +01:00
|
|
|
|
```
|
|
|
|
|
|
2021-11-20 12:43:29 +01:00
|
|
|
|
Créer une base de données :
|
|
|
|
|
```
|
|
|
|
|
su - postgres -c "psql -c \"CREATE DATABASE minetestdb_fooland OWNER minetestdba; \""
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Associer le compte dédié avec la base fraîchement créée :
|
|
|
|
|
```
|
|
|
|
|
su - postgres -c "psql -c \"GRANT ALL PRIVILEGES ON DATABASE minetestdb_fooland TO minetestdba; \""
|
|
|
|
|
```
|
|
|
|
|
|
2021-11-20 04:12:10 +01:00
|
|
|
|
Définir la base de données dans `/srv/minetest.libre-service.eu/worlds/fooland/world.mt` :
|
2021-11-17 00:42:53 +01:00
|
|
|
|
```
|
2021-11-20 12:43:29 +01:00
|
|
|
|
pgsql_connection = host=127.0.0.1 port=5432 user=minetestdba password=XXXXX dbname=minetestdb_fooland
|
|
|
|
|
pgsql_auth_connection = host=127.0.0.1 port=5432 user=minetestdba password=XXXXXX dbname=minetestdb_fooland
|
|
|
|
|
pgsql_player_connection = host=127.0.0.1 port=5432 user=minetestdba password=XXXXXX dbname=minetestdb_fooland
|
2021-11-17 00:42:53 +01:00
|
|
|
|
```
|
|
|
|
|
|
2021-11-20 04:12:10 +01:00
|
|
|
|
Migrer le nouveau monde vers le backend Postgres :
|
|
|
|
|
```
|
|
|
|
|
systemctl stop minetest-server@fooland.service
|
2021-11-21 03:59:32 +01:00
|
|
|
|
/usr/games/minetestserver --migrate postgresql --world /srv/minetest.libre-service.eu/worlds/fooland
|
|
|
|
|
/usr/games/minetestserver --migrate-auth postgresql --world /srv/minetest.libre-service.eu/worlds/fooland
|
|
|
|
|
/usr/games/minetestserver --migrate-players postgresql --world /srv/minetest.libre-service.eu/worlds/fooland
|
2021-11-21 04:05:22 +01:00
|
|
|
|
chown Debian-minetester /srv/minetest.libre-service.eu/worlds/fooland/world.mt
|
2021-11-20 04:12:27 +01:00
|
|
|
|
systemctl start minetest-server@fooland.service
|
2021-11-20 04:12:10 +01:00
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Jouer
|
2021-11-20 04:13:44 +01:00
|
|
|
|
Liens utiles :
|
2021-11-20 15:51:42 +01:00
|
|
|
|
- Mineclone2 : https://wiki.minetest.net/Games/MineClone_2/Differences_from_Minetest_Game
|
2021-11-20 04:13:44 +01:00
|
|
|
|
- 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
|
|
|
|
|
|