Debian Install 2 0

Version 20 (Mary Laser, 08/10/2012 03:57 pm)

1 19 Mary Laser
h1. Installing FOSSology on Debian
2 1 Mary Laser
3 1 Mary Laser
Packages for deb based distributions are available from different sources, depending on release. Consult the appropriate instructions below for the line to add to your /etc/apt/sources.list file.
4 1 Mary Laser
5 18 Dan Stangel
6 1 Mary Laser
h2. Debian squeeze (currently stable) 
7 1 Mary Laser
8 19 Mary Laser
FOSSology 2.0 debs, produced by the FOSSology team.  These debs have not yet been submitted to debian upstream.  Older versions of FOSSology are available from the debian and ubuntu repositories.  To use the FOSSology produced debs add the line below to your /etc/apt/sources.list file.
9 1 Mary Laser
  
10 1 Mary Laser
  deb http://fossology.org/releases/2.0.0/Debian/squeeze/ 6.0 contrib
11 18 Dan Stangel
12 19 Mary Laser
Be sure to remove any entries you may have in sources.list for older versions of fossology.  
13 1 Mary Laser
14 19 Mary Laser
Clean and update the apt cache with (as root) @apt-get clean; apt-get update@
15 19 Mary Laser
16 19 Mary Laser
17 2 Mary Laser
h2. Single vs. Multi-system installs:
18 1 Mary Laser
19 2 Mary Laser
The FOSSology software has been split into separate packages by function and analysis agent in order to make it easy to add, update and install individual agents.  
20 2 Mary Laser
21 20 Mary Laser
*For a single system package install*, (as root) type @apt-get install fossology@  This will install all packages needed to run FOSSology on a single system.  You can safely ignore this warning, "WARNING: The following packages cannot be authenticated!"  It is a known bug that will be addressed in the next release. 
22 20 Mary Laser
23 20 Mary Laser
After running apt-get install, skip down to step 6 in the next section (cluster install) to configure your system for fossology.
24 2 Mary Laser
25 4 Mary Laser
*For a cluster install*, follow these steps (as root):
26 4 Mary Laser
# Install the FOSSology server... db, web server, agents, etc...
27 4 Mary Laser
@apt-get install fossology@
28 1 Mary Laser
# Install the "agent" systems where the analysis agents will run.
29 1 Mary Laser
@apt-get install fossology-common fossology-buckets fossology-copyright fossology-delagent fossology-mimetype fossology-nomos fossology-pkgagent fossology-ununpack fossology-wgetagent@
30 4 Mary Laser
# edit fossology.conf & Db.conf on the server and copy to the agents
31 1 Mary Laser
+Db.conf+
32 6 Mary Laser
<pre>
33 4 Mary Laser
dbname=fossology;
34 4 Mary Laser
host=<server_hostname>;
35 4 Mary Laser
user=fossy;
36 4 Mary Laser
password=fossy;
37 6 Mary Laser
</pre>
38 4 Mary Laser
+fossology.conf+
39 6 Mary Laser
<pre>
40 5 Mary Laser
; proxy settings that will be used by fossology agents
41 5 Mary Laser
; examples:
42 1 Mary Laser
;http_proxy = http://server:8080
43 1 Mary Laser
;ftp_proxy = http://server:3128
44 5 Mary Laser
;no_proxy = localhost,10.1.2.3
45 6 Mary Laser
</pre>
46 6 Mary Laser
<pre>
47 1 Mary Laser
[HOSTS]
48 10 Mary Laser
localhost = localhost /etc/fossology  10
49 10 Mary Laser
<agent1_hostname>= <agent1_hostname> /etc/fossology  10
50 10 Mary Laser
<agent2_hostname>= <agent2_hostname> /etc/fossology  10
51 6 Mary Laser
</pre>
52 6 Mary Laser
<pre>
53 1 Mary Laser
[REPOSITORY]
54 1 Mary Laser
<server_hostname>[] = * 00 55
55 1 Mary Laser
<agent1_hostname>[] = * 56 aa
56 1 Mary Laser
<agent2_hostname>[] = * ab ff
57 6 Mary Laser
</pre>
58 6 Mary Laser
+Don't forget to copy these conf files to each of your agents!+
59 6 Mary Laser
# Make your repository available to the entire cluster.  This is highly dependent on your storage and filesystem type.  These instructions are for a distributed, nfs cross-mounted repository as per the [REPOSITORY] section of the fossology.conf file above.
60 12 Mary Laser
a) Cross-mount filesystems for your repository data on all systems (in this case, the 3 systems are _server, agent1 & agent2_) and create a link called localhost pointing to the host where it's created:
61 7 Mary Laser
<pre>
62 7 Mary Laser
root@server# ls -al
63 7 Mary Laser
total 20
64 7 Mary Laser
drwxrwx--- 5 fossy fossy 4096 Apr 12 15:58 .
65 7 Mary Laser
drwxrwx--- 3 fossy fossy 4096 Apr 10 15:12 ..
66 11 Mary Laser
drwxrws--- 3 fossy fossy 4096 Apr 10 13:27 agent1
67 11 Mary Laser
drwxrws--- 3 fossy fossy 4096 Apr 10 05:40 agent2
68 7 Mary Laser
lrwxrwxrwx 1 root  root     5 Apr 12 15:58 localhost -> server
69 11 Mary Laser
drwxrws--- 2 fossy fossy 4096 Apr 10 14:32 server
70 7 Mary Laser
</pre>
71 7 Mary Laser
<pre>
72 7 Mary Laser
root@agent1# ls -al
73 7 Mary Laser
total 20
74 7 Mary Laser
drwxrwx--- 5 fossy fossy 4096 Apr 12 15:58 .
75 7 Mary Laser
drwxrwx--- 3 fossy fossy 4096 Apr 10 15:12 ..
76 11 Mary Laser
drwxrws--- 3 fossy fossy 4096 Apr 10 13:27 agent1
77 11 Mary Laser
drwxrws--- 3 fossy fossy 4096 Apr 10 05:40 agent2
78 7 Mary Laser
lrwxrwxrwx 1 root  root     5 Apr 12 15:58 localhost -> agent1
79 11 Mary Laser
drwxrws--- 2 fossy fossy 4096 Apr 10 14:32 server
80 7 Mary Laser
</pre>
81 7 Mary Laser
<pre>
82 7 Mary Laser
root@agent2# ls -al
83 7 Mary Laser
total 20
84 7 Mary Laser
drwxrwx--- 5 fossy fossy 4096 Apr 12 15:58 .
85 7 Mary Laser
drwxrwx--- 3 fossy fossy 4096 Apr 10 15:12 ..
86 11 Mary Laser
drwxrws--- 3 fossy fossy 4096 Apr 10 13:27 agent1
87 11 Mary Laser
drwxrws--- 3 fossy fossy 4096 Apr 10 05:40 agent2
88 7 Mary Laser
lrwxrwxrwx 1 root  root     5 Apr 12 15:58 localhost -> agent2
89 11 Mary Laser
drwxrws--- 2 fossy fossy 4096 Apr 10 14:32 server
90 7 Mary Laser
</pre>
91 11 Mary Laser
Make sure your user:group is fossy:fossy and permission are 2770 on all systems in your cluster.
92 12 Mary Laser
b) Create repository sub-directories on all systems in the cluster and set permissions to 2770 (setgid bit on): 
93 7 Mary Laser
<pre>
94 7 Mary Laser
cd localhost
95 7 Mary Laser
mkdir files gold logs ununpack wget
96 7 Mary Laser
chown -R fossy:fossy *
97 11 Mary Laser
chmod 2770 *
98 1 Mary Laser
</pre>
99 13 Mary Laser
# Create & test ssh keys for user fossy
100 13 Mary Laser
a) Create SSH keys for the fossy user and distribute them on all hosts. The keys should NOT include a pass-phrase. (Since the scheduler cannot enter a password, a require pass-phrase will cause the remote execution to fail.) 
101 13 Mary Laser
b) Test the keys (including accepting the server key for the first connection). You should be able to login without a password.
102 16 Mary Laser
# Additional _*REQUIRED*_ configuration
103 16 Mary Laser
104 16 Mary Laser
Full instructions are available in the source install file "FOSSology version 2.0 INSTALL file":http://fossology.svn.sourceforge.net/viewvc/fossology/branches/fossology2.0/fossology/install/INSTALL.
105 16 Mary Laser
To summarize, the following must be configured:
106 16 Mary Laser
107 16 Mary Laser
  * kernel parameters
108 17 Mary Laser
 To set on a running system:
109 17 Mary Laser
<pre>
110 17 Mary Laser
# echo 512000000 > /proc/sys/kernel/shmmax
111 17 Mary Laser
</pre>
112 17 Mary Laser
 To make sure it gets set on boot
113 17 Mary Laser
<pre>
114 17 Mary Laser
# echo "kernel.shmmax=512000000" >> /etc/sysctl.conf
115 17 Mary Laser
</pre>
116 17 Mary Laser
  
117 16 Mary Laser
  * Adjust postgresql configuration
118 16 Mary Laser
  * Adjust PHP config (both apache and cli)
119 16 Mary Laser
  * Adjust apache2 configuation (sites-available)
120 16 Mary Laser
121 16 Mary Laser
122 16 Mary Laser
See the above INSTALL file for details.