[Debian Wiki] Update of "BOINC/ServerGuide/Initialisation" by ChristianBeer

Debian Wiki debian-www at lists.debian.org
Tue Feb 26 16:25:59 UTC 2013


Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Debian Wiki" for change notification.

The "BOINC/ServerGuide/Initialisation" page has been changed by ChristianBeer:
http://wiki.debian.org/BOINC/ServerGuide/Initialisation?action=diff&rev1=4&rev2=5

Comment:
updated setup instructions

  from the source tree and then the same for those using the Debian boinc-server-maker package.
  
  ||<style="background-color: red; width: 50%;"-2> '''Previously''' ||<style="background-color: lightgreen; width: 50%;"-2> '''Now''' ||
- ||1.||Install BOINC server dependencies:<<BR>>{{{sudo apt-get install subversion build-essential apache2 php5 \}}}<<BR>>{{{     mysql-server php5-gd php5-cli php5-mysql python-mysqldb \}}}<<BR>>{{{     libtool automake autoconf pkg-config libmysql++-dev libssl-dev}}} ||<style="vertical-align: top; text-align: left"-2|4>Install boinc-server-maker package just like any other:<<BR>>{{{sudo apt-get install boinc-server-maker}}}<<BR>>Admittedly, that package is not available on the project servers, yet. Ask about how far its development has matured.||
+ ||1.||Install BOINC server dependencies:<<BR>>{{{sudo apt-get install git build-essential apache2 php5 \}}}<<BR>>{{{     mysql-server php5-gd php5-cli php5-mysql python-mysqldb \}}}<<BR>>{{{     libtool automake autoconf pkg-config libmysql++-dev libssl-dev}}} ||<style="vertical-align: top; text-align: left"-2|4>Install boinc-server-maker package just like any other:<<BR>>{{{sudo apt-get install boinc-server-maker}}}<<BR>>Admittedly, that package is not available on the project servers, yet. Ask about how far its development has matured.||
- ||2.||Create a user and a group for BOINC and add www-data to that group:<<BR>>{{{sudo addgroup  --system boincadm}}}<<BR>>{{{sudo adduser www-data boincadm}}} ||
+ ||2.||Create a user and a group for BOINC and add www-data to that group:<<BR>>{{{sudo adduser boincadm}}}<<BR>>{{{sudo usermod -aG boincadm www-data}}} ||
- ||3.||Download BOINC source:<<BR>>{{{svn co http://boinc.berkeley.edu\nsvn/branches/server_stable boinc}}}||
+ ||3.||Download BOINC source:<<BR>>{{{git clone git://boinc.berkeley.edu/boinc.git}}}||
- ||4.||Compile BOINC: <<BR>> {{{cd boinc; ./_autosetup; ./configure --disable-client; make}}} ||
+ ||4.||Compile BOINC: <<BR>> {{{cd boinc; ./_autosetup; ./configure --disable-client --disable-manager; make}}} ||
  
  
  The compilation of the upstream source tree is nothing like magic. Go for it if you can. If our packaging we have done the right way, then this tutorial is of value for you because of the complete identity of all downstream steps.
@@ -54, +54 @@

  
  {{{
  cat << EODBCONFIG >> ~/.boinc_test.conf
+ # name of the MySQL database
+ dbname=boinctest
+ # name of the MySQL user with access to above database
+ dbuser=boincadm
  # password for write access to your project database
- pw=MYSQLPASSWORDFORBOINCUSER
+ dbpasswd=MYSQLPASSWORDFORBOINCUSER
- # name of the MySQL database
- dbprojectname=boinctest
  EODBCONFIG
  }}}
  
@@ -68, +70 @@

  With the variables defined before, you can just copy and pasted the code below. The password asked is the password for the root user to access the database, which is not unlikely to differ from the root password to your UNIX system. {{{
  # read config if available
  [ -r ~/.boinc_test.conf ] && . ~/.boinc_test.conf
+ if   [ -z "$dbuser" ]; then echo "Variable 'dbuser' not set";
- if ! echo "DROP USER 'boincadm'@'localhost'" | mysql -u root -p; then
+ if ! echo "DROP USER '$dbuser'@'localhost'" | mysql -u root -p; then
     echo "If the removal of the previous user fails because the user is not existing, then this does not matter. Other errors would be required a manual removal."
  fi
- if   [ -z "$dbprojectname" ]; then echo "Variable 'dbprojectname' not set";
+ if   [ -z "$dbname" ]; then echo "Variable 'dbname' not set";
- elif [ -z "$pw" ]; then echo "Variable 'pw' not set";
+ elif [ -z "$dbpasswd" ]; then echo "Variable 'dbpasswd' not set";
  else
     # piping commands to mysql shell
-    cat <<EOMYSQL | mysql -u root -p mysql
+    cat <<EOMYSQL | mysql -u root -p;
- DROP DATABASE IF EXISTS $dbprojectname;
+ DROP DATABASE IF EXISTS $dbname;
- CREATE USER 'boincadm'@'localhost' IDENTIFIED BY '$pw';
+ CREATE USER '$dbuser'@'localhost' IDENTIFIED BY '$dbpasswd';
- GRANT ALL PRIVILEGES ON $dbprojectname.* TO 'boincadm'@'localhost';
+ GRANT ALL PRIVILEGES ON $dbname.* TO '$dbuser'@'localhost';
  EOMYSQL
  fi
  }}}
@@ -94, +97 @@

  # address of host (via DNS or IP number) at which project server shall be reached
  hosturl=http://a.b.c.d
  # name of folder in which data shall be stored, also becomes part of project URL
- fileprojectname=$dbprojectname
+ projectname=boinctest
  # more human-compatible way to read the project name
- niceprojectname="BoincTestProject at Home"
+ projectnicename="BoincTestProject at Home"
- # location to host the user-presented web site
+ # location to store the project files, a projectname subdirectory will be created
  installroot=/var/tmp/boinc-server-test
  EOCONF
  }}}
@@ -112, +115 @@

  else
    . ~/.boinc_test.conf
    echo -n "Basic configuration test: "
-   if [ -z "$installroot" -o -z "$hosturl" -o -z "$dbprojectname" -o -z "$pw" \
+   if [ -z "$installroot" -o -z "$hosturl" -o -z "$dbname" -o -z "$dbpasswd" \
-     -o -z "$niceprojectname" -o -z "$fileprojectname" ] ; then
+     -o -z "$projectnicename" -o -z "$projectname" ] ; then
       echo "Missing configuration parameter."
    else
       echo "[ok]"
@@ -170, +173 @@

  [ -r ~/.boinc_test.conf ] && . ~/.boinc_test.conf
  }}}
   1. Change files and directories permission: {{{
- if [ -z "$installroot" -o -z "$fileprojectname" ]; then
+ if [ -z "$installroot" -o -z "$projectname" ]; then
    echo "Not all variables are set for the configuration"
    echo "Error, do not continue."
- elif [ ! -d "$installroot"/"$fileprojectname" ]; then
+ elif [ ! -d "$installroot"/"$projectname" ]; then
-   echo "The directory '$installroot/'$fileprojectname' is not existing"
+   echo "The directory '$installroot/'$projectname' is not existing"
    echo "Error, do not continue."
  else
-   cd "$installroot"/"$fileprojectname"
+   cd "$installroot"/"$projectname"
-   sudo chown root:boincadm  -R .
+   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
  fi
@@ -200, +203 @@

  }}}
  The "-r" is important to reach all the files since the directory cannot be read before the execution of "sudo".
  
- ====  Start of BOINC background programs ("demons") ====
+ ====  Start of BOINC background programs ("daemons") ====
  
  Now its time to start the project, assuming we are still inside the project root,
  
@@ -255, +258 @@

  sudo htpasswd -c html/ops/.htpasswd USERNAME
  }}}
   1. Config Apache to call BOINC server {{{
- sudo cp ${fileprojectname}.httpd.conf  /etc/apache2/sites-available/ \
+ sudo cp ${projectname}.httpd.conf  /etc/apache2/sites-available/ \
- && sudo a2ensite  ${fileprojectname}.httpd.conf \
+ && sudo a2ensite  ${projectname}.httpd.conf \
  && sudo /etc/init.d/apache2 reload
  }}}
  
@@ -264, +267 @@

  
  {{attachment:boinc_test_project_freshly_generated.jpg||align="right",width=400}}
  
- The web site should now be accessible. It should be available as an alias "$fileprojectname", please look it up in "/etc/apache2/sites-enabled/${filesprojectname}.httpd.conf". You will find the automated home page to need some further manual adjustments - which does not really encourage to update the server version too frequently, we presume.
+ The web site should now be accessible. It should be available as an alias "$projectname", please look it up in "/etc/apache2/sites-enabled/${projectname}.httpd.conf". You will find the automated home page to need some further manual adjustments - which does not really encourage to update the server version too frequently, we presume.
  
  If the home page does not show up then there may be some missing file or some bogus file permission. The inspection of "/var/log/apache/error.log" should bring sufficient insights to fix the issue. The image shows a URL with a ":8080", which indicates the browser to ask for the page at a different port than the default ":80". For doing so, add a virtual host configuration in above  httpd.conf of your project. The [[http://httpd.apache.org/docs/2.2/vhosts/examples.html|Apache Documentation]] explains vividly how to do so.
  
@@ -287, +290 @@

  
  Perform {{{/etc/init.d/apache reload}}} after the change. Once PHP is properly configurated, all dynamic web pages, including for accessing the database and message boards will run. You can also get your own account, just the pages all look ugly and unpersonal, still.
  
+ {{{#!wiki comment
+ I never had the above issue with a standard installation of apache2 and php, this should be moved to FAQ or Troubleshooting. -- ChristianBeer
+ }}}
+ 
  === Substituting ProjectName in *.html and *.php ===
  
- The web pages show whenever there should be the project name the string "REPLACE WITH PROJECT NAME". To fix this and other things like your public email address, edit the fiel {{{html/project/project.inc}}} with any text editor, as in {{{
+ The web pages show whenever there should be the project name the string "REPLACE WITH PROJECT NAME". To fix this and other things like your public email address, edit the file {{{html/project/project.inc}}} with any text editor, as in {{{
  sudo vim html/project/project.inc
  }}}
  That include file is read by various other PHP files and amonst the above mentioned user-visibible project name and email addresses also allows for extra decorations for headers or footers.
@@ -325, +332 @@

  {{{
  php5 create_forums.php
  }}}
- or the 'ops/create_forums.php' file be found in the browser.
  
  The user interface is - from a technical point of view - now set. It remains the application side to be configured.
  
- Proceed with [[AppDeployment]] to learn about collecting binaries from multiple platforms of Debian and configure BOINC to serve them.
+ Proceed with [[BOINC/ServerGuide/AppDeployment|AppDeployment]] to learn about collecting binaries from multiple platforms of Debian and configure BOINC to serve them.
  
  [[BOINC/ServerGuide|Back]]
  



More information about the pkg-boinc-commits mailing list