{"id":4985,"date":"2021-03-01T01:50:15","date_gmt":"2021-03-01T00:50:15","guid":{"rendered":"https:\/\/diocesanos.es\/blogs\/equipotic\/?p=4985"},"modified":"2021-03-01T09:57:07","modified_gmt":"2021-03-01T08:57:07","slug":"servidor-minetest-postgresql-en-linux-i","status":"publish","type":"post","link":"https:\/\/diocesanos.es\/blogs\/equipotic\/2021\/03\/01\/servidor-minetest-postgresql-en-linux-i\/","title":{"rendered":"servidor minetest + postgreSQL en linux (I)"},"content":{"rendered":"\n<p>Este a\u00f1o me he propuesto \u00abllevar a otro nivel\u00bb los talleres de <strong><a href=\"https:\/\/www.minetest.net\/\">minetest<\/a><\/strong> para desarrollar todo tipo de <strong>proyectos educativos<\/strong>: introducci\u00f3n al modelado 3D, estudio de instalaciones en viviendas, reconstrucci\u00f3n de monumentos y arquitectura cl\u00e1sica, dise\u00f1o de circuitos digitales, introducci\u00f3n a la programaci\u00f3n, construir una r\u00e9plica de nuestro colegio a escala, explorar un nuevo planeta, estudiar la influencia del ser humano sobre la colonizaci\u00f3n de un entorno, reproducir una batalla hist\u00f3rica, imaginar una ciudad del futuro, construir un mundo sin armas,&#8230;&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/diocesanos.es\/blogs\/equipotic\/wp-content\/uploads\/sites\/2\/2021\/02\/minetest_educacion.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"304\" src=\"https:\/\/diocesanos.es\/blogs\/equipotic\/wp-content\/uploads\/sites\/2\/2021\/02\/minetest_educacion-1024x304.jpg\" alt=\"\" class=\"wp-image-4986\" srcset=\"https:\/\/diocesanos.es\/blogs\/equipotic\/wp-content\/uploads\/sites\/2\/2021\/02\/minetest_educacion-1024x304.jpg 1024w, https:\/\/diocesanos.es\/blogs\/equipotic\/wp-content\/uploads\/sites\/2\/2021\/02\/minetest_educacion-300x89.jpg 300w, https:\/\/diocesanos.es\/blogs\/equipotic\/wp-content\/uploads\/sites\/2\/2021\/02\/minetest_educacion-768x228.jpg 768w, https:\/\/diocesanos.es\/blogs\/equipotic\/wp-content\/uploads\/sites\/2\/2021\/02\/minetest_educacion.jpg 1400w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>Y no s\u00f3lo eso. La idea es crear tantos \u00abmundos\u00bb como grupos de alumnos de los diferentes niveles educativos quieran participar, involucrar a los profesores de las asignaturas correspondientes e incluso permitir a los chicos disfrutar tanto en el centro como desde sus casas (incluidos periodos no lectivos).<\/p>\n<p>As\u00ed que&#8230; \u00bfC\u00f3mo lo hacemos?<\/p>\n\n\n\n<!--more-->\n\n\n\n<h2><b>Situaciones posibles:<\/b><\/h2>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Disponer de un servidor capaz de manejar m\u00faltiples instancias (mundos) independientes de forma simult\u00e1nea, cada uno de ellos con un n\u00famero de jugadores entre 25 y 40 (para todos los alumnos de una clase m\u00e1s los profesores)<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Disponer de un servidor \u00fanico con un mundo particionado en \u00e1reas protegidas, asignadas a grupos de jugadores por cursos\/grupos de alumnos, donde pudieran jugar entre 100 y 200 alumnos simult\u00e1neamente.<\/span><\/li>\n<\/ul>\n<h2><b>Recomendaci\u00f3n desde Minetest:<\/b><\/h2>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Utilizar como mecanismo de almacenamiento de los datos del juego (mapa, jugadores, autenticaci\u00f3n) el motor de base de datos <\/span><b>PostgreSQL<\/b><span style=\"font-weight: 400;\"> (<\/span><a href=\"https:\/\/www.postgresql.org\/\"><span style=\"font-weight: 400;\">https:\/\/www.postgresql.org\/<\/span><\/a><span style=\"font-weight: 400;\">). <\/span><span style=\"font-weight: 400;\">As\u00ed aparece en la tabla comparativa de m\u00e9todos admitidos por MineTest&nbsp; (<\/span><a href=\"https:\/\/wiki.minetest.net\/Database_backends#Comparison_table\"><span style=\"font-weight: 400;\">https:\/\/wiki.minetest.net\/Database_backends#Comparison_table<\/span><\/a><span style=\"font-weight: 400;\">)<\/span><b>&nbsp;<\/b><\/li>\n<\/ul>\n<h2><b>Otras cuestiones a tener en cuenta:<\/b><\/h2>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Facilitar la administraci\u00f3n del servidor y sus instancias (inicio, parada, reglas de cortafuego\/nat, configuraci\u00f3n, instalaci\u00f3n y habilitaci\u00f3n de \u201cmods\u201d&#8230;)<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Facilitar la creaci\u00f3n, mantenimiento, copias de seguridad y seguimiento de los \u201cmundos\u201d a utilizar por los alumnos.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Facilitar la gesti\u00f3n de cuentas de jugador\/alumno asignadas a cada \u201cmundo\u201d (claves, permisos, asignaci\u00f3n de \u00e1reas,&#8230;)<\/span><\/li>\n<\/ul>\n<h2><b>Primer problema a resolver:<\/b><\/h2>\n<table>\n<tbody>\n<tr>\n<td style=\"border-style: solid; border-color: #ffa600; background-color: #ffc800;\">\n<p>Las versiones \u201coficiales\u201d del juego <strong>no traen consigo el soporte para Postgresql<\/strong>, por lo que tendremos que reconstruirlo desde cero a partir de su c\u00f3digo fuente.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n\n\n\n<h2>[1] Instalaci\u00f3n del software necesario (ubuntu):<\/h2>\n<p><b><\/b>Actualiza los repositorios&#8230;\u00a0<\/p>\n<pre style=\"font-size: 80%;\"><strong>sudo<\/strong> apt update<\/pre>\n<p>&#8230; y luego instala todo los necesario para trabajar &#8230;<\/p>\n<pre style=\"font-size: 80%;\"><strong>sudo apt<\/strong> install wget postgresql postgresql-contrib g++ make libc6-dev libirrlicht-dev cmake libbz2-dev libpng-dev libjpeg-dev libxxf86vm-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev libpq-dev libpqtypes-dev doxygen libluajit-5.1-dev libspatialindex-dev libncurses-dev<\/pre>\n<h2>[2] Creaci\u00f3n de un usuario espec\u00edfico para la ejecuci\u00f3n de las instancias del servidor:<\/h2>\n<p>Por seguridad siempre es bueno asociar a los procesos del servidor una cuenta de usuario con privilegios limitados. Le llamaremos \u00abminetest\u00bb:<\/p>\n<pre style=\"font-size: 80%;\"><strong>sudo<\/strong> <strong>useradd<\/strong> -mU minetest<\/pre>\n<h2>[3] Descarga del c\u00f3digo fuente de MineTest y de su modo de juego principal:<\/h2>\n<p>Iniciaremos desde el terminal una sesi\u00f3n interactiva con el reciente usuario \u00abminetest\u00bb:<\/p>\n<pre style=\"font-size: 80%;\"><strong>sudo<\/strong> -i -u minetest<\/pre>\n<p>A continuaci\u00f3n procederemos a descargar, desempaquetar y eliminar los archivos descargados una vez extra\u00eddo su contenido en el sitio correcto:<\/p>\n<pre style=\"font-size: 60%;\"><strong>wget<\/strong> <a href=\"https:\/\/github.com\/minetest\/minetest\/archive\/master.tar.gz\">https:\/\/github.com\/minetest\/minetest\/archive\/master.tar.gz<\/a><br \/><strong>tar<\/strong> xf master.tar.gz<br \/><strong>rm<\/strong> master.tar.gz<br \/><strong>cd<\/strong> minetest-master\/games\/<br \/><strong>wget<\/strong> <a href=\"https:\/\/github.com\/minetest\/minetest_game\/archive\/master.tar.gz\">https:\/\/github.com\/minetest\/minetest_game\/archive\/master.tar.gz<\/a>\u00a0<br \/><strong>tar<\/strong> xf master.tar.gz<br \/><strong>rm<\/strong> master.tar.gz<br \/><strong>mv<\/strong> minetest_game-master minetest_game<br \/><strong>cd<\/strong> ..<\/pre>\n<h2>[4] Compilaci\u00f3n con soporte para PostgreSQL y ejecuci\u00f3n en el directorio local (no necesita instalaci\u00f3n posterior):<\/h2>\n<p>Configuraremos las opciones de construcci\u00f3n del programa servidor para que se genere un binario que pueda ejecutarse en el directorio local (tipo aplicativo \u00abportable\u00bb), excluyendo las opciones del cliente gr\u00e1fico (no nos interesa para nada) y a\u00f1adiendo lo necesario para que pueda manejarse con PostgreSQL:<\/p>\n<pre style=\"font-size: 80%;\"><strong>cmake<\/strong> . -DRUN_IN_PLACE=TRUE -DBUILD_CLIENT=FALSE -DBUILD_SERVER=TRUE -DCMAKE_BUILD_TYPE=Release -DBUILD_UNITTESTS=FALSE -DENABLE_POSTGRESQL=TRUE -DVERSION_EXTRA=postgresql -DPostgreSQL_INCLUDE_DIR=\/usr\/include\/postgresql -DPostgreSQL_TYPE_INCLUDE_DIR=\/usr\/include\/postgresql -DPostgreSQL_LIBRARY=\/usr\/lib\/x86_64-linux-gnu\/libpq.so<\/pre>\n<p>A continuaci\u00f3n lanzaremos el proceso de construcci\u00f3n (compilaci\u00f3n):<\/p>\n<pre><span style=\"font-weight: 400;\">make -j$(nproc)<\/span><\/pre>\n<table style=\"border-collapse: collapse; width: 100%;\">\n<tbody>\n<tr>\n<td style=\"width: 100%; border-style: solid; border-color: #95ff85; background-color: #ceff80;\">\n<p><strong>OPCIONAL &#8211;<\/strong>\u00a0Crea un paquete \u201c.tar.gz\u201d para su distribuci\u00f3n como aplicativo \u201cportable\u201d:<\/p>\n<pre style=\"font-size: 80%;\">make package<\/pre>\n<p><strong>NOTAS<\/strong>: <em>El paquete generado s\u00f3lo incluye textos en ingl\u00e9s. Si quieres traducciones debes incluir tambi\u00e9n la carpeta \u201clocale\u201d (adapta el nombre del fichero con el que t\u00fa hayas generado):<\/em><\/p>\n<pre style=\"font-size: 80%;\">tar -zcf minetest-locale.tar.gz local<\/pre>\n<p><em>Puedes descargarte desde este enlace el paquete completo con las traducciones integradas:<\/em> <strong><a href=\"https:\/\/diocesanos.es\/blogs\/descargas\/minetest-5.5.0-postgresql-linux.tar.gz\">minetest-5.5.0-postgresql-linux.tar.gz<\/a><\/strong><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">Finalmente regresa al directorio base del usuario \u00abminetest\u00bb:<\/span><\/p>\n<pre style=\"font-size: 80%;\">cd ..<\/pre>\n<h2>[5] Primera ejecuci\u00f3n y parada del servidor de minetest:<\/h2>\n<p><span style=\"font-weight: 400;\">Esta primera acci\u00f3n servir\u00e1 para comprobar que es posible ejecutar el programa reci\u00e9n compilado. <\/span><\/p>\n<pre style=\"font-size: 80%;\">.\/minetest-master\/bin\/minetestserver<\/pre>\n<p><span style=\"font-weight: 400;\">\u2026 y pulsa luego \u201cCtrl\u201d + \u201cC\u201d para finalizar y cerrar el servicio.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Si todo ha funcionado correctamente se habr\u00e1 generado dentro de \u201c<\/span><b>minetest-master\/<\/b><span style=\"font-weight: 400;\">\u201d un archivo llamado \u201c<\/span><b>debug.txt<\/b><span style=\"font-weight: 400;\">\u201d y una carpeta llamada \u201c<\/span><b>worlds\/<\/b><span style=\"font-weight: 400;\">\u201d, y a su vez dentro de ella un primer \u201cmundo\u201d con su carpeta correspondiente llamado \u201c<\/span><b>world\/<\/b><span style=\"font-weight: 400;\">\u201d. Los archivos de esta \u00faltima representan el estado actual de ese mundo, su configuraci\u00f3n y c\u00f3mo ha de generarse el mundo seg\u00fan lo vayan descubriendo los jugadores (faltan algunos archivos que no se crean hasta que se requieren por primera vez):\u00a0<\/span><\/p>\n<pre style=\"font-size: 80%;\">debug.txt<br \/>worlds\/<br \/>\u2514\u2500\u2500 world\/<br \/> \u00a0\u00a0\u00a0\u251c\u2500\u2500 env_meta.txt<br \/> \u00a0\u00a0\u00a0\u251c\u2500\u2500 force_loaded.txt<br \/> \u00a0\u00a0\u00a0\u251c\u2500\u2500 ipban.txt<br \/> \u00a0\u00a0\u00a0\u251c\u2500\u2500 map_meta.txt<br \/> \u00a0\u00a0\u00a0\u251c\u2500\u2500 map.sqlite<br \/> \u00a0\u00a0\u00a0\u2514\u2500\u2500 world.mt<\/pre>\n<p><span style=\"font-weight: 400;\">Por ahora nos interesa especialmente el fichero \u201c<\/span><b>world.mt<\/b><span style=\"font-weight: 400;\">\u201d cuyo contenido se muestra a continuaci\u00f3n:<\/span><\/p>\n<pre style=\"font-size: 80%;\">enable_damage = true<br \/>creative_mode = false<br \/>auth_backend = sqlite3<br \/>player_backend = sqlite3<br \/>backend = sqlite3<br \/>gameid = minetest<br \/>world_name = world<\/pre>\n<p><span style=\"font-weight: 400;\">En \u00e9l podemos observar que por defecto el servidor MineTest utiliza el m\u00e9todo \u201csqlite3\u201d como almacenamiento para los datos del mapa, jugadores y autenticaci\u00f3n. \u00a1<\/span><b>NO CAMBIES NADA TODAV\u00cdA<\/b><span style=\"font-weight: 400;\">!\u00a0<\/span><\/p>\n\n\n\n<h2>[6] Configuraci\u00f3n de PostgreSQL como almacenamiento para MineTest<\/h2>\n<p><span style=\"font-weight: 400;\">Abre un nuevo terminal (o cierra la sesi\u00f3n del usuario \u201cminetest\u201d si sigues con ella).<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Edita el archivo \u201c<\/span><b>postgresql.conf<\/b><span style=\"font-weight: 400;\">\u201d (en mi caso es \u201c<\/span><i><span style=\"font-weight: 400;\">\/etc\/postgresql\/12\/main\/postgresql.conf<\/span><\/i><span style=\"font-weight: 400;\">\u201d) y cambia el valor del par\u00e1metro \u201c<\/span><strong>shared_buffer<\/strong><span style=\"font-weight: 400;\">\u201d al valor de la mitad de la RAM instalada en el equipo, con un m\u00ednimo de <\/span><b>512MB<\/b><span style=\"font-weight: 400;\"> (con 4GB en el m\u00edo yo pondr\u00eda 2048MB).<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Reinicia el servicio para que los cambios tengan efecto:<\/span><\/p>\n<pre style=\"font-size: 80%;\"><span style=\"font-weight: 400;\">sudo systemctl restart postgresql.service<\/span><span style=\"font-weight: 400;\"><br><\/span><\/pre>\n<p><span style=\"font-weight: 400;\">Ejecuta la herramienta \u201cpsql\u201d con el usuario \u201cpostgres\u201d para generar un nuevo rol (credenciales de acceso) espec\u00edfico para el servidor de MineTest y asociarlo a una base de datos particular:<\/span><\/p>\n<pre style=\"font-size: 80%;\">sudo -u postgres psql<\/pre>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Escribe las siguientes sentencias (incluyendo el \u201c;\u201d final). Puedes cambiar el nombre del usuario \u201c<\/span><b>mtuser<\/b><span style=\"font-weight: 400;\">\u201d y la clave \u201c<\/span><b>mtpass<\/b><span style=\"font-weight: 400;\">\u201d por los valores que quieras, as\u00ed como el nombre de la base de datos \u201c<\/span><b>mtworld<\/b><span style=\"font-weight: 400;\">\u201d.<\/span><\/li>\n<\/ul>\n<pre style=\"font-size: 80%;\"><span style=\"font-weight: 400;\">CREATE USER <strong>mtuser<\/strong> WITH PASSWORD '<strong>mtpass<\/strong>';<\/span><br><span style=\"font-weight: 400;\">CREATE DATABASE <strong>mtworld<\/strong> OWNER <strong>mtuser<\/strong>;<\/span><br><span style=\"font-weight: 400;\">GRANT ALL PRIVILEGES ON DATABASE <strong>mtworld<\/strong> TO <strong>mtuser<\/strong>;<\/span><span style=\"font-weight: 400;\"><br><\/span><\/pre>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Puedes comprobar que se han creado correctamente escribiendo el comando \u201c<\/span><span style=\"font-weight: 400;\">\\l<\/span><span style=\"font-weight: 400;\">\u201d (\u201cele\u00bb min\u00fascula)<\/span><\/li>\n<\/ul>\n<pre style=\"font-size: 50%;\"><b>\\l<\/b><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;List of databases<br>&nbsp;&nbsp;&nbsp;Name&nbsp; &nbsp; |&nbsp; Owner &nbsp; | Encoding | &nbsp; Collate &nbsp; |&nbsp; &nbsp; Ctype&nbsp; &nbsp; | &nbsp; Access privileges&nbsp;&nbsp;&nbsp;<br>------------+----------+----------+-------------+-------------+-----------------------<br>mtworld&nbsp; &nbsp; | mtuser &nbsp; | UTF8 &nbsp; &nbsp; | es_ES.UTF-8 | es_ES.UTF-8 | =Tc\/mtuser &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | mtuser=CTc\/mtuser<br>postgres &nbsp; | postgres | UTF8 &nbsp; &nbsp; | es_ES.UTF-8 | es_ES.UTF-8 |&nbsp;<br>template0&nbsp; | postgres | UTF8 &nbsp; &nbsp; | es_ES.UTF-8 | es_ES.UTF-8 | =c\/postgres&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | postgres=CTc\/postgres<br>template1&nbsp; | postgres | UTF8 &nbsp; &nbsp; | es_ES.UTF-8 | es_ES.UTF-8 | =c\/postgres&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; +<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | postgres=CTc\/postgres<br>(4 rows)<\/pre>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Para salir de este entorno pulsa \u201c\\q\u201d y luego escribe \u201cexit\u201d para cerrar la sesi\u00f3n.<\/span><\/li>\n<\/ul>\n<pre style=\"font-size: 80%;\"><b>\\q<\/b><br><b>exit<\/b><\/pre>\n<table style=\"border-collapse: collapse; width: 100%;\">\n<tbody>\n<tr>\n<td style=\"width: 100%; border-style: solid; border-color: #95ff85; background-color: #ceff80;\">\n<p><strong>NOTAS:<\/strong><\/p>\n<ul>\n<li><i>Tanto si queremos un mundo grande \u201ccompartido\u201d o \u201cvarios mundos individuales (uno por curso\/grupo, p.ej.) es necesario crear una base de datos independiente para cada uno de ellos.<\/i><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><i><span style=\"font-weight: 400;\">El usuario y su clave pueden ser el mismo para todas las bases de datos utilizadas por Minetest<\/span><\/i><\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>[7] Configurar el archivo \u201cworld.mt\u201d de nuestro \u201cmundo\u201c para que trabaje con Postgresql<\/h2>\n<p><span style=\"font-weight: 400;\">Abre una sesi\u00f3n interactiva con el usuario \u201cminetest\u201d (o vuelve a ella si estabas en otro terminal)<\/span><\/p>\n<pre style=\"font-size: 80%;\"><span style=\"font-weight: 400;\">sudo -i -u minetest<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">Edita el archivo \u201c<\/span><b>minetest-master\/worlds\/world\/world.mt<\/b><span style=\"font-weight: 400;\">\u201d y a\u00f1ade las siguientes l\u00edneas adaptando los valores de usuario\/clave\/base si los cambiaste al crearlos:<\/span><span style=\"font-weight: 400;\"><br><\/span><\/p>\n<pre style=\"font-size: 50%;\">enable_damage = true<br>creative_mode = false<br>auth_backend = sqlite3<br>player_backend = sqlite3<br>backend = sqlite3<br>gameid = minetest<br>world_name = world<br><strong>pgsql_connection = host=127.0.0.1 port=5432 user=mtuser password=mtpass dbname=mtworld<\/strong><br><strong>pgsql_auth_connection = host=127.0.0.1 port=5432 user=mtuser password=mtpass dbname=mtworld<\/strong><br><strong>pgsql_player_connection = host=127.0.0.1 port=5432 user=mtuser password=mtpass dbname=mtworld<\/strong><\/pre>\n<table>\n<tbody>\n<tr>\n<td style=\"border-style: solid; border-color: #ffa600; background-color: #ffc800;\">\n<p><b>IMPORTANTE! <\/b><\/p>\n<p><i><span style=\"font-weight: 400;\">NO cambies los m\u00e9todos \u201csqlite3\u201d manualmente. Se adaptar\u00e1n autom\u00e1ticamente con las acciones del siguiente paso<\/span><\/i>.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">Cierra el archivo y desde la consola ejecuta los siguientes comandos para convertir los m\u00e9todos de \u201csqlite3\u201d a \u201cpostgresql\u201d<\/span><span style=\"font-weight: 400;\"><br><\/span><\/p>\n<pre style=\"font-size: 50%;\"><span style=\"font-weight: 400;\"><strong>.\/minetest-master\/bin\/minetestserver<\/strong> --migrate postgresql --world minetest-master\/worlds\/world<\/span><br><br><span style=\"font-weight: 400;\"><strong>.\/minetest-master\/bin\/minetestserver<\/strong> --migrate-auth postgresql --world minetest-master\/worlds\/world<\/span><br><br><span style=\"font-weight: 400;\"><strong>.\/minetest-master\/bin\/minetestserver<\/strong> --migrate-players postgresql --world minetest-master\/worlds\/world<\/span><\/pre>\n<table style=\"border-collapse: collapse; width: 100%;\">\n<tbody>\n<tr>\n<td style=\"width: 100%; border-style: solid; border-color: #95ff85; background-color: #ceff80;\">\n<p><strong><b>NOTA:<\/b><\/strong><\/p>\n<p><strong><i><span style=\"font-weight: 400;\">No te preocupes si en los mensajes de resultado aparecen \u201c0 blocks\u201d, \u201c0 auth\u201d o \u201c0 players\u201d migrados. El mundo de ejemplo que estamos utilizando esta virgen y aun no se ha guardado nada.<\/span><\/i><\/strong><i><\/i><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">Si observamos ahora el contenido del archivo de configuraci\u00f3n \u201c<\/span><b>minetest-master\/worlds\/world\/world.mt<\/b><span style=\"font-weight: 400;\">\u201d comprobaremos que se ha adaptado al nuevo modelo de almacenamiento:<\/span><\/p>\n<pre style=\"font-size: 50%;\"><span style=\"font-weight: 400;\">enable_damage = true<\/span><br><span style=\"font-weight: 400;\">creative_mode = false<\/span><br><span style=\"font-weight: 400;\">auth_backend = <strong>postgresql<\/strong><\/span><br><span style=\"font-weight: 400;\">player_backend = <strong>postgresql<\/strong><\/span><br><span style=\"font-weight: 400;\">backend = <strong>postgresql<\/strong><\/span><br><span style=\"font-weight: 400;\">gameid = minetest<\/span><br><span style=\"font-weight: 400;\">world_name = world<\/span><br><span style=\"font-weight: 400;\">pgsql_connection = host=127.0.0.1 port=5432 user=mtuser password=mtpass dbname=mtworld<\/span><br><span style=\"font-weight: 400;\">pgsql_auth_connection = host=127.0.0.1 port=5432 user=mtuser password=mtpass dbname=mtworld<\/span><br><span style=\"font-weight: 400;\">pgsql_player_connection = host=127.0.0.1 port=5432 user=mtuser password=mtpass dbname=mtworld<\/span><\/pre>\n<table>\n<tbody>\n<tr>\n<td style=\"border-style: solid; border-color: #ffa600; background-color: #ffc800;\">\n<p><b>IMPORTANTE! <\/b><\/p>\n<p><i><span style=\"font-weight: 400;\">Aguanta un minuto m\u00e1s las ganas de probar el servidor. Antes vamos a salvaguardar lo que hemos hecho para poder reutilizarlo y crear de una forma m\u00e1s sencilla nuevos \u201cmundos\u201d!<\/span><\/i><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">Ejecuta el siguiente comando para hacer un volcado de la base de datos tal como se encuentra en la actualidad (te pedir\u00e1 la contrase\u00f1a del usuario \u201cmtuser\u201d)<\/span><\/p>\n<pre style=\"font-size: 70%;\"><strong>pg_dump<\/strong> -U <em>mtuser<\/em> -h 127.0.0.1 -p 5432 <em>mtworld<\/em> &gt;&gt; mtworld.sql<\/pre>\n<h2>[8] Prueba final del servidor<\/h2>\n<p><span style=\"font-weight: 400;\">Ejecuta el binario del servidor tal como hicimos nada m\u00e1s compilarlo:<\/span><\/p>\n<pre style=\"font-size: 80%;\"><span style=\"font-weight: 400;\">.\/minetest-master\/bin\/minetestserver<\/span><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/diocesanos.es\/blogs\/equipotic\/wp-content\/uploads\/sites\/2\/2021\/03\/Captura-de-pantalla-de-2021-03-01-01-42-11.png\"><img loading=\"lazy\" decoding=\"async\" width=\"998\" height=\"201\" src=\"https:\/\/diocesanos.es\/blogs\/equipotic\/wp-content\/uploads\/sites\/2\/2021\/03\/Captura-de-pantalla-de-2021-03-01-01-42-11.png\" alt=\"\" class=\"wp-image-4987\" srcset=\"https:\/\/diocesanos.es\/blogs\/equipotic\/wp-content\/uploads\/sites\/2\/2021\/03\/Captura-de-pantalla-de-2021-03-01-01-42-11.png 998w, https:\/\/diocesanos.es\/blogs\/equipotic\/wp-content\/uploads\/sites\/2\/2021\/03\/Captura-de-pantalla-de-2021-03-01-01-42-11-300x60.png 300w, https:\/\/diocesanos.es\/blogs\/equipotic\/wp-content\/uploads\/sites\/2\/2021\/03\/Captura-de-pantalla-de-2021-03-01-01-42-11-768x155.png 768w\" sizes=\"auto, (max-width: 998px) 100vw, 998px\" \/><\/a><\/figure>\n\n\n\n<p>&#8230;<span style=\"font-weight: 400;\">y desde un cliente (en mi caso ejecutado para la prueba en el mismo ordenador) nos conectamos al servidor 127.0.0.1, puerto 30000, con el nombre del jugador que queramos:<\/span><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/diocesanos.es\/blogs\/equipotic\/wp-content\/uploads\/sites\/2\/2021\/03\/Captura-de-pantalla-de-2021-03-01-01-44-35.png\"><img loading=\"lazy\" decoding=\"async\" width=\"998\" height=\"530\" src=\"https:\/\/diocesanos.es\/blogs\/equipotic\/wp-content\/uploads\/sites\/2\/2021\/03\/Captura-de-pantalla-de-2021-03-01-01-44-35.png\" alt=\"\" class=\"wp-image-4988\" srcset=\"https:\/\/diocesanos.es\/blogs\/equipotic\/wp-content\/uploads\/sites\/2\/2021\/03\/Captura-de-pantalla-de-2021-03-01-01-44-35.png 998w, https:\/\/diocesanos.es\/blogs\/equipotic\/wp-content\/uploads\/sites\/2\/2021\/03\/Captura-de-pantalla-de-2021-03-01-01-44-35-300x159.png 300w, https:\/\/diocesanos.es\/blogs\/equipotic\/wp-content\/uploads\/sites\/2\/2021\/03\/Captura-de-pantalla-de-2021-03-01-01-44-35-768x408.png 768w\" sizes=\"auto, (max-width: 998px) 100vw, 998px\" \/><\/a><\/figure>\n\n\n\n<h2><b>En los siguientes art\u00edculos tratar\u00e9 entre otros temas:<\/b><\/h2>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Configuraci\u00f3n personalizada para una instancia y su mundo.\u00a0<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Instalaci\u00f3n y gesti\u00f3n de \u201cmods\u201d globales y dedicados por mundo.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Automatizaci\u00f3n de inicio\/parada de una o varias instancias del servidor MineTest.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Automatizaci\u00f3n de copias de seguridad de los mundos.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Configuraci\u00f3n del cortafuegos (si \u00e9ste estuviese habilitado).\u00a0<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Permitir el acceso desde cualquier lugar (internet).<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Herramientas y \u00fatiles de administraci\u00f3n \/ monitorizaci\u00f3n.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Gesti\u00f3n de alumnos.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Protecci\u00f3n y asignaci\u00f3n de \u00e1reas.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">&#8230;<\/span><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Este a\u00f1o me he propuesto \u00abllevar a otro nivel\u00bb los talleres de minetest para desarrollar todo tipo de proyectos educativos: introducci\u00f3n al modelado 3D, estudio de instalaciones en viviendas, reconstrucci\u00f3n de monumentos y arquitectura cl\u00e1sica, dise\u00f1o de circuitos digitales, introducci\u00f3n a la programaci\u00f3n, construir una r\u00e9plica de nuestro colegio a escala, explorar un nuevo planeta, &hellip; <a href=\"https:\/\/diocesanos.es\/blogs\/equipotic\/2021\/03\/01\/servidor-minetest-postgresql-en-linux-i\/\" class=\"more-link\">Seguir leyendo <span class=\"screen-reader-text\">servidor minetest + postgreSQL en linux (I)<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":292,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15,268,5],"tags":[255],"class_list":["post-4985","post","type-post","status-publish","format-standard","hentry","category-documentacion","category-educacion","category-linux-2","tag-minetest"],"_links":{"self":[{"href":"https:\/\/diocesanos.es\/blogs\/equipotic\/wp-json\/wp\/v2\/posts\/4985","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/diocesanos.es\/blogs\/equipotic\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/diocesanos.es\/blogs\/equipotic\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/diocesanos.es\/blogs\/equipotic\/wp-json\/wp\/v2\/users\/292"}],"replies":[{"embeddable":true,"href":"https:\/\/diocesanos.es\/blogs\/equipotic\/wp-json\/wp\/v2\/comments?post=4985"}],"version-history":[{"count":3,"href":"https:\/\/diocesanos.es\/blogs\/equipotic\/wp-json\/wp\/v2\/posts\/4985\/revisions"}],"predecessor-version":[{"id":4993,"href":"https:\/\/diocesanos.es\/blogs\/equipotic\/wp-json\/wp\/v2\/posts\/4985\/revisions\/4993"}],"wp:attachment":[{"href":"https:\/\/diocesanos.es\/blogs\/equipotic\/wp-json\/wp\/v2\/media?parent=4985"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/diocesanos.es\/blogs\/equipotic\/wp-json\/wp\/v2\/categories?post=4985"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/diocesanos.es\/blogs\/equipotic\/wp-json\/wp\/v2\/tags?post=4985"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}