Index  | Recent Threads  | Unanswered Threads  | Who's Active  | Guidelines  | Search
 

Quick Go ยป
No member browsing this thread
Thread Status: Active
Total posts in this thread: 1
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 547 times and has 0 replies Next Thread
Former Member
Cruncher
Joined: May 22, 2018
Post Count: 0
Status: Offline
Reply to this Post  Reply with Quote 
Installation in Fedora - My Steps

Part of the Instructions are copied from http://www.spy-hill.net/~myers/help/boinc/unix.html

Login as root first!

Download the program
http://www.worldcommunitygrid.org
=> "Download Now" Link => "download linux" Link
Fill in the registration form. You will be automatically taken to http://boinc.berkeley.edu/download.php?min_version=5.2&platform=linux
Download the linux shell file. It contains all files you need

Unzip the archive by running the shell script
sh boinc_5.2.13_i686-pc-linux-gnu.sh
a BOINC directory will be created

Install the program
Enter the BOINC directory
# cd BOINC
copy boincmgr (the boinc manager) to your system
# cp boincmgr /usr/local/bin
copy boinc (the CORE boinc program) to your system
# cp boinc /usr/local/bin/boinc_client
copy boinc_cmd (the boinc command-line manager) to your system
# cp boinc_cmd /usr/local/bin

Register the program as a system service
Add a user boinc to run program, define a working directory (you may use /home/boinc instead. It will be automatically created once the account is created)
#adduser -m -d /var/lib/boinc boinc

Copy the following script and name it as "boinc". put it under /etc/rc.d/init.d/
(you may want to change the BOINCDIR variable to your working directory)
#!/bin/sh
#
# BOINC - start and stop the BOINC client daemon on Unix
#
# Unix start/stop script to run the BOINC client as a daemon at
# system startup, as the 'boinc' user (not root!).
#
# This version works on Red Hat Linux, Fedora Core, Mandrake,
# and Slackware Linux, and should work on generic Linux systems
# provided they have 'pidof'. Metadata for chkconfig and the SUSE
# equivalent INIT info are included below.
#
# Usage: boinc { start | stop | status | restart }
#
###
# chkconfig: 345 71 29
# description: This script starts the local BOINC client as a daemon
# For more information about BOINC (the Berkeley Open Infrastructure
# for Network Computing) see http://boinc.ssl.berkeley.edu
# processname: boinc
# config: /etc/sysconfig/boinc
#
### BEGIN INIT INFO
# Provides: boinc
# Required-Start: $network
# Required-Stop: $network
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Description: This script starts the local BOINC client as a daemon
# For more information about BOINC (the Berkeley Open Infrastructure
# for Network Computing) see http://boinc.ssl.berkeley.edu
### END INIT INFO
#
# Eric Myers <myers@vassar.edu> - 27 July 2004
# Department of Physics and Astronomy, Vassar College, Poughkeepsie NY
# @(#) $Id: boinc,v 3.0 2005/07/18 22:16:24 myers Exp $
########################################################################

# Defaults, which can be overridden in /etc/sysconfig/boinc

BOINCUSER=boinc
BOINCDIR=/var/lib/boinc
BUILD_ARCH=i686-pc-linux-gnu
BOINCEXE=/usr/local/bin/boinc_client


# Log and error files (you should rotate these occasionally)
LOGFILE=boinc.log
ERRORLOG=error.log

# Mandrake 10.1 really wants a lock file...
LOCKDIR=/var/lock/subsys

# BOINC options:
#BOINCOPTS="-allow_remote_gui_rpc" # opens up your machine to the world!


# Init script function library. This stuff is Red Hat specific,
# but if the functions are not found we create our own simple replacements.
# (The idea for replacing the functions comes from OpenAFS. Thanks guys!)

if [ -f /etc/rc.d/init.d/functions ] ; then
. /etc/rc.d/init.d/functions
else
export PATH=/sbin:/bin:/usr/sbin:/usr/bin
function echo_success () { echo -n " [ OK ] " ; }
function echo_failure () { echo -n " [FAILED] " ; }
function echo_warning () { echo -n " [WARNING] " ; }
function killproc() {
PID=`pidof -s -x -o $$ -o $PPID -o %PPID $1`
[ $PID ] && kill $PID ; }
fi

# su on Linux seems to need this to be set to work properly
export TERM dumb


# Look for any local configuration settings:

if [ -f /etc/sysconfig/boinc ]; then
. /etc/sysconfig/boinc
fi

## Locate the working directory

if [ ! -d $BOINCDIR ]; then
echo "Cannot find BOINC directory $BOINCDIR "
exit 7
fi


# Some additional places to look for the client executable
# (Do this after init.d/functions, which sets PATH)

export PATH=$BOINCDIR:/usr/local/bin:$PATH


## Locate the executable, either boinc_client, boinc,
## or boinc_M.mm_.... with highest version number

if [ ! -x $BOINCEXE ]; then
BOINCEXE=`/usr/bin/which boinc_client 2>/dev/null`
if [ ! -x "$BOINCEXE" ]; then
BOINCEXE=`/usr/bin/which boinc 2>/dev/null`
if [ ! -x "$BOINCEXE" ]; then
BOINCEXE=`/bin/ls -1 $BOINCDIR/boinc_*_$BUILD_ARCH 2>/dev/null | tail -1 `
fi
fi
fi

if [ ! -x "$BOINCEXE" ]; then
echo "Cannot find an executable for the BOINC client."
exit 2
fi



## Functions: $1 is one of start|stop|status|restart

case "$1" in
start)
cd $BOINCDIR

if [ -f lockfile ] ; then
echo -n "Another instance of BOINC is running (lockfile exists)."
echo_failure
echo
exit 4
fi

if [ ! -f client_state.xml ] ; then
echo -n "The BOINC client requires initialization."
echo_warning
echo
fi

echo -n "Starting BOINC client as a daemon: "
su $BOINCUSER -c "$BOINCEXE $BOINCOPTS" >>$LOGFILE 2>>$ERRORLOG &
sleep 1
PID=`pidof -s -x -o $$ -o $PPID -o %PPID $BOINCEXE`
if [ $PID ]; then
touch $LOCKDIR/boinc
echo_success
else
echo_failure
fi
echo
;;

stop)
cd $BOINCDIR
if [ ! -f lockfile -a ! -f $LOCKDIR/boinc ] ; then
echo -n "BOINC is not running (no lockfile found)."
echo_success
else
echo -n "Stopping BOINC client daemon: "
killproc $BOINCEXE && echo_success || echo_failure
# clean up in any case
rm -f $BOINCDIR/lockfile
rm -f $LOCKDIR/boinc
fi
echo
;;

restart)
$0 stop
$0 start
;;

status)
PID=`pidof -x -o $$ -o $PPID -o %PPID boinc_client`
if [ "$PID" == "" ]; then
PID=`pidof -x -o $$ -o $PPID -o %PPID $BOINCEXE`
fi
if [ "$PID" != "" ]; then
echo "BOINC client is running (pid $PID)."
else
if [ -f $BOINCDIR/lockfile -o -f $LOCKDIR/boinc ]; then
echo "BOINC is stopped but lockfile exists."
else
echo "BOINC client is stopped."
fi
fi
;;

*)
echo "Usage: boinc {start|stop|restart|status}"
exit 1
esac

exit

#EOF#

Now you can start the service
#service boinc start
The BOINC client requires initialization. [WARNING]
Starting BOINC client as a daemon: [ OK ]

You will see lots of files created in the working directory
Then make it starts everytime your computer starts
#chkconfig --add boinc

Register to the World Community server
Switch to boinc user
#su - boinc

See if the program is running
#boinc_cmd --get_state
======== Projects ========

======== Applications ========

======== Application versions ========

======== Workunits ========

======== Results ========

Register the program to worldcommunitygrid
#boinc_cmd --project_attach www.worldcommunitygrid.org [account key]
(where account key is the key you received in a email after registration)

Check again
#boinc_cmd --get_state
======== Projects ========
1) -----------
name: World Community Grid
master URL: http://www.worldcommunitygrid.org/
user_name: username
team_name:
resource share: 100.000000
user_total_credit: 0.000000
user_expavg_credit: 0.000000
host_total_credit: 0.000000
host_expavg_credit: 0.000000

Congratulations. You have done the installation.

The above may only works for me. I am using Fedora Core 3. smile
[Feb 22, 2006 11:49:05 AM]   Link   Report threatening or abusive post: please login first  Go to top 
[ Jump to Last Post ]
Post new Thread