This is a quick noobie guide to get a dedicated pokerTH server running on a Ubuntu box.
Before this I had almost 0 Linux experience, and this guide goes through the setup without doing any compiling or anything complicated. I run an online poker league with my friends and used to run just a network game but was worried about the dependency of whoever started the game. So this guide is for anyone that wants to host a server on their own network.
Things you will need.
-Ubuntu Linux installed on a PC on your network or even better, set it up on a virtual box such as VMWare ESXi Free version as I have.
Step 1
Once Linux is installed create a user ID with Admin access (I called mine poker). Make sure the user has a home directory. Log in with that user ID.
Step 2
Go to this link.
https://launchpad.net/~pkg-games/+archive/ppa/+packages
Expand pokerth - 1.0-1~ppa1~oneiric2 and download the following files in the package
- pokerth-data_1.0-1~ppa1~oneiric2_all.deb
- pokerth-server_1.0-1~ppa1~oneiric2_i386.deb (For Intel CPUs)
-Or if you are using AMD it will be the _amd64 file instead of the i386
Step 3
Install both of the files in your Ubuntu OS.
Now things are going to get a little tricky
We need to find where those files installed and copy them over to the User Home Directory.
I did this by searching the file system for the word "poker" however here are the locations of files you need to move over.
-pokerth folder should have installed to /usr/share/games
-copy that to home directory
-pokerth-data should have installed to /usr/share/doc
-copy inside of the pokerth folder above
-pokerth-server should have installed to /usr/share/doc
-copy inside the pokerth folder above again
-pokerth_server exe application file should have installed to /usr/games
-copy into pokerth folder above again
SO in your home directory you should have the pokerth folder (not to be confused with the .pokerth folder as that is different)
Inside the pokerth folder should be the following folder and files
-fonts
-gfx
-misc
-pokerth-data
-pokerth-server
-sounds
-translations
-pokerth_server application file
Also it is a good idea to display hidden folder in the directory.
Step 4
Once the directory has the right folders and files we can test to make sure it is working.
Open Terminal
type in the following
/home/<username>/pokerth/poker_server (If you get any errors you have not copied the files properly)
Now lets verify it is working by typing in the following
ps ax | grep pokerth_server
It should now show 2 lines, one gives us the SSL with a PID, if you get this the server is running.
Now let's make sure it's running correctly.
Type in the following
less ~/.pokerth/log-files/server_messages.log
You should get the following message
2013-Jan-18 19:20:24 MSG: Starting PokerTH dedicated server. Availability: IPv6 1, SCTP 1, Dual Stack 1.
If you get messages like this.
2013-Jan-18 19:20:24 ERR: Avatar directory does not exist.
2013-Jan-18 19:20:24 ERR: Avatar directory does not exist.
2013-Jan-18 19:20:24 ERR: Missing files - please check your directory settings!
You are missing files/folders in the directory.
Step 5
Ok now that we have it running let's stop it and configure the config.xml file
In terminal type killall pokerth_server
In the .pokerth folder in your home directory is where the config.xml file is located. (If you do not see the .pokerth folder you need to be able to see hidden folder)
You will need to edit the following settings
<InternetServerAddress value="<Your externally facing IP Address or domian name>" />
<InternetServerPort value="<The port in which you want connection to come in default is 7234>" />
Make sure you open the port on the router if you want external players to come in.
NOTE: If you are only setting this up internally the IP address will be the internal IP for the server.
Save the file.
Step 6 (Connecting Clients to the Server)
Go ahead and start the pokerth_server process in terminal like you did above.
Now on another PC open up the PokerTH client.
Go to Settings and Configure
In the Internet Game Settings check Manual Server Configuration.
Server Address: The IP or Domain you set in the config.xml file
Server Port: The port you assigned it
Click OK.
Now just click on Internet Game and you're in.
You now can setup games on your own network.