Setting up a Multiplayer Server/fr: Difference between revisions

From Vintage Story Wiki
(Created page with "Si vous souhaitez utiliser plusieurs instances sur la même machine, il vous suffit de refaire certaines des étapes ci-dessus. Voici un exemple pour une deuxième instance :")
(Created page with "mkdir -p /srv/gameserver/data/vs2 nano /usr/lib/systemd/system/vintagestoryserver2.service Copiez le texte de l'étape 6 et modifiez ces lignes : Description=Vintage Story Server 2 Unit ExecStart=/usr/bin/mono VintagestoryServer.exe --dataPath /srv/gameserver/data/vs2 SyslogIdentifier=VSSRV2 Créer un fichier rsyslog et copier le code de l'étape 7 : nano /etc/rsyslog.d/vintagestoryserver2.conf Change <code>VSSRV</code> to <code>VSSRV2</code> and <code>/var/log...")
Line 332: Line 332:
   mkdir -p /srv/gameserver/data/vs2
   mkdir -p /srv/gameserver/data/vs2
   nano /usr/lib/systemd/system/vintagestoryserver2.service
   nano /usr/lib/systemd/system/vintagestoryserver2.service
Copy from step 6 and change these lines:
Copiez le texte de l'étape 6 et modifiez ces lignes :
   Description=Vintage Story Server 2 Unit
   Description=Vintage Story Server 2 Unit
   ExecStart=/usr/bin/mono VintagestoryServer.exe --dataPath /srv/gameserver/data/vs2
   ExecStart=/usr/bin/mono VintagestoryServer.exe --dataPath /srv/gameserver/data/vs2
   SyslogIdentifier=VSSRV2
   SyslogIdentifier=VSSRV2
Create rsyslog file and copy code from step 7
Créer un fichier rsyslog et copier le code de l'étape 7 :
   nano /etc/rsyslog.d/vintagestoryserver2.conf
   nano /etc/rsyslog.d/vintagestoryserver2.conf
Change <code>VSSRV</code> to <code>VSSRV2</code> and <code>/var/log/vintagestory-server</code> to <code>/var/log/vintagestory-server2</code><br>
Change <code>VSSRV</code> to <code>VSSRV2</code> and <code>/var/log/vintagestory-server</code> to <code>/var/log/vintagestory-server2</code><br>
Before you proceed make a copy of your first server configuration and edit it for your needs (change port!!!)
Avant de procéder, faites une copie de votre première configuration de serveur et modifiez-la en fonction de vos besoins (N'oubliez pas de changez les ports !!!).
   cp /srv/gameserver/data/vs/serverconfig.json /srv/gameserver/data/vs2/
   cp /srv/gameserver/data/vs/serverconfig.json /srv/gameserver/data/vs2/
   nano /srv/gameserver/data/vs2/serverconfig.json
   nano /srv/gameserver/data/vs2/serverconfig.json
Now start the service
Démarrer maintenant le service
   systemctl restart rsyslog.service;
   systemctl restart rsyslog.service;
   systemctl enable vintagestoryserver2.service
   systemctl enable vintagestoryserver2.service
   systemctl start vintagestoryserver2.service
   systemctl start vintagestoryserver2.service
Install cronjob
Installer cronjob
   crontab -e
   crontab -e
Insert
Terminez avec :
   30 4 * * *      systemctl restart vintagestoryserver2.service
   30 4 * * *      systemctl restart vintagestoryserver2.service


Have Fun!
Have Fun!