Installing BOINC on Linux
The method described below does not run BOINC as a daemon. It simply adds to /etc/profile a few commands that start BOINC when you login. If other users login, BOINC will not start unless you set file permissions of boinc, boinc_client and run_manager in the BOINC folder.
I have Fedora Core 5 (FC5) installed so the steps below should be easy for most FC5 users. If you use Damn Small Linux (DSL) then team BOINC@Australia has an excellent article on installing BOINC on DSL contributed by Trog Dog.
The Basic Installation
Substitute your Linux username (the name you use to login) wherever you see USERNAME in this article.
-
Login to Linux with your username. Create a folder named bin in your Home folder. To do that, click Places on the menu bar at the top left of the screen, click Home Folder. Right click in the Home Folder window, click New Folder, name the new folder bin.
-
Download the latest version of BOINC for Linux from the official BOINC website , save the download in the bin folder you created. The file is a self-extracting archive.
-
Set the BOINc archive's executable attribute so you can un-archive it. To set the executable attribute in FC5:
-
Right click on the archive.
-
Click Properties.
-
Click Permissions.
-
Check the Execute box to the right of Owner.
-
Click Close.
-
Double click the BOINC archive, choose Run, it creates a folder named BOINC in the bin folder, extracts the files from the BOINC archive and places them in the BOINC folder.
-
Open the BOINC folder, double click binstall.sh, this runs a small script which finishes the installation and provides some advice on how to start BOINC manually. You can use that method anytime to start BOINC manually. If you want to setup Linux to autostart BOINC when you login then proceed to the next section.
Autostart BOINC at Login
Here we setup to autostart BOINC just after you login on FC5. Again, it's "autostart" but it's not a daemon setup. The difference is that with a daemon setup Linux will start BOINC when the system boots and before a user logs in. The method described below will start BOINC automatically only after USERNAME logs in. Remember, USERNAME means the username you logged in with when you installed BOINC in the section above, not literally USERNAME.
-
Open a terminal (shell). To open a terminal in FC5 click Applications -> Accessories -> Terminal.
-
If you are logged in as USERNAME rather than root, then enter su followed by root's password to login temporarily as root.
-
Enter gedit /etc/profile to bring up the profile file in the gedit text editor. If you don't have gedit installed then substitute the name of your text editor for gedit. Ted is another popular editor so you might try ted /etc/profile if you don't have gedit installed.
-
Add the following lines to the end of the file:
-
cd /home/USERNAME/bin/BOINC (substitute your username for USERNAME)
-
./run_manager &
-
-
Save the file, exit the editor, close the terminal.
Uninstalling
To prevent BOINC autostarting, open the /etc/profile file as described in section Autostart BOINC at Login and remove the three lines you added at the end of the file. Delete the /home/USERNAME/bin/BOINC folder to free the disk space if you wish but it is not necessary.
Now you can logout and login. BOINC will start immediately after you enter your password. It may start maximized and it may take an extra few seconds for the Desktop to start which may give the appearance something has gone wrong. Be patient. Attach to one or more projects as you would on Windows.
Happy crunching!!
More Than One Linux Box?
The default hostname name for most Linux installations is localhost.localdomain. If you have not yet declared a unique hostname for your Linux box then it is likely localhost.localdomain.
WCG and other projects use your computer's hostname for the name of your computer on their website. If you attach to WCG with the default localhost.localdomain then your Device Manager page on the WCG website will list your computer as localhost.localdomain. If you attach a second computer named localhost.localdomain then Device Manager will list 2 computers named localhost.localdomain and it will be difficult for you to distinguish between them. You can change the hostname if you wish.
-
Login as root.
-
Open the file /etc/hosts with your text editor.
-
Lines that begin with # are comments that Linux ignores. You may modify the comments and add more comments but each comment must begin with a #. The comments may warn you not to remove the line that begins with 127.0.0.1. You should not remove that line but you may modify it.
-
You must leave the 127.0.0.1. The first name following 127.0.0.1 is the hostname. You can have 1 or more aliases following the hostname. There must be at least 1 space between items. Hostnames and aliases may consist of alphanumeric characters, . (period), - (dash) and - (underscore). Certain special characters like $ and # may be allowed but I'm not sure. If you want your hostname to be harry, for example, all of the following examples would be valid:
-
127.0.0.1 harry localhost.localdomain
-
127.0.0.1 harry localhost.localdomain crunch_box14
-
127.0.0.1 harry
-
Save the hosts file then open /etc/sysconfig/network in the text editor. There may be a line that begins HOSTNAME=. If there is and if you want your hostname to be harry, for example, then edit that line to read HOSTNAME=harry, no spaces. Save the network file and exit the text editor.
-
Restart Linux. The new hostname should display at the login prompt if you have FC5 configured to display the hostname at login. The hostname command also displays the computer's hostname.