Now when I build I have printed out the following checklist for building my server
Basically I cut out all of the explanation
NOTE: There is a fix part way through this description credited to Hoikas Note this is a TEMPORARY fix at some point we will remove that fix at which point It will no longer be needed.
The spoiler tags are just to make a long posting tidier.
This condensed version is only up to the point where you have generated your KEYS so that is up to the point where you are going to make your server.ini and dirtsand.ini files plus stuff your SDL and ages folder with the appropriate stuff.
- Show Spoiler
[edit]
"apt-get" has a replacement which is just "apt" I am testing this and if it works I will edit the listing
One of the cute things about this new apt command is it adds a cute progress bar to the bottom of the screen
I have also discovered if you add -y to the end of your install line it kill the Y/n question and just get on with installing your stuff.
Yes I built another shard and apt on its own and the terminating -y works so I have edited both files
[/edit]
- Code: Select all
$fdisk /dev/sda (remove all partitions then boot from install DVD and install Ubuntu Server)
$ sudo apt update
$ sudo apt upgrade -y
$ sudo apt install build-essential git cmake libpq-dev libssl-dev libreadline-dev zlib1g-dev postgresql postgresql-contrib apache2 php7.2 -y
$ sudo useradd dirtsand -d /opt/dirtsand -m -s /bin/bash -g sudo
$ sudo passwd dirtsand
$ sudo reboot
$ git clone https://github.com/zrax/string_theory.git
$ git clone https://github.com/H-uru/dirtsand.git
$ mkdir string_theory/build && mkdir dirtsand/build
$ mkdir ages
$ mkdir data
$ mkdir authdata
$ mkdir SDL
$ cd string_theory/build
$ cmake ..
$ sudo make install
$cd /opt/dirtsand/dirtsand/AuthServ
$nano AuthDaemon.cpp
Hoikas temporary fix. You need to navigate to line 33 it should look like
std::unordered_map<ST::string, SDL::State, ST::hash_i, ST::equal_i> s_globalStates;
You need to edit this line to remove the _i in the middle so it reads
std::unordered_map<ST::string, SDL::State, ST::hash, ST::equal_i> s_globalStates;
[Ctrl][x] y [Enter] will replace the existing file with the corrected one.
$ cd /opt/dirtsand/dirtsand/build
$ cmake -DCMAKE_INSTALL_PREFIX = /opt/dirtsand ..
$ sudo make install
$ sudo -u postgres psql -d template1
template1=# CREATE USER dirtsand WITH PASSWORD 'laundrymarker';
template1=# CREATE DATABASE dirtsand WITH TEMPLATE = template0 ENCODING = 'UTF8';
template1=# ALTER DATABASE dirtsand OWNER TO dirtsand;
template1=# \q
$ sudo -u postgres psql -d dirtsand
dirtsand=# CREATE EXTENSION "uuid-ossp";
dirtsand=# \q
$cd /opt/dirtsand/dirtsand
$ psql -d dirtsand < db/dbinit.sql
$ psql -d dirtsand < db/functions.sql
$cd /opt/dirtsand/dirtsand
$ cp dirtsand.sample.ini dirtsand.ini
$ bin/dirtsand
ds-918> keygen new
ds-918> quit
[HEADS UP]
Under no condition log in and create an Avatar UNTIL you have your SDL files on Both your Client and Server FAILURE to do this will screw your login. The couple of times I have been stupid enough to do this I ended up Rebuilding my Shard.
[/HEADS UP]