$ cmake -D CMAKE_INSTALL_PREFIX=/usr . $ make $ make test # make install
TinyPoker |
|||||||||||||||||||||||||||||||||||||||||||||||||
Menu |
Server SetupThis document explains how to build, configure, and run the TinyPoker server, tinypokerd. Install the DependenciesTinyPoker makes use of several software libraries. Each one must be installed before building and running tinypokerd. A complete list can be found on the download page. Obtain the Source CodeThe next step is to get a copy of the libtinypoker and tinypokerd source code. This can be done by checking out a fresh copy from the subversion repository or by downloading the latest release. Build and Install libtinypokerExample: Configure, make, test, and install
$ cmake -D CMAKE_INSTALL_PREFIX=/usr . $ make $ make test # make install Build and Install tinypokerdExample: Configure, make, and install
$ cmake -D CMAKE_INSTALL_PREFIX=/usr . $ make # make install Add a tinypokerd User and Grouptinypokerd needs root privileges to do some setup when it first starts up, and as soon as it's done, tinypokerd drops root privileges. A user must exist for tinypokerd to run as after it drops root privileges. In the example below we create that user and set the shell to nologin. # useradd tinypokerd
# chsh tinypokerd
Login Shell [/bin/sh]: /bin/nologin
You can pick a different username and group if you wish. Both are configurable via tinypokerd.conf. Create a directory for configuration DataThe configuration file is stored in /etc/tinypokerd by default. You can use an alternate location by invoking tinypokerd with a command line argument (see the bottom of this document for details). # mkdir /etc/tinypokerd # chown tinypokerd:tinypokerd /etc/tinypokerd # chmod 700 /etc/tinypokerd Create a directory for protocol Logs (Optional)The server provides the option to log all protocol messages sent and received. This could be useful for statistics or research. The feature is disabled by default since it eats up disk space and may make the server slightly slower. It can be enabled via tinypokerd.conf. If enabled, a directory is needed to store the log. # mkdir /var/log/tinypokerd # chown tinypokerd:tinypokerd /var/log/tinypokerd # chmod 700 /var/log/tinypokerd Note, regular log messages generally will not show up in this directory. They are sent directly to syslog. Create a run Directorytinypokerd creates a PID file when it starts up. The PID file keeps track of the running instance of tinypokerd. It can be used to tell if the daemon is running or not as well as stopping a running daemon. In the example below we create the directory and give the tinypokerd user permission to it. # mkdir /var/run/tinypokerd/ # chown tinypokerd:tinypokerd /var/run/tinypokerd/ Configuration FileThe tinypokerd configuration file provides the server with operating parameters. The defaults should work fine in most use cases. Below is a list of every possible configuration option. List of Configuration Options
Example Configuration FileExample: /etc/tinypokerd/tinypokerd.conf
# This is a comment setuid = tinypokerd setgid = tinypokerd protocol_log_enabled = true protocol_log_file = /var/log/tinypokerd/protocol.log # Texas Hold'em game_type = 1 Run tinypokerdList of Command Line Options
Example CommandsExample: Start the Tiny Poker Daemon
# /usr/sbin/tinypokerd Example: Stop a running Tiny Poker Daemon
# /usr/sbin/tinypokerd --kill Example: Run in the Foreground (i.e. do not daemonize)
# /usr/sbin/tinypokerd --foreground |
||||||||||||||||||||||||||||||||||||||||||||||||
|
TinyPoker Website Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". |
|||||||||||||||||||||||||||||||||||||||||||||||||