How To: Linux B3 for Chivalry



  • This is a long guide, so I’ll get right into it. Please note that I may not get to completing it in one shot, as I’m starting this on a lunch break, but I thought this would be helpful.

    For the purposes of in-depth instruction, I will be showing how I did this with my own game server, Devil Dog’s Den 24/7 Dedicated. I use a separate single-core Linux VDS hosted by NFOservers.com to provide the B3 bot. Technically, if you have a package from them that offers a secondary Webserver, you can SSH into it and install B3 on that as well, and leave it running using Linux’s Screen functions, but that will be covered later in this guide.

    Things you will need:
    Linux VDS Single Core Server (Most cost efficient)

    Step 1 - Transfer the latest Dev B3 build into your server

    ! Step 1 - SCP(SFTP) into your LinuxVDS B3 Server:
    ! Open Filezilla, go to File>Site Manager.
    ! Configure your new connection with your server’s login credentials provided by your host and save/open the connection.
    !
    ! This is the Site Manager window. Configure it as seen above.
    !
    !
    ! This is what FileZilla looks like when connected. Your server’s files appear in the right window pane.
    !
    ! Now we will unzip the B3 daily dev folder on our local system, and transfer the contents into our server.
    !
    !
    ! After this, simply close out of filezilla. You are done transferring the B3 files into the server.

    Step 2 - Install Python-MySQLdb

    ! Step 2 - Install Python-MySQLdb
    ! Note: I do not show how to install or set up the MySQL database in this guide (yet?). Please refer to google or other forums for that information. There are plenty of guides.
    !
    ! Note 2: alternatively, you can follow the bigbrotherbot’s install instructions of the dependancy packages for the database here: Install MySQL Install python-mysqldb
    !
    ! Open PuTTY.
    ! Simply configure it like the picture and hit “Open” or you can save the session for access later.
    !
    !
    ! Now we’re in the PuTTY SSH window. Log in with the credentials supplied by your linux VDS host. (Be careful! They are case sensitive.
    !
    !
    ! After logging in, you will now be in the Linux CLI (command line interface) this is where things get tricky.
    ! If you wish to learn how to navigate through linux based operating systems before tackling this section, please refer to the computerworld cheatsheet: http://www.computerworld.com/s/article/ … geNumber=1
    !
    ! Here we go….
    !
    !
    ! How to install python-mysqldb from the CLI:
    ! ! root@server ~/# apt-get update ! root@server ~/# apt-get install python-mysqldb !
    ! This will automatically install the dependency needed for B3.

    Step 3 - Install MySQL Server

    ! Step 3 - Install MySQL Server
    ! Copied from https://help.ubuntu.com/lts/serverguide/mysql.html
    ! To install MySQL server on your linux server, you simply need to do a few more apt-get commands.
    ! ! root@server: ~# apt-get install mysql-server ! !During the installation process you will be prompted to enter a password for the MySQL root user.
    !
    ! Once the installation is complete, the MySQL server should be started automatically. You can run the following command from a terminal prompt to check whether the MySQL server is running:
    ! ! root@server: ~# netstat -tap | grep mysql ! !
    ! When you run this command, you should see the following line or something similar:
    !
    ! ! root@server: ~# ! tcp 0 0 localhost:mysql *:* LISTEN 2556/mysqld ! !
    ! If the server is not running correctly, you can type the following command to start it:
    ! ! root@server: ~# service mysql restart ! !
    ! Write down your Server’s IP address and listen port for later. If you need more documentation on how to configure your SQL server, please refer to Ubuntu’s MySQL guide, shown here
    !
    ! footnote: If any of these commands aren’t letting you execute them, please add ‘sudo’ to the beginning of each of the command statements. This will allow you to execute them as a super user.

    Step 4: Preparing the CLI to run B3 Persistently

    ! Step 4: Preparing the CLI to run B3 Persitently
    !
    ! At the command line, simply CHANGE DIRECTORY (command: cd) into your directory where b3 is located. It helps that you wrote it down while transferring them through filezilla.
    !
    ! For instructional purpose, I renamed my unzipped b3 folder to just “b3” for ease of access. I recommend you keep your folders named with the current version so you know where each new installations go.
    !
    ! Now we’re going to do something called screening. This allows us to open a “virtual” CLI window inside the system that will run in the background when we exit the SSH connection upon completion.
    !
    ! Simply type screen into the CLI. It will activate Screen mode.
    ! It should instantly change the screen into some informative readme about the Screen version you’re running and whatnot, you can just hit the Enter key to return to your CLI.
    !
    ! Now it may not seem like you’re doing anything, but you’re now in screen mode. What you need to do now is open a new “screen” by hitting Ctrl+A and hitting the C key right afterwards.
    !
    ! To check that you did everything right, type screen -ls which will show you the following screen
    !
    !
    ! Great! Now we’re in a persistent screen. Here is where we’ll run B3_run.py. Onto the next step.

    Step 5: Running and Configuring B3 for the first time

    ! Step 5: Running and Configuring B3 for the first time
    ! Because this is your first time running B3, it will run you through the initial configuration file generation.
    ! The command you want to issue at the CLI, while you’re in your B3 directory:
    ! ! root@server: ~# python b3_run.py ! !
    ! This will run the B3 bot, and since it knows it’s your first time, and that there is an absence of a configuration file, you need to finish setting it up. The first few dialog prompts are about generating a config file, blah blah… its really long, unnecessarily so, but I’ll get to the first interactive part.
    !
    !
    ! This is the first prompt when you run the setup. In the brackets, it shows you what it will do by default if you just hit Enter. Do so now. It will save the config file into the default location, as b3.xml.
    !
    !
    ! This is what happens when you hit Enter. It confirms a backup or creation operation of the new configuration file.
    !
    !
    ! It now asks to define your game. THIS IS IMPORTANT! please read the list of games they have in the dialogue, you should see “chiv” somewhere in there. If you don’t see it there, you have installed the wrong version of B3 and must go back to step 1, where you download the proper version of B3 and transfer it to your server.
    !
    ! For now, type in chiv. Hit enter.
    !
    ! Right after, it asks to use a template. Just hit enter again, it knows it by default.
    !
    !
    ! This is the most important part! This is where B3 prompts you for your MySQL database information. It is extremely important that you take your time and fill this out properly, since if you put in the wrong info, it will encounter errors once you hit Enter. If this happens, just start this guide’s step from the beginning, and run B3_run.py again.
    !
    ! For the MySQL information, the following is the exact format of what you need to input:
    ! ! mysql://user:password@SQLserversIPaddress:Port/databasename ! ! or example: ! mysql://XXX:XXXXXX@ddd.site.nfoservers.com:3306/ddd_b3tut (this is my server's info, minus the user/pass.) ! !
    ! If nothing goes wrong, it should give you the following output….
    !
    !
    ! It will tell you that it has connected, and that it is executing Sql. This means it has successfully entered your MySQL database, and that it has also created the Tables need for B3 to fill in data.
    !
    ! It then asks you for a bot name. This is unimportant, as Chivalry does not show the bot’s name in chat when it echoes out commands. I usually just type in ‘Server’ so that i know what the server replies in the chat log.
    !
    ! After the bot name, it will ask you to configure a bunch of stuff that isn’t really that important. time format, time zone, logging level, etc. Just hit Enter for each prompt to use the default [bracketed] values.
    !
    ! Then we get to……
    !
    ! Here is the next important part! This is where you put in your GAME SERVER IP address. Yes, the IP players connect to when they play. For me, I use my registered domain name.
    ! So I put in Devildogsden.net for the IP.
    !
    !
    ! As you can see, it asks for a game port, just put in 6000. This is the standard query port for the Steam server browser. If you manually configured your UDKGame.ini to make this different, make sure you match it properly.
    !
    ! Then it asks for your Rcon Ip. Also put your game server IP here.
    !
    ! The next prompt is about the Rcon port, just hit enter, or whatever you configured in your UDKGame.ini. (Usually, just hit enter.)
    !
    !
    ! Now it asks for your Rcon password. This is your Adminpassword. This is the same password you use when you’re in the game and use the console to send the command “adminlogin XXXXXX”
    !
    !
    ! Now it asks what development channel do you want the B3 bot to listen to.
    ! WATCH OUT! you’re used to hitting “Enter” to accept the default, but you need to type in
    ! ! dev ! !to make sure it attaches to the dev branch.
    !
    ! Once you hit enter, it will go through a bunch of prompts about in-game messages and such. Just hit enter over and over again until you get to the “installing plugins” part.
    !
    !
    ! Do you want to install all plugins? I would recommend you hit Enter and say yes, as B3 will then install most of the plugins you probably want. If not, and you want to be a hardcore administrator that knows exactly how to install and configure b3.xml to add different plugins, you can change this option.
    !
    ! Once you hit enter, it asks if you want to install the extra plugins. I recommend the default as well, No. It installs Chatlogger, which is not exactly compatible with Chivalry right now, and can cause stability issues with 32+ slot servers. It causes lag, and requires extra configuration.
    !
    ! Just hit enter.
    !
    ! And theeeennn……
    !
    !
    ! WOOHOO! you made it! You barely made it through the gauntlet that is the Bigbrotherbot startup script! You should be proud, as it’s really quite a pain. Darn windows users have it easy.
    !

    Step 6: Finally running your B3 bot persistently

    ! Step 6: Finally running your B3 bot persistently
    !
    ! Now that you’ve finally made it and you’ve configured B3 to run on your server, it’s time to turn it on again.
    ! First, make SURE you’re still in your linux screen:
    !
    ! ! root@server: ~# screen -ls ! !If it says (Attached) on one of the screens, you’re good.
    !
    ! Simply run the b3_run.py again:
    !
    ! ! root@server: ~# python b3_run.py ! !
    ! You should then get the following screen:
    !
    ! This is B3 running.
    !
    ! If you’re satisfied with a stock intallation of B3, you can continue to take the steps in safely exiting your SSH connection with your server. If not, you need to open up FileZilla again and find the b3.xml in your /b3directory/conf/ folder. The xml is very easy to read, and for any savvy admin, you can configure your plugins right then and there without documentation. If you’re just happy that you got B3 to work, continue on with the guide.
    !
    ! The following commands will not have screenshots, as moving around in screens is hard to capture accurately without confusing the viewer. If you’re still in the same screen as where B3 is running, and you can’t type anything, simply use the following keystrokes and commands:
    !
    ! Ctrl+A
    ! D
    !
    ! This will drop you out of all your screens back into the bash shell. simply issue the following command to exit your SSH connection and finalize your work:
    ! ! root@server: ~# exit ! !
    ! your PuTTY window should close automatically. Congratulations! You’re done! Except not really, now you have to get to the actual part where you use B3. continue…

    Step 7: Using B3 and Become SuperAdmin(Owner)

    ! Step 7: Using B3 and Become SuperAdmin(Owner)
    ! This part is very easy to explain, but it is also very important.
    ! To register your Steam account in your server as the SuperAdmin, log into the game, and get into your server.
    ! Then hit ‘Y’ (or whatever you use to chat)
    ! and type in !iamgod
    ! This is a one-time command, and upon usage, edits the commands config file and deletes the command. its a one-way ticket into becoming superadmin on the first time B3 runs on the server. If you did it right, it should now say you’ve become SuperAdmin, and applies a user level of [100].
    !
    ! You are now done.



  • Reserved for expansion and additional explanations



  • Reserved for expansion and additional explanations



  • Bump, I noticed some people were re-creating B3 tuts, so this is just to bring it back into view.

    I still believe B3 is the best option for RCON right now.


Log in to reply