Difference between revisions of "Electric Sheep"

From Jon's Wiki
 
Line 7: Line 7:
 
  apt-get install libapache2-mod-perl2 graphviz netpbm libjpeg-progs mjpegtools electricsheep
 
  apt-get install libapache2-mod-perl2 graphviz netpbm libjpeg-progs mjpegtools electricsheep
  
2. Untar the [http://electricsheep.org/electricsheep-server-2.6.tar.gz server tarball] to /home/sheep/server
+
2. Untar the [http://electricsheep.org/electricsheep-server-2.6.tar.gz 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:
 
3. Make a copy of the example config:
Line 13: Line 13:
 
  cp cgi/config.pl.eg cgi/config.pl
 
  cp cgi/config.pl.eg cgi/config.pl
  
4. Edit '''cgi/config.pl''' and change these lines to appropriate values:
+
4. Edit '''cgi/config.pl''' and tweak these vars as appropriate:
  
 
  $outgoing_url_prefix = "<nowiki>http://myhost/sheepdir</nowiki>";
 
  $outgoing_url_prefix = "<nowiki>http://myhost/sheepdir</nowiki>";
Line 19: Line 19:
 
  $admin_password = "admin-password-here";
 
  $admin_password = "admin-password-here";
  
5. Edit cgi/global.pl and tweak these lines:
+
5. Edit '''cgi/global.pl''' and tweak these vars:
  
 
  $root_url = "<nowiki>http://myhost/sheepdir</nowiki>"; # same as $outgoing_url_prefix
 
  $root_url = "<nowiki>http://myhost/sheepdir</nowiki>"; # same as $outgoing_url_prefix
Line 27: Line 27:
  
 
6. Edit '''etc/rc.fsd''' so the last parameter on the start-stop-daemon call matches ''$fsd_log'' above:
 
6. Edit '''etc/rc.fsd''' so the last parameter on the start-stop-daemon call matches ''$fsd_log'' above:
 +
 
  $DIR/run/fsd_log
 
  $DIR/run/fsd_log
 +
 
7. Do this from the base directory to compile and copy needed binaries into bin:
 
7. Do this from the base directory to compile and copy needed binaries into bin:
  

Latest revision as of 00:50, 23 March 2007

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>