Graal 1.39 Server (Gserver)
Update (03/24/06): You can download the Linux/MySQL account adding script
You can get the Linux 1.39 Gserver here. and Graal 1.39 Client here.
So, you want to run a Graal 1.39 Server. You'll be installing linux, since it seems to be the most stable one out there. If you don't have the Mysql Linux Gserver (1.39), you can find it with google, on this site, or coming on down to our IRC server (irc.unhandledexceptions.com)
This is not a linux guide, so I won't tell you how to install it. No doubt you'll be able to find a nice distro that's easy to install.
This guide will cover the following:
I) Type of machine you'll need
II) Software requirments
III) Settuping up the gserver
IV) Maintaining a website in order to monitor the gserver, and add users w/o the RC
I. Type of machine you'll need
If this is a private server for you and a few friends (or your LAN), then 233mhz/96mb should do just fine. You'll probably want a 3gb hard drive or higher.
If you have a spare computer, chances are it's faster than this.
If you believe your levels will be popular enough, you'll probably want 1ghz+, 256mb+ ram, and 10gb+ hard drive. The more ram you have, the more people you can server (you'll probably run into problems with low ram before you run out of bandwith... assuming you have DSL/Cable)
Especially since you'll probably want to run apache and UnrealIRCD, you might want to think about picking up a 512mb stick of ram.
If you have a router, you'll need to forward the following ports:
II. Software requirments
I've included the following that you may need to use to get the gserver running on a newer linux distro:
If gserver starts w/o any errors, you won't need these. I'll get back to these a bit later.
You'll need the following programs (which you can probably get installed during the main setup):
An optional (but reccommended) thing to get is UnrealIRCD. This might be difficult to set up yourself, so don't worry about it too much if you fail.
I will not go over the install of Mysql/Apache/PHP. If you need help, visit http://unhandledexceptions.com and find the tutorials. There is one there for LAMP (Linux Apache Mysql PHP).
Make sure to make a non-root system user, and a non-root mysql user.
You can do this by (as root):
# useradd -G users -m -s /bin/bash gserver
# passwd gserver
# locate mysqladmin | grep bin (should give you a path to mysqladmin)
# mysqladmin -u root password new_password
# mysql -p
# mysql> CREATE DATABASE gserver;
# mysql> GRANT ALL PRIVLEGES on gserver.* to gserver@localhost identified by 'hard-to-guess-pass';
# flush privileges;
III. Setting up the gserver
Now that you have a non-root mysql and user account, let's log into it.
# su gserver (if you do this as root, it will not ask you for a pass)
# mysql -p
If you get an error about the password being incorrect, check in /root/.mysql_history to see if you typed in the wrong password. Make sure you entered in 'flush privileges;'!
Now you're ready to start. Move/unzip the gserver files to /home/gserver
These should include a folder called 'gserver'
# cd /home/gserver/gserver/data
# locate mysql.sock
# locate mysqld.sock
# nano -w mysql.txt (or vi mysql.txt - nano will be easier for you)
Enter in your password, and socket. (mysql.sock or mysqld.sock), and save and exit.
# nano -w ipgps.txt
Make sure it says admin:*.*.*.*
Now let's start the gserver.
# cd /home/gserver/gserver
# chmod +x gserver
# ./gserver 14900 &
If you don't have any errors, your gserver is running!
If you do, your best chance is to use google, since most of this stuff is Distro specific.
The following way worked for Debian and Gentoo:
Copy libstdc++-libc6.2-2.so.3 to /usr/lib/libstdc++-libc6.2-2.so.3
Copy libmysqlclient.so.10 /usr/lib/libmysqlclient.so.10
Copy libmysqlclient.so.12 /usr/lib/libmysqlclient.so.12
To be safe, we're going to unzip both lib-compat-1.4 and lib-compat-2.4 to a temp folder (/tmp works well ;))
Now copy the contents of the x86 folder (not the folder itself!) to /usr/lib
Now run 'ldconfig'
Please try 1.4 first (and then running ldconfig) and then 2.4
Now try running the gserver again; it should work. If not, start googling or some on IRC (if you're willing to give me access to your box).
Chances are I can help you.
IV. Tips/tricks with the Linux gserver
Getting rid of cheaters/trolls
Lets you IP ban specific IP addresses. If you want to ban a range, I do not believe astericks will work. Instead, try this BASH script:
nano -w /usr/bin/ban
enter in the following:
iptables -A INPUT -s $1 -j DROP
iptables -A OUTPUT -s $1 -j DROP
echo $1 was banned
# chmod +x /usr/bin/ban
# ban 192.168.1.0/24
(that will ban 192.168.1.*)
# ban 192.168.0.0/16
(that will ban 192.168.*.*)
Don't actually ban 192.168.*.*, especially if you have a router. You'll end up locking yourself out of your own server!
Putting everything together
This allows astericks. You can limit what RC accounts can log onto RC by IP address. I would recommend this (even if they have dialup, their IP won't change dramaticly unless they use AOL)
You need to put all levels/gifs in this folder in order for people to see them (gifs needs to be put in both levels/, and levels/item). Remember, you need an onlinestartlocal.graal to be able to play!
For example, shields need to go in levels/ and levels/shields/ for people to download them while they play
Stopping the Big Bad Bug
If you use a player world someone else made, this will be hard. If you're making your own though, this will be rather easy.
If your server gets restarted, power goes out or you accidently kill your gserver, you'll notice (upon starting it back up) that all player weapons have vanished.
They havn't, damnit! They're still there, you just need to tell the server they're there.
A good way to fix this is to have a staff-only level with EVERY item in the world there, able to be picked up. With the RC, warp there. Remove all your weapons. Get them all again. Now have your players log out/on, and they will have all their stuff back.
If you would like a little box to pop up when users log on (only once until it gets updated) make a 'startmessage.rtf' in your /home/gserver/gserver folder. If you make it with wordpad, I believe you can add color to it.
IV. Maintaining a website
I have a page called 'join.php'. It lets people make their own accounts, safely. I do not give this out (except to a few people), but you can still use it if you ask!
I can host it on my server, but it can still add users to your database. Come on IRC and ask me about it some time (it can even appear to be hosted on your site).
I also have a few other scripts that I would host for your graal server.
Classic Stats (shows top 10 online time, kills, deaths, rupees, etc.)
I even have a script (that I would give you) that shows your graal server's uptime, max users, and current online users.
By the time you read this, I might even have some more nifty stuff (like guild managment).
Stop on by and feel free to hang out, and ask questions.