Anderson Jaeger Posted June 2, 2015 Share Posted June 2, 2015 I already did that a few times on windows, but i would like to know, how can i run multiple servers on linux in the same machine? Link to comment Share on other sites More sharing options...
Joseph Von Hohenheim Posted June 2, 2015 Share Posted June 2, 2015 I tried here too, to change the text in projectzomboid-dedi.sh but no good results so far. Link to comment Share on other sites More sharing options...
Brybry Posted June 2, 2015 Share Posted June 2, 2015 There are a lot of ways to do this. Off the top of my head (I can test later, to confirm, if more help is needed): I think you can launch with (without even editing the projectzomboid-dedi.sh, it should pass the arguments):-servername servertest or -servername server2 etc and it'll use configuration options/directories appropriate to those server names. Or you can do -cachedir=~/server1 or -cachedir=~/server2 etc or -Duser.home=~/server1 or -Duser.home=~/server2 and it'll use the the same servertest name but it'll create new directories with default configs for each server. Note that you'll have to configure each server to use different ports even if you have multiple IPs for your server.At the moment, if you want to selectively bind to an IP you'll have to write your own LD_PRELOAD hook for bind() or something similar or use virtualization or maybe use network namespaces.Basically running multiple servers should be easy but using multiple IPs is probably not. Link to comment Share on other sites More sharing options...
Anderson Jaeger Posted June 2, 2015 Author Share Posted June 2, 2015 There are a lot of ways to do this. Off the top of my head (I can test later, to confirm, if more help is needed): I think you can launch with (without even editing the projectzomboid-dedi.sh, it should pass the arguments): -servername servertest or -servername server2 etc and it'll use configuration options/directories appropriate to those server names. Or you can do -cachedir=~/server1 or -cachedir=~/server2 etc or -Duser.home=~/server1 or -Duser.home=~/server2 and it'll use the the same servertest name but it'll create new directories with default configs for each server. Note that you'll have to configure each server to use different ports even if you have multiple IPs for your server. At the moment, if you want to selectively bind to an IP you'll have to write your own LD_PRELOAD hook for bind() or something similar or use virtualization or maybe use network namespaces. Basically running multiple servers should be easy but using multiple IPs is probably not. I will try now, thank you very much for your reply, appreciated. Link to comment Share on other sites More sharing options...
Anderson Jaeger Posted June 2, 2015 Author Share Posted June 2, 2015 Or you can do -cachedir=~/server1 or -cachedir=~/server2 etc or -Duser.home=~/server1 or -Duser.home=~/server2 and it'll use the the same servertest name but it'll create new directories with default configs for each server. Could you give more details about this process? i need to insert this text lines in one of the projectzomboid-dedi.sh? Link to comment Share on other sites More sharing options...
EnigmaGrey Posted June 2, 2015 Share Posted June 2, 2015 #!/bin/bash # # projectzomboid.sh # ############################################################################### SCRIPT="`basename $0`" GAMEDIR="${HOME}/.project_zomboid_2.9.9.17" LOGFILE="${GAMEDIR}/${SCRIPT}.log" INSTDIR="`dirname $0`"/projectzomboid ; cd "${INSTDIR}" ; INSTDIR="`pwd`" [[ ! -d "${GAMEDIR}" ]] && mkdir -m 0755 "${GAMEDIR}" JARPATH=".:lwjgl.jar:lwjgl_util.jar:jinput.jar:sqlitejdbc-v056.jar:trove-3.0.3.jar:uncommons-maths-1.2.3.jar" # XMODIFIERS is cleared here to prevent SCIM screwing up keyboard input XMODIFIERS= java \ -Djava.library.path="${INSTDIR}" \ -Dorg.lwjgl.util.NoChecks=true \ -Dorg.lwjgl.librarypath="${INSTDIR}" \ -Xms1G \ -Xmx16G \ -Duser.home="/dev/shm/SpiffoSpace_public_easymode" \ -XX:-UseSplitVerifier \ -cp "${JARPATH}" \ zombie.network.GameServer \ "$@" \ 2>&1 | tee console_easymode.txt exit 0 # # EOF # ############################################################################### I just use -Duser.home to generate multiple directories to stuff individual zomboids in. Port is set in servertest.ini. Brybry 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now