This tutorial will help you create BOINC project with Debian server without using virtual images provide from BOINC. See BOINC/Server for an overview on BOINC-Server with Debian related issues.
To see more info about how to install and config BOINC server, please look at BOINC project wiki
1. Install BOINC Server
1.1. Installation according to the books - without the Debian server package
Install BOINC server dependencies :
sudo apt-get install subversion build-essential apache2 php5 mysql-server php5-gd php5-cli php5-mysql python-mysqldb libtool automake autoconf pkg-config libmysql++-dev libssl-dev
Create a user and a group for BOINC and add www-data to that group :
sudo useradd -m -s /bin/bash boincadm sudo usermod -G boincadm www-data
Download BOINC source :
svn co http://boinc.berkeley.edu/svn/branches/server_stable boinc
Compile BOINC :
cd boinc ./_autosetup ./configure --disable-client make
1.2. Installation with the Debian server package
Install boinc-server package from unstable :
sudo apt-get install boinc-server
Create a user and a group for BOINC and add www-data to that group(will be automate in next version of package) :
sudo useradd -m -s /bin/bash boincadm sudo usermod -G boincadm www-data
2. Project-specific configuration
2.1. Create and config BOINC project
Create MySQL database for BOINC project:
mysql -u root -p > CREATE DATABASE boincdb; > CREATE USER 'boincadm'@'localhost' IDENTIFIED BY 'MYSQLPASSWORDFORBOINCUSER'; > GRANT ALL PRIVILEGES ON boincdb.* TO 'boincadm'@'localhost';
Create project:
sudo mkdir /var/boinc sudo ./tools/make_project --url_base http://a.b.c.d --db_name boincdb --db_user boincadm --db_passwd "MYSQLPASSWORDFORBOINCUSER" --drop_db_first --project_root /var/boinc/testproj testproj 'TestProject@Home' cd /var/boinc/testproj
If you use boinc-server package you need to use these command instead(will be fix in next version of bonic-server package) :
sudo mkdir /var/boinc sudo bash /usr/share/boinc-server/tools/make_project --url_base http://a.b.c.d --db_name boincdb --db_user boincadm --db_passwd "MYSQLPASSWORDFORBOINCUSER" --drop_db_first --project_root /var/boinc/testproj testproj 'TestProject@Home' exit cd /var/boinc/testproj
- NOTE: Please replace a.b.c.d with your server IP address. BOINC client will not accept internal hostname.
Change files and directories permission:
cd /var/boinc/testproj sudo chown boincadm:boincadm -R sudo chmod g+w -R . sudo chmod 02770 -R upload html/cache html/inc html/languages html/languages/compiled html/user_profile
Add project cronjob:
sudo crontab -e
Then add this line to editor appear after run command above
0,5,10,15,20,25,30,35,40,45,50,55 * * * * /var/boinc/testproj/bin/start --cron
Config password for BOINC server administrative page:
sudo htpasswd -c html/ops/.htpasswd USERNAME
Config Apache to call BOINC server
sudo cp testproj.httpd.conf /etc/apache2/sites-available/ sudo a2ensite testproj.httpd.conf sudo /etc/init.d/apache2 reload
Start BOINC server
sudo bin/xadd sudo bin/start
2.2. Add sample application
Compile sample application :
cd ~/boinc/samples/wrapper make
Setup sample application :
cd /var/boinc/testproj ./html/ops/single_job_setup.php ~/boinc/samples
2.3. Config clients
Install BOINC client as describe in this page.
In BOINC Manager go to Tools -> Attach to project or account manager...
Select Attach to project and click Next >
In project url textbox, type http://a.b.c.d/testproj (when a.b.c.d is server IP address)
- Continue and create account as normal procedure