b3 Basic Setup [Windows/Ubuntu]


  • VIP

    [Windows Setup]

    Requirements:

    • A PC with T6 server working.
    • Microsoft Windows.
    • b3 Python Version (To use T6 Parser).
    • Notepad++(Optional).

    1. Downloading and Installing Software:

    • Download and Install Xampp Server(For Mysql database). here
    • Download Python Version of b3 (Github) and put it in a directory. here
    • Download and Install Python2.7. here

    2. Configuration for b3:

    • Making a database for b3:
      Once Xampp Server is running, Open your web browser on the local machine where you are setting up the b3. Go to address localhost/phpmyadmin and It should login to phpmyadmin by default, Create a database named b3_db. After creating the database, Import the sql tables from your b3 directory that you have installed earlier, the location for this file is default as big-brother-bot/b3/sql/mysql/b3.sql. Once you have imported it, Create a user for b3_db with all permissions and remember the credentials. You can make the database accessible for localhost only or AnyHost Depending on your needs.

    • Making b3 configuration file:
      You have to create a b3 configuration file, which you can create from their config generator on their website b3 Config. Carefully fill all the information and Select Call of Duty: Modern Warfare 2 as the game (We will change it later when we add t6 parser), use the Database we have created earlier and write the credential of database user so b3 can access it. Once the Config is generated, Open it with Notepad++ and change the parser to pluto_t6. Copy the config file to b3 directory which is by default big-brother-bot/b3/conf

    • Plutonium T6 Parser:
      Thanks to Xerxes for making Plutonium T6 parser and making it public. You can download these parser from the following link Plutonium parser. Once you have downloaded the parser, Put them in b3/parsers folder.

    3. Configuring Python2.7 and Installing required tools to run b3:

    • Installing dateutil and python-mysql database connector:
      These are required to making b3 fully functional and working properly. To Install these, Open Command Prompt as Administrator and go to Python2.7 Scripts directory, If you have installed Python2.7 at it's default directory, It should be C:\Python27\Scripts\ Once you have reached there with Command Prompt, Write easy_install python-dateutil and easy_install pymysql.

    4. Running b3:

    • Running b3:
      Once the whole setup listed above is done. Run b3 by going to b3 directory and running b3_run.py by double clicking it or by directing to b3 directory by Command Prompt and executing b3_run.py in command prompt.

    • Getting Permissions:
      Once this is all setup and running, Go to your game server for which you have just setup b3 and type !iamgod to get Super Admin permissions.

    [Ubuntu Setup]

    Requirements:

    • A PC with working Plutonium T6 Server and Ubuntu.
    • b3 Python Version (To use T6 Parser).

    1. Downloading and Installing required softwares:

    Run the Following Command as a sudo user to install the required software.

    • sudo apt-get install php5
      why php5 you might ask, because it is fully functional as newer versions of php and if you install XLRstats Web, You would require this version of php. You might have to install php5 dependencies to install php5.
    • sudo apt-get install apache2
    • sudo apt-get install mysql-server mysql-client
    • sudo apt-get install phpmyadmin
      You will be asked to configure phpmyadmin for a webserver. Select apache2 with pressing TAB and Proceed with installation.
    • sudo apt-get install python
    • sudo apt-get install python-mysqld
    • sudo apt-get install python-dateutil
    • sudo pip install PyMySQL

    Downloading Other Essential Things.

    • Downloading b3 from Github:
      Make a directory for b3 and go to that directory with cd command. Once you are on the directory. run git clone https://github.com/BigBrotherBot/big-brother-bot.git. This will download b3 from Github.

    2. Configuration for b3:

    • Making a database for b3:
      Once Apache2 Server is running, Open your web browser on the local machine. Go to address <ubuntu machine ip>/phpmyadmin and It should login to phpmyadmin by credentials that you have setup while installing phpmyadmin, Create a database named b3_db. After creating the database, Import the sql tables from your b3 directory that you have installed earlier, the location for this file is default as big-brother-bot/b3/sql/mysql/b3.sql. Once you have imported it, Create a user for b3_db with all permissions and remember the credentials. You can make the database accessible for localhost only or AnyHost Depending on your needs.

    • Making b3 configuration file:
      You have to create a b3 configuration file, which you can create from their config generator on their website b3 Config. Carefully fill all the information and Select Call of Duty: Modern Warfare 2 as the game (We will change it later when we add t6 parser), use the Database we have created earlier and write the credential of database user so b3 can access it. Once the Config is generated, Open it with Notepad++ and change the parser to pluto_t6. Copy the config file to b3 directory(Ubuntu machine) which is by default big-brother-bot/b3/conf.

    • Plutonium T6 Parser:
      Thanks to Xerxes for making Plutonium T6 parser and making it public. You can download these parser from the following link Plutonium parser. Once you have downloaded the parser, Put them in b3/parsers folder.

    3. Running b3:

    • Running b3:
      Once the whole setup listed above is done. Run b3 by going to your b3 directory and running the command python ./b3_run.py. You might need to run it under screen or any other software that if you disconnect from ssh client, it may not go off.

    • Getting Permissions:
      Once this is all setup and running, Go to your game server for which you have just setup b3 and type !iamgod to get Super Admin permissions.

    Note: Suggestions to make this tutorial better are welcomed. :D


    All of the above procedure is chosen so the user can make changes easily after the installation of b3. You can easily edit tables and user information from phpmyadmin.



  • Good Job Mista 😋😋


  • VIP

    Nice work bro, this help a lot for ppls who's using executable b3 thanks for tut .
    keep it up :)



  • nice .. it worked ...


  • Project Moderator

    Good tutorial Musta, looks like you put lots of effort in to it, so well done 😀👍


  • Project Moderator

    Nice tutorial, but I do not recommend to download non stable versions of B3. Why even bother to install PHP an Apache when you don't set up the web panel? (Also you don't have to manually import the b3 SQL tables at it can do so on its own when the user has the permissions to do so)



  • @xerxes that’s why I recommend people to use IW4MAdmin. It’s a lot less headache. Plus now it’s pfficially cross platform.


  • Project Moderator

    @raidmax Yeah no thanks I prefer a real DB server behind my stuff since I host multiple servers from multiple machines. Binary plugins are a big no for me as well.



  • @xerxes MySQL provider will also be supported in official release. It’s trivial to use most database providers too like postgres. Fair enough about binary plugins but that’s why I open source all my software.


  • Project Moderator

    @raidmax Thats good, there are quite a few good EF implementations for MySQL. Why don't you just compile the plugins on load time and only distribute the source?


  • VIP

    @xerxes some of the php mods are required for phpmyadmin to be fully functional with Apache2, i wanted to make it the easier way for every since I find other ways hard for new users.



  • "easy_install is not recognized as Internal or External command...."
    If anyone know, Please help ASAP.


  • VIP

    Please make sure that your directory is Scripts folder in Python2.7 Installation directory. The command Prompt must say
    C:\Python27\Scripts>
    If it doesn't write
    cd C:\Python27\Scripts



  • This post is deleted!


  • Well said and well done !!
    Its a good tutorial and it helped me !!!
    Thanks musta


  • VIP

    All the possible modules required by b3 with official files and plugins.

    pymysql
    python-dateutil
    feedparser
    requests
    

    If you guys have any issues with b3 not running a plugin, please make sure that you have all the above modules installed.
    Installation is simple for the modules,
    Go to Scripts folder in Python27 directory. cd C:\Python27\Scripts
    Syntax for installing the module required.
    easy_install <module>



  • Thanks for the guide adding links to the required files would make it even better then no one needs to search for it just a suggestion :)


  • VIP

    @x7razor_za Thanks for the suggestion. I have added the links to official sites for windows. In case of linux, all the downloading is done by the commands. Now the users can just click the links and go to the official sites of software that are required.



  • @musta Thanks for adding it think all the new people will find this guide real handy :)


  • VIP

    Some of the users have been reportedly getting issues with easy_install, so if you are one of them, you can try this method to install your python modules.

    pip (python packages installation software powered by python itself) will be used in this case.
    Simple go to your Python27 Scripts installation directory with Command Prompt as shown below;
    cd C:\Python27\Scripts

    Once you are in the directory, write in the following syntax
    pip install <module>

    All the Plugins that are required by b3 officially to function normally are as listed.

    pymysql
    python-dateutil
    feedparser
    requests