We want the server to continue running until we shut it down, or the computer is rebooted. So we can run the server using the Unix "nohup" command. That tells the OS not to "hang up" the application when the terminal window is closed.
Here is the command to run the server:
You can pass options to the server using a properties file called "transjam.properties". The syntax for setting properties is:nohup java -cp transjam_server.jar com.transjam.server.Server &
For example, the set the port that the server listens to for clients to 18225, put this in the properties file:key=value
portnum=18225
portnum | Set port number to listen to for clients. The default will be printed if you use the -h option. |
maxclients | Set maximum number of clients that may log in at one time, cannot exceed the maximum specified by the license. |
debug | Select debug messages printed to stdout. Option can be any combination
of these letters, for example "usc":
u = users, login and logout messages s = rooms, when rooms are created and users enter or exit a room r = received, all messages received by server from clients, (Warning the r and t messages are very verbose and should be used with caution.) t = transmitted, all messages transmitted by server to clients, c = chat, messages exchanged while chatting |
timeout | Set number of seconds before connection times out if client does not respond. Use zero for no timeout. |
password | Set the administrative password for the Admin Applet |
For example:
For convenience, we have placed the basic command with in a shell script. So simply enter:nohup java -cp transjam_server.jar com.transjam.server.Server&
source runserver
You might want to configure "xinetd" to launch the server automatically the first time a client logs on. But that is beyond the scope of this tutorial. Please enter "man xinetd".
[Previous] [Top]
[Next]
[an error occurred while processing this directive]