Skip to content

Quick Start Guide

Brian Wilhite edited this page May 18, 2021 · 68 revisions
Windows 10

To Install

  • Install Git for Windows, accept defaults, change default text editor if desired.
  • Install Visual Studio 2019, check Desktop development with C++.
  • Install MariaDB, use defaults, set a root password.
  • Install Python 3, check to add to PATH.
  • Open a PowerShell window and navigate to your chosen install directory.
  • Download the latest code, install Python requirements, and copy the configuration files:
    git clone --recursive https://github.com/LandSandBoat/server.git
    py -3 -m pip install -r server/tools/requirements.txt
    cp server/conf/default/* server/conf/
    
  • Edit the new login.conf, map.conf, and search_server.conf files in server/conf/ and change mysql_password to the password set during MariaDB setup.
  • Back in your PowerShell window, move to server/tools/ and build the database:
    cd server/tools
    py -3 dbtool.py
    
  • Follow the on-screen instructions.
  • Open the server root folder in VS2019.
  • Build the solution in VS2019.

To Update

  • Open a PowerShell window and navigate to your server directory.

  • Stash any changes you've made and pull the latest code from upstream:

    git stash
    git pull
    git stash pop
    

    ⚠️ Pay attention! If you stashed any changes, there is a chance you will see the following:

    CONFLICT (content): Merge conflict in some file

    ⚠️ If this happens, you need to manually edit the conflicting files before continuing.

  • Move to server/tools/ and update the database:

    cd tools
    py -3 dbtool.py update
    
  • Open the server root folder in VS2019.

  • Build the solution in VS2019.

Linux

To Install

  • Use your package manager to install the following packages or their equivalent:

    Debian/Ubuntu
    sudo apt update
    sudo apt install git python3 python3-pip g++-9 cmake make libluajit-5.1-dev libzmq3-dev libssl-dev zlib1g-dev mariadb-server libmariadb-dev
    
    • Debian 10/Ubuntu 18.04: See the Linux Setup Guide for information about upgrading to and building with g++-9.
    Arch
    sudo pacman -S git python3 python-pip gcc cmake make luajit zeromq openssl zlib mariadb
    
    • Arch users will need to initialize and start the database software if not done already:
      sudo mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
      sudo systemctl enable mariadb
      sudo systemctl start mariadb
      
  • Download the latest code, install Python requirements, and copy the configuration files:

    git clone --recursive https://github.com/LandSandBoat/server.git
    pip3 install -r server/tools/requirements.txt
    cp server/conf/default/* server/conf/
    
  • Run the following script to improve database security:

    sudo mysql_secure_installation
    
  • Type the following to create a database user with the login xi and password password, and an empty database called xidb. Change these to improve security:

    sudo mysql -u root -p -e "CREATE USER 'xi'@'localhost' IDENTIFIED BY 'password';CREATE DATABASE xidb;USE xidb;GRANT ALL PRIVILEGES ON xidb.* TO 'xi'@'localhost';"
    
  • Edit the new login.conf, map.conf, and search_server.conf files in server/conf/ and change mysql_login, mysql_password, and mysql_database to the information used above (xi, password, and xidb).

  • In the server directory, prepare and build the executables:

    mkdir build
    cd build
    cmake ..
    make -j $(nproc)
    
  • Wait for the build to complete, then move to server/tools/ and build the database:

    cd ../tools
    python3 dbtool.py
    
  • Select 'Reset DB' and follow the instructions to "reset" the database.

To Update

  • Open the server directory in a terminal.

  • Stash any changes you've made and pull the latest code from upstream:

    git stash
    git pull
    git stash pop
    

    ⚠️ Pay attention! If you stashed any changes, there is a chance you will see the following:

    CONFLICT (content): Merge conflict in some file

    ⚠️ If this happens, you need to manually edit the conflicting files before continuing.

  • Prepare and build the executables:

    cd build
    cmake ..
    make -j $(nproc)
    
  • Wait for the build to complete, then move to server/tools/ and update the database:

    cd ../tools
    python3 dbtool.py update
    

Next Step: Post-Install Guide

Clone this wiki locally