2021-11-03 01:49:27 +01:00
|
|
|
|
# Minetest
|
|
|
|
|
|
2021-11-03 02:14:32 +01:00
|
|
|
|
# Installation
|
|
|
|
|
|
2021-11-17 00:42:53 +01:00
|
|
|
|
Ouvrir les ports nécessaires :
|
|
|
|
|
```
|
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-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-17 00:42:53 +01:00
|
|
|
|
Créer un fichier de configuration vierge :
|
|
|
|
|
```
|
|
|
|
|
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
|
|
|
|
|
+ server_name = Miclouland – Mineclone2 LibreServiceEU
|
|
|
|
|
|
|
|
|
|
- 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
|
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 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-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 04:12:10 +01:00
|
|
|
|
Créer un compte Postgreql :
|
2021-11-17 00:42:53 +01:00
|
|
|
|
```
|
2021-11-20 04:12:10 +01:00
|
|
|
|
su - postgres 'psql -c "CREATE DATABASE minetestdb OWNER minetestdba; GRANT ALL PRIVILEGES ON DATABASE minetestdb TO minetestdba;"'
|
2021-11-17 00:42:53 +01:00
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
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
|
|
|
|
```
|
|
|
|
|
backend = postgresql
|
2021-11-20 04:12:10 +01:00
|
|
|
|
pgsql_connection = host=127.0.0.1 port=5432 user=minetestdba password=XXXXX dbname=minetestdb-fooland
|
2021-11-17 00:42:53 +01:00
|
|
|
|
|
|
|
|
|
auth_backend = postgresql
|
2021-11-20 04:12:10 +01:00
|
|
|
|
pgsql_auth_connection = host=127.0.0.1 port=5432 user=minetestdba password=XXXXXX dbname=minetestdb-fooland
|
2021-11-17 00:42:53 +01:00
|
|
|
|
|
|
|
|
|
player_backend = postgresql
|
2021-11-20 04:12:10 +01:00
|
|
|
|
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
|
|
|
|
|
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
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
2021-11-17 00:42:53 +01:00
|
|
|
|
|
2021-11-20 04:12:10 +01:00
|
|
|
|
## Jouer
|
2021-11-17 00:42:53 +01:00
|
|
|
|
Information about Mineclone2 : https://wiki.minetest.net/Games/MineClone_2/Differences_from_Minetest_Game
|