Electric Sheep

From Jon's Wiki
Revision as of 00:50, 23 March 2007 by Johnno (talk | contribs) (→‎Installing the Electric Sheep server)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Whizzy Electricsheep videos.

Installing the Electric Sheep server

1. Install the dependencies:

apt-get install libapache2-mod-perl2 graphviz netpbm libjpeg-progs mjpegtools electricsheep

2. Untar the server tarball to somewhere useful, eg. /home/sheep/server which assumes a sheep user in the www-data group.

3. Make a copy of the example config:

cp cgi/config.pl.eg cgi/config.pl

4. Edit cgi/config.pl and tweak these vars as appropriate:

$outgoing_url_prefix = "http://myhost/sheepdir";
$admin_name = "admin";
$admin_password = "admin-password-here";

5. Edit cgi/global.pl and tweak these vars:

$root_url = "http://myhost/sheepdir"; # same as $outgoing_url_prefix
$tmp_dir = "$run_dir/tmp";
$fsd_log = "$run_dir/fsd_log";
$access_log = "$run_dir/access_log";

6. Edit etc/rc.fsd so the last parameter on the start-stop-daemon call matches $fsd_log above:

$DIR/run/fsd_log

7. Do this from the base directory to compile and copy needed binaries into bin:

cd src
make pnmmultipaste
cd .. 
cp src/pnmmultipaste bin
cp /usr/bin/flam3-genome bin
cp /usr/bin/dot bin

8. Configure apache to point at the server, with configured Perl cgi (tweak to fit your Apache as necessary):

Alias /sheep/cgi/list "/home/sheep/server/cgi/list.txt"
ScriptAlias /sheep/cgi/get "/home/sheep/server/cgi/get.cgi"
ScriptAlias /sheep/cgi/put "/home/sheep/server/cgi/put.cgi"
ScriptAlias /sheep/cgi/ "/home/sheep/server/cgi/"
Alias /sheep/ "/home/sheep/server/"
 
<Directory "/home/sheep/server/cgi">
  SetEnv PERL5LIB /home/sheep/server/cgi
  Order allow,deny
  Allow from all
  # stop access to perl and backup files
  <FilesMatch "(.pl|~)$">
    Deny from all
  </FilesMatch>
</Directory>
 
<Directory "/home/sheep/server">
  # need this as mpgs are links
  Options SymLinksIfOwnerMatch
  Order allow,deny
  Allow from all
</Directory>