Raspberry Pi 3 B+ Server Setup Guide

Post Reply
Bandit
Posts: 13
Joined: Sun Jan 20, 2019 10:53 am

Raspberry Pi 3 B+ Server Setup Guide

Post by Bandit » Thu Jan 24, 2019 9:00 pm

First of all I do not take any credit for writing this guide as this was one I had discovered from a reply to a forum post. ORIGINAL POSTER OF GUIDE DESERVES CREDIT SO PLEASE GIVE CREDIT WHERE CREDIT IS DUE!!! I only posted this in Server Guides section of forums to "preserve" it for others who would like to have a server working on their RPi. This server works but if you have issues with it, I will not be responding to any technical/software/coding issues in any posts and/or messages. I have used Linux sporadically since 2001 so I still consider my self a "noob" to Linux and have very,very little knowledge of it.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Re: Raspberry Pi 3
Post by Limbomaniac » Tue Nov 28, 2017 4:35 am

Allright. I managed to look into it and did this step-by-step guide on how to build and run it on a Raspberry Pi 2/3.

If you follow this instructions, everything should be working flawless. Passwords and Usernames are to be changed. This guide simply uses the ones shown in the "Building the Server" wiki page.

Guide:

Install Raspbian via Noobs
Open a Terminal window and type in:

Code: Select all

sudo su
apt-get install mysql-server	
apt-get install autoconf
apt-get install libzmq3-dev
apt-get install screen
cd ..
cd ..
nano /etc/apt/sources.list	//	Change from stretch to testing
strg-o then strg-x
apt-get update
apt-get install build-essential
apt-get install libluajit-5.1-dev
apt-get install libmariadbclient-dev
git clone http://github.com/DarkstarProject/darkstar.git/
cd /darkstar/
git checkout stable
sh autogen.sh
./configure LIBS='-lm'
make distclean // I had to do this because the build failed when I tried to compile it directly. 
./configure LIBS='-lm'
make -j2
Now this will take some time. About an hour on a RPi 2. A little less on a RPi3. Wait until its finished. Then go on and setup the Database by typing:

Code: Select all

mysql 
create database dspdb;
CREATE USER 'darkstar'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON dspdb.* TO 'darkstar'@'localhost';
exit
cd sql
for f in *.sql 
do 
echo -n "Importing $f into the database..." 
mysql dspdb -u darkstar -ppassword < $f && echo "Success" 
done
It will now import all .sql files into the Database. This will take some moments. Afterwards go on by editing the Database and .conf files.

Code: Select all

mysql -u darkstar -ppassword
USE dspdb;
UPDATE zone_settings SET zoneip = '127.0.0.1';
exit
cd ..
cd conf
nano login_darkstar.conf
mysql_login: darkstar
mysql_password: password
ctrl+o 
ctrl+x
nano map_darkstar.conf
mysql_login: darkstar
mysql_password: password
ctrl+o 
ctrl+x
nano search_server.conf
mysql_login: darkstar
mysql_password: password
ctrl+o 
ctrl+x
cd ..
Open 3 Terminals and start the game server

3x

Code: Select all

sudo su

3x

Code: Select all

cd /darkstar/

Code: Select all

./dsconnect
in Terminal 1

Code: Select all

./dsgame
in Terminal 2

Code: Select all

./dssearch
in Terminal 3


If it says you have a different client version, then change it to this number. Did work for me.

Code: Select all

nano version.info
client_ver: 30170307_0
ctrl+o
ctrl+x

I will later post a way to automatically start the servers, everytime the RPi boots up. Right now I did it via rc.local but I want to establish it via systemd.

Have fun! Hope I could be of any help to those, who wanted to give it a try on a RPi.

Delaide
Posts: 478
Joined: Sat Jun 14, 2014 8:58 am

Re: Raspberry Pi 3 B+ Server Setup Guide

Post by Delaide » Mon Apr 15, 2019 4:51 am

Nice. When I have time, I will try to add it to the wiki.

Bandit
Posts: 13
Joined: Sun Jan 20, 2019 10:53 am

Re: Raspberry Pi 3 B+ Server Setup Guide

Post by Bandit » Sun Apr 21, 2019 1:02 am

@Delaide Please be sure to give Limbomaniac credit since he was the original poster of the guide. I only helped clean it up for neatness and understanding :)

Limbomaniac
Posts: 6
Joined: Sat Nov 11, 2017 8:21 am

Re: Raspberry Pi 3 B+ Server Setup Guide

Post by Limbomaniac » Sun May 19, 2019 8:06 am

@Bandit: Thank you very much for cleaning up my guide. I hope you tried it and got it up and running on a RPI yourself. Still love the game and am happy to see a striving community keeping it up. Thanks alot!!

Best regards
Limbomaniac

Bandit
Posts: 13
Joined: Sun Jan 20, 2019 10:53 am

Re: Raspberry Pi 3 B+ Server Setup Guide

Post by Bandit » Fri May 31, 2019 8:21 pm

Your very welcome. I have had it running on my raspberry pi 3 b+ but currently dont have it installed right now but will have it installed again soon :) The guide works flawlessly :)

Bandit
Posts: 13
Joined: Sun Jan 20, 2019 10:53 am

Re: Raspberry Pi 3 B+ Server Setup Guide

Post by Bandit » Thu Jun 27, 2019 6:32 am

Something was tweaked with the MySQL Server program for Raspberry Pi and there for there is an error when doing the make -js saying a file doesnt exist so therefore this guide is no longer valid. This does not have anything to do with the Recent release of Raspberry Pi 4 and Raspbian Buster. They changed something in the MySQL program that caused the error. I tried again last night and now it wanted me to install mariadb-server-10.0 instead. Gave that a try and still same error on make -js. If someone can figure out the error and get it working, post your correction on this guide and I will update it after testing

Delaide
Posts: 478
Joined: Sat Jun 14, 2014 8:58 am

Re: Raspberry Pi 3 B+ Server Setup Guide

Post by Delaide » Mon Jul 01, 2019 9:29 pm

Windows version of mysql 8 also has the same issue.
They removed the password, which seems to be the main issue. dsp has fits if password isn't default defined.

Post Reply