Hosting Server: Linux

Cow

Donator
Posts
23
Likes
18
This tutorial is based/copied from @LoU 's tutorial over at JKhub, so all credits go to him.

TUTORIAL IS BASED ON UBUNTU 14.04.3

Assumptions are made that:
  1. You know how to connect to your linux server (SSH and SFTP).
  2. You are using a non-root user with sudo.
  3. You know basic linux commands.
If you don't know these things there are many tutorials out there on the interwebs.


Step 1 - Get the base JKA files:
Connect to your server with SFTP (or FTP) and make a main folder where you want to put everything (for example "ja"). Make another folder called "base" and copy following assets into it:
  • base/assets0.pk3
  • base/assets1.pk3
  • base/assets2.pk3
  • base/assets3.pk3

Step 2 - Get the MBII files:

  1. Download the MBII Server full download from Download and get it on your main folder (either with SFTP, if the serverfiles are hosted on Google Drive like they are now, or use the wget command if there's a direct download link).
  2. Unzip the MBII Server full download into your main folder:
    Code:
    cd ~
    cd ja
    unzip MovieBattlesII_FULL_V1.4.zip

  3. Download and unzip the MBII Upgrade (1.4 to 1.4.1) from Download, there's a direct download for this one so we can use wget:
    Code:
    cd ~
    cd ja
    wget https://update.moviebattles.org/files/MovieBattlesII_UPGRADE_V1.4_V1.4.1.zip
    unzip MovieBattlesII_UPGRADE_V1.4_V1.4.1.zip

    Right now you have to download the full version, unzip it, get the upgrade and unzip that one on top of the full version. It is likely that in the near future you'll only have to download one zip that has all the updated MBII server files (and hopefully a direct link so you can use the wget method).

Step 3 - Get the server hosting files:

  1. Download server hosting files:
    Get the server hosting files on your server (download from Fileplanet and transfer, using SFTP, onto your main folder)
  2. Extract (and remove after extracting) the server hosting files:
    Code:
    cd ~
    cd ja
    unzip jalinuxded_1.011.zip
    rm jalinuxded_1.011.zip
  3. Set permission for the server file:
    Code:
    sudo chmod a+x linuxjampded
  4. Move library file to the library:
    Code:
    sudo mv libcxa.so.1 /usr/lib
  5. Set permission for library file:
    Code:
    sudo chmod a+r /usr/lib/libcxa.so.1

Your folder structure should now look like this:

  • /ja
    • /base
      • assets files
    • /MBII
      • Movie Battles II mod files
    • linuxjampded

Step 4 - Launching your server:
  1. Edit the server cfg to your liking:
    Code:
    cd ~
    cd ja/MBII
    nano server_config_default.cfg
    Edit everything you want to edit, description of everything is in the server file itself.
    Change the server file name, save and exit: Ctrl – X; Y; Change name to server.cfg; Enter.
  2. Make a script to launch the server:
    Code:
    cd ~
    cd ja
    nano start.sh
    Copy following line into the script:
    Code:
    ./linuxjampded +set fs_game MBII +set dedicated 2 +exec server.cfg
    Save and exit: Ctrl – X; Y; Enter.
  3. Add permissions:
    Code:
    chmod a+x start.sh
  4. Run screen (so you can close ssh connection and keep server running):
    Code:
    screen -S my_server
    Code:
    ./start.sh
    Press CTRL + A ; D to detach current screen ( u can go back to it with screen -r my_server).

Thats it, you hopefully now have a running MBII linux server.


Troubleshooting:
If you have a 64 bit server you might run into following error:
Code:
-bash: ./linuxjampded: No such file or directory
To fix this, you have to install the 32 bit libraries for linux:
Code:
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386
 

LoU

R2D2
Movie Battles II Team Retired
Posts
746
Likes
651
Thanks @Cow for update and posting it over here. Now... i need a tape or glue to stick it.
 

AaronAaron

Donator
Posts
421
Likes
799
Is it possible to rename the MBII folder to something else? Every time I've done that, it just messes up and doesn't show on the server list at all. I wanna have two servers up at the same time with different mb2 versions, but I don't wanna install the base folder twice in two different locations since I only have limited space(
 

Puppytine

Slayed dreamer
Posts
2,237
Likes
1,487
Is it possible to rename the MBII folder to something else?
Yes it should be possible and it should work.
it just messes up
I don't get it. Explain.
different mb2 versions
It should be possible to run two different mb2 version with a single, shared base folder.
But you'll obviously need to have two folders containing those two different MBII installations.
You can leave one named MBII, other one should be called something like mbiib17.
It's necessary to modify the file that starts server up (.sh) so it use mbiib17 directory, and set up a different port number (every server requires its unique port that isn't in use by anything else).
 

AaronAaron

Donator
Posts
421
Likes
799
But you'll obviously need to have two folders containing those two different MBII installations.
You can leave one named MBII, other one should be called something like mbiib17.
It's necessary to modify the file that starts server up (.sh) so it use mbiib17 directory, and set up a different port number (every server requires its unique port that isn't in use by anything else).
This is exactly what I did, but when the server launches and I connect with the IP I get this:


0333bcacf369cfd4f7004a2d634e3b09.png


this is the actual error after i renamed MBII to MBIIb17 and the same with start.sh to MBIIb17
 
Last edited:

Puppytine

Slayed dreamer
Posts
2,237
Likes
1,487
This is exactly what I did, but when the server launches and I connect with the IP I get this:
Interesting... When you just posted your reply, there was a different screenshot.
Now you have edited your message, putting a new screenshot.
Which screenshot is correct?

Do you have these files in MBIIb17:
cgamei386.so
jampgamei386.so
jampgamei386.nopp.so
uii386.so
?
If you host using OpenJK, did you rename jampgamei386.nopp.so into jampgamei386.so, as it was said by developers on these forums?
 

AaronAaron

Donator
Posts
421
Likes
799
Interesting... When you just posted your reply, there was a different screenshot.
Now you have edited your message, putting a new screenshot.
Which screenshot is correct?

Do you have these files in MBIIb17:
cgamei386.so
jampgamei386.so
jampgamei386.nopp.so
uii386.so
?
If you host using OpenJK, did you rename jampgamei386.nopp.so into jampgamei386.so, as it was said by developers on these forums?
Yeah sorry about that, the second one's correct, ignore the first one. I have all of these files in there too. I'm not sure what you are asking with the last question though since jampgamei386 already exists
 

Puppytine

Slayed dreamer
Posts
2,237
Likes
1,487
Yeah sorry about that, the second one's correct, ignore the first one. I have all of these files in there too.
Linux has case-sensitive filesystem.
Make sure both folder name and fs_path in .sh file have exactly same case (not like MBIIb17 and MBiib17).
I'm not sure what you are asking with the last question though since jampgamei386 already exists
It's about manually replacing jampgamei386.so with jampgamei386.nopp.so.
But now I see it applies to self-hosting, which isn't your case.
 

redsaurus

Movie Battles II Team Retired
Posts
115
Likes
114
Having two MBII folders won't work, as clients that connect to the one with the MBII_other folder will try to load from a nonexistent MBII_other folder and not MBII.

If you want to save space, I think that you can probably share assets either using symbolic links (so that one server's base folder really points to the other's base folder). Not certain but you can possibly share MBII folders too (don't know if there'd be problems with the .so?).
 

Puppytine

Slayed dreamer
Posts
2,237
Likes
1,487
Sorry I meant i renamed both to MBIIb17
So, you're sure both directory name and a line in .sh is "MBIIb17", with absolutely same case, and it doesn't work, with the same error?

Stop the server, open .sh file, add this right after +set fs_path MBIIb17:
Code:
+set logfile 3
Start the server, upload a file "MBIIb17\qconsole.log" to this thread.
If the file isn't there, search the whole drive for "qconsole.log".
Having two MBII folders won't work, as clients that connect to the one with the MBII_other folder will try to load from a nonexistent MBII_other folder and not MBII.
Why this isn't supposed to work? o_0
Is "MBII" directory name hardcoded somewhere?
 

redsaurus

Movie Battles II Team Retired
Posts
115
Likes
114
Why this isn't supposed to work? o_0
Is "MBII" directory name hardcoded somewhere?
When a client attempts to connect to a server with fs_game set to MBII, it also sets its fs_game to MBII. If it attempts to connect to a server with fs_game set to MBII_other, it sets its fs_game to MBII_other - if it doesn't have an MBII_other folder then it won't work.
 

Puppytine

Slayed dreamer
Posts
2,237
Likes
1,487
When a client attempts to connect to a server with fs_game set to MBII, it also sets its fs_game to MBII. If it attempts to connect to a server with fs_game set to MBII_other, it sets its fs_game to MBII_other - if it doesn't have an MBII_other folder then it won't work.
Oh, that makes sense.
But shouldn't this issue be solved if simply all the clients and server would agree to name that non-canon MBII folder with exactly same name?
 

redsaurus

Movie Battles II Team Retired
Posts
115
Likes
114
Oh, that makes sense.
But shouldn't this issue be solved if simply all the clients and server would agree to name that non-canon MBII folder with exactly same name?
Yes, but then the clients would all need multiple MBII folders, and probably only the real MBII folder ones would show up in the server browser, so servers using the correct MBII folder would work better.
 

Puppytine

Slayed dreamer
Posts
2,237
Likes
1,487
only the real MBII folder ones would show up in the server browser
Only servers that run latest MBII version show up in the server browser (in-game, at least) at the first place.
Only servers that run MBII version that matches your version show up in the server browser at the first place.
And the whole point of these guys they want to play some older MBII build.

@AaronAaron , just tell your people to name that additional MBII folder in the exactly same way as it currently named on your server.
If it's MBIIb17, tell them all to rename it to MBIIb17.
Post here if it worked for you. If it didn't, do the qconsole.log thing.

EDIT:
Oh, and btw, surely all the people who want to play on Aaron's server already have latest MBII installed in MBII folder.
If Aaron would set up a server using symlinks, having older MBII build inside of "MBII" folder and not some folder named "MBIIOld" would make problems for all clients, since they all had not to just install that older MBII version, but also they had to rename/move MBII folder to some temporary location, put old build in "MBII" directory, and when they want to play newest Movie Battles they would had to rename/move it back.
Sounds like a too much hassle, arranging some name for everybody should work better.
 
Last edited:

AaronAaron

Donator
Posts
421
Likes
799
Only servers that run latest MBII version show up in the server browser (in-game, at least) at the first place.
Only servers that run MBII version that matches your version show up in the server browser at the first place.
And the whole point of these guys they want to play some older MBII build.

@AaronAaron , just tell your people to name that additional MBII folder in the exactly same way as it currently named on your server.
If it's MBIIb17, tell them all to rename it to MBIIb17.
Post here if it worked for you. If it didn't, do the qconsole.log thing.

EDIT:
Oh, and btw, surely all the people who want to play on Aaron's server already have latest MBII installed in MBII folder.
If Aaron would set up a server using symlinks, having older MBII build inside of "MBII" folder and not some folder named "MBIIOld" would make problems for all clients, since they all had not to just install that older MBII version, but also they had to rename/move MBII folder to some temporary location, put old build in "MBII" directory, and when they want to play newest Movie Battles they would had to rename/move it back.
Sounds like a too much hassle, arranging some name for everybody should work better.
Yes!!! This worked. I'm gonna test it with another MBII version later on, but seeing as it worked with a new folder name, it should work later on. Appreciated, thanks a lot! @redsaurus you too

Yep, all works well!!!!!!
 
Last edited:
Top