Installing a BOINC server

To create a BOINC server you must have the following software installed:

  • MySQL
  • Apache with PHP
If Apache is configured to run with Fast CGI, rename fcgi to cgi in the "boinc/sched" directory, replacing the existing cgi.

Add the following (with appropriate changes) to your .tcshrc

# These 5 are used at compile time
setenv BOINC_DB_NAME        boinc_barry
setenv BOINC_DB_PASSWD
setenv BOINC_KEY            0xdabacafe
setenv BOINC_KEY_DIR        ~/keys
setenv BOINC_UPLOAD_DIR     ~/upload

# These 3 are used at runtime
setenv BOINC_DOWNLOAD_DIR   ~/download
setenv BOINC_UPLOAD_URL     http://maggie.ssl.berkeley.edu/barry/cgi/file_upload_handler
setenv BOINC_DOWNLOAD_URL   http://maggie.ssl.berkeley.edu/barry/download

# These 4 are for test scripts
setenv BOINC_PLATFORM       sparc-sun-solaris2.7
setenv BOINC_EMAIL          barry@ssl.berkeley.edu
setenv BOINC_USER           barry
setenv BOINC_MASTER_URL     http:\\\\\/\\\\/maggie.ssl.berkeley.edu\\\\/~barry
Each time BOINC_DB_NAME, BOINC_DB_PASSWD, BOINC_KEY, BOINC_KEY_DIR, or BOINC_UPLOAD_DIR are changed you must recompile the scheduler by going into the sched/ directory, typing "make clean", "make", and "make install".

After setting your necessary environment variables you must edit your httpd.conf to configure Apache. Add the following lines where aliases are placed.

Alias /barry/ "/disks/philmor/a/users/barry/"


    Options Indexes FollowSymlinks MultiViews
    AllowOverride None
    Order allow,deny
    Alias from all

This allows you to resolve URL's and path names that go to your home directory. This way you can have your upload and download directories, key directory, and cgi directory in your home directory and still have them reacheable through the web.

In addition add the following lines where script aliases are placed.

ScriptAlias /barry-cgi/ "/disks/philmor/a/users/barry/cgi/"


    AllowOverride None
    Options None
    Order allow,deny
    Allow from all

This allows CGI files to be executed in the specified directory. You will put your scheduler and file_upload_handler into this directory.

You must make a directory for downloads and a directory for uploads. Make sure that the download directory is world readable. You must also make a directory to hold the different necessary keys.

Now you are ready to install BOINC. Unzip and untar the BOINC release. Type "configure", "make", and "make install". "make" will compile all the source code and "make install" will install a BOINC server in the INSTALL_DIR (currently set to /usr/local/boinc/) specified in the Makefile.

BOINC_DB_NAME

This is name of the database that the particular BOINC project you are running uses. Each BOINC project must have a different BOINC_DB_NAME.

BOINC_DB_PASSWD

BOINC_KEY

This should be set to any 32 bit hex value desired. To run multiple BOINC projects on one machine, each project needs to have a different BOINC_KEY compiled into it. The BOINC_KEY is used to create a shared memory segment. Each project must have a different shared memory segment.

BOINC_KEY_DIR

This should be set to a directory in which the public and private keys for BOINC are to be created. If you wish to place this in a different directory, change the variable appropriately.

BOINC_UPLOAD_DIR

This is where clients will upload their results to. It is important that this directory is different from the BOINC_DOWNLOAD_DIR.

BOINC_DOWNLOAD_DIR

This is where clients will download project applications and other necessary files to run those applications from. It is important that this directory is differet from the BOINC_UPLOAD_DIR.

BOINC_UPLOAD_URL

This is the url to the file_upload_handler.

BOINC_DOWNLOAD_URL

This is the url to the BOINC_DOWNLOAD_DIR.

BOINC_PLATFORM_NAME

This is currently used by one of the test scripts. It is not critical for the running of BOINC. Normally, projects will have a list of platforms that their applications will be allowed to run on.

BOINC_EMAIL

This is currently used by one of the test scripts to create a user. It is not critical for the running of BOINC.

BOINC_USER

This is currently used by one of the test scripts to create a user. It is not critical for the running of BOINC.

BOINC_MASTER_URL

This is currently used by one of the test scripts. It is not critical for the running of BOINC. Normally, each project will be identified by a BOINC_MASTER_URL. The client will go to this URL and will be told where to go to get work from the scheduler.

Go into the boinc/test directory, and type

test_uc.php

This script runs a test case that initializes the database with a user account, application and workunits, runs the client, and checks the results.