hostname command) must be one
that corresponds to 172.16.1.1 (this is due to a flaw in the Java
RMI library used by PC2).
For similar reasons, it is important that each client machine "know" its own hostname. If your DHCP server does not provide hostname information, the following lines
hostname localhost.localdomain # just to test following line
hostname $(ypcat hosts | fgrep $(ifconfig eth0 | fgrep 'inet addr' \
| sed 's/^ *inet addr://;s/ *Bcast.*$//') | awk '{print $2}')
added to a shared
/misc/contest/local-setup
file will take care of the problem.
For a multi-site contest, the server's "official"
hostname must correspond to an IP address that the other site
servers can access. Commands can be added to the
/misc/contest/local-setup
file to adjust the client firewalling to allow clients to access
the server regardless of which IP address PC2 reports.
For example, if the "true" IP address of the contest server is
a.b.c.d and the clients are Fedora Core-based, adding the
following lines to local-setup
iptables -I RH-Firewall-1-INPUT -s a.b.c.d -j ACCEPT
iptables -I RH-Firewall-1-OUTPUT -d a.b.c.d -j ACCEPT
route add default gw contest-server
should do the trick.
team0 through teamn, to support
an n team contest.
Each team must have its own
group, and team home directories must be owned by root, belong
to the specific team group, and have a mode of 770 (owner
everything, group everything).
For example, the following Unix
commands will properly configure the team0 home
directory:
chown root:team0 /home/team0
chmod 770 /home/team0
judge1 through judgem, to allow
for m contest judges. The judge accounts should all belong
to and be readable/traversable by the judge group.
pc2 account for administering the
contest.
The administration scripts
tarball should be untarred in the pc2 home directory.
The PC2
software should be installed here, as well (the Sun Java JDK,
1.4.2_05 or better, is necessary for PC2). Note that
the PC2 tarball must be untarred in the parent
of the pc2 home directory, rather than in the home
directory itself.
Configuring
PC2 is described in the PC2
Contest Administrator's Guide.
/misc directory, which
may be used for site-specific data or initialization scripts
-r" option when starting
syslogd. On a Fedora Core-based system, this is
done in the /etc/sysconfig/syslog file.
make-slips
is going to be used to generate team/judge account/password handouts, LaTeX needs to be installed.
dhcpd.conf file can
accomplish this if the DHCP server has access to
the NIS hosts information.
The pc2 account requires a number of necessary
initializations:
Login to the server as
pc2.Add the line
umask 077to the end of the.bashrcfile. Logout and login again, checking to make sure that the umask is now properly set.The permissions of previously installed files (see above) should be carefully checked. The home directory itself should have 711 permissions (owner everything, others traversable). Everything else should world-readable (and executable/traversable, where appropriate) with the following exceptions: The
scriptsdirectory should be world-traversable only, and only therunscript should be world-readable/executable. The default 077 umask should ensure that any new files created by PC2 or by the administration scripts are accessible only by thepc2account (and, of course,root).Modify the
pc2v8.inifile to specify 172.16.1.1 as the server address in its[client]section. Edit thesitelist.inifile to specify the proper site information, and set thesite=lines inpc2v8.iniappropriately.If you are using version 8.5 of PC2, modify the
start-serverscript to pass a-firstoption to the server rather than--first. Versions earlier than 8.5 may require extensive script modifications.
mkdir data judge-data
chmod a+x data
chgrp judge judge-data # must be root for this one
chmod 770 judge-dataThe
team0account is configured as a "template" for the other team accounts:Boot up a client, login asTheteam0, and configure the desktop as desired for the contest. A "launcher" should be placed on the desktop (or panel) to run the/home/pc2/pc2teamscript (using the/home/pc2/pc2.icoicon). The linesshould be added to theCLASSPATH=/home/pc2:$CLASSPATH
export CLASSPATHpc2teamscript (or, alternately, can be added to the.bashrcfile).If the current directory is to be automatically searched for executables, the line
can be added toPATH=.:$PATH.bashrc.The team's web browser should be configured to use http://contest-server/ as its home page.
The
pc2v8.inifile should be copied from/home/pc2(a symlink will work just as well).Optionally, the desktop background can be set to a contest-specific bitmap. The file acm-background.png (created by Adam Florence) is provided here (and in the
/opt/bitmapsdirectory on the client CD) as a sample.Printing should be configured in the
.bashrc(or, alternately, in a shared/misc/contest/local-setup) file. The details of this will vary depending on the print server being used. For example, a CUPS server might require the following lines:where the actual value used forCUPS_SERVER="contest-server"
export CUPS_SERVER
lpoptions -d "PRINTER"PRINTERwill depend on circumstances. It could be as simple as specifying a single printer for everyone, or as complex as determining the printer name from the current hostname. Once theteam0account has been configured, the client can be logged off and powered down. Login as root on the server, and create a "skeleton" tarball that can be used to initialize the other team accounts:cd /home/team0
tar cvfz ../team-skeleton.tar.gz .judge1account should be configured similarly to theteam0account, except that thepc2judgescript should be used instead ofpc2team, and the "skeleton" tarball should be namedjudge-skeleton.tar.gz.