Setting up a single-host server

BOINC provides a set of scripts for setting up and controlling a BOINC server complex. These scripts require all the server components to run on a single host. This has been tested only on Linux and Solaris hosts; it may work with small modifications on Windows also.

The scripts can be used to create multiple BOINC projects on the same host. This can be handy for creating separate projects for testing and debugging. In fact, the scripts are part of a general testing framework that allows multiple developers to work independently on a single host, with each developer able to create multiple projects.

Install the following software on the server host:

Your operating system must have shared memory enabled, with a max shared segment size of at least 32 MB.

Directory structure

Designate a "BOINC projects" directory on the server host. The scripts will create subdirectories as follows:
boinc_projects/
    proj1/
        cgi/
        download/
        html_ops/
        html_user/
        keys/
        upload/
    proj2/
    ...
where proj1, proj2 etc. are the names of the projects you create. Each project directory contains:

Web server configuration

Create two directories, used to store symbolic links to project-specific HTML and CGI directories. You might call these boinc_html and boinc_cgi. Then edit your Apache configuration file, adding something like the following:

Alias /david/ "/users/david/boinc_html/"
<Directory "/users/david/boinc_html">
    Options Indexes FollowSymlinks MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

ScriptAlias /david_cgi/ "/users/david/boinc_cgi/"
<Directory "/users/david/boinc_cgi">
    AllowOverride None
    Options FollowSymLinks
    Order allow,deny
    Allow from all
</Directory>

You should also set the default MIME type as follows:
DefaultType application/octet-stream

Environment variabless

Define the following environment variables:

BOINC_PROJECTS_DIR
BOINC_USER_NAME This is used as a component of database names, and is prepended to web error log entries. Relevant if multiple developers share one host. /td>
BOINC_SRC_DIR Path of directory where BOINC source code is
BOINC_CGI_DIR Path of the CGI symbolic-link directory (see above).
BOINC_CGI_URL URL of the CGI symbolic-link directory.
BOINC_HTML_DIR path of a HTML symbolic-link directory (see above)
BOINC_HTML_URL URL of the HTML symbolic-link directory
BOINC_SHMEM_KEY Identifier for shared-memory segment (use any 31-bit number that doesn't conflict with current segments)

For example, you might execute the following shell script:

setenv BOINC_PROJECTS_DIR   /home/david/boinc_projects
setenv BOINC_USER_NAME      david
setenv BOINC_SRC_DIR        /home/david/boinc_cvs/boinc
setenv BOINC_CGI_DIR        /home/david/cgi-bin
setenv BOINC_CGI_URL        http://localhost/cgi-bin
setenv BOINC_HTML_DIR       /home/david/html
setenv BOINC_HTML_URL       http://localhost
setenv BOINC_SHMEM_KEY      0x3abc1234

Creating the server

Once you've done all the above steps, edit the script make_project.php in the test directory of the BOINC source tree, adding your application name. Then execute this script. This does the following:

At this point you hopefully have a functioning BOINC server, but it has no applications or work to distribute. The remaining steps to make a public project include: