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] | + | 2. Untar the [http://electricsheep.org/electricsheep-server-2.6.tar.gz server tarball] to /home/sheep/server |
| − | 3. | + | 3. Make a copy of the example config: |
| − | + | cp cgi/config.pl.eg cgi/config.pl | |
| − | 5. Edit etc/rc.fsd | + | 4. Edit '''cgi/config.pl''' and change these lines to appropriate values: |
| + | |||
| + | $outgoing_url_prefix = "<nowiki>http://myhost/sheepdir</nowiki>"; | ||
| + | $admin_name = "admin"; | ||
| + | $admin_password = "admin-password-here"; | ||
| + | |||
| + | 5. Edit cgi/global.pl | ||
| + | |||
| + | $root_url = "<nowiki>http://myhost/sheepdir</nowiki>"; # 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 | ||
| + | |||
| + | 7. Do this from the base directory to compile and copy needed binaries into bin: | ||
| − | |||
cd src | cd src | ||
make pnmmultipaste | make pnmmultipaste | ||
| Line 23: | Line 37: | ||
cp /usr/bin/dot 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/ | + | Alias /sheep/cgi/list "/home/sheep/server/cgi/list.txt" |
| − | ScriptAlias /sheep/cgi/get "/home/sheep/ | + | ScriptAlias /sheep/cgi/get "/home/sheep/server/cgi/get.cgi" |
| − | ScriptAlias /sheep/cgi/put "/home/sheep/ | + | ScriptAlias /sheep/cgi/put "/home/sheep/server/cgi/put.cgi" |
| − | ScriptAlias /sheep/cgi/ "/home/sheep/ | + | ScriptAlias /sheep/cgi/ "/home/sheep/server/cgi/" |
| − | Alias /sheep/ "/home/sheep/ | + | Alias /sheep/ "/home/sheep/server/" |
| − | <Directory "/home/sheep/ | + | <Directory "/home/sheep/server/cgi"> |
| − | SetEnv PERL5LIB /home/sheep/ | + | SetEnv PERL5LIB /home/sheep/server/cgi |
Order allow,deny | Order allow,deny | ||
Allow from all | Allow from all | ||
| Line 41: | Line 55: | ||
</Directory> | </Directory> | ||
| − | <Directory "/home/sheep/ | + | <Directory "/home/sheep/server"> |
# need this as mpgs are links | # need this as mpgs are links | ||
Options SymLinksIfOwnerMatch | Options SymLinksIfOwnerMatch | ||
Revision as of 23:32, 22 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 /home/sheep/server
3. Make a copy of the example config:
cp cgi/config.pl.eg cgi/config.pl
4. Edit cgi/config.pl and change these lines to appropriate values:
$outgoing_url_prefix = "http://myhost/sheepdir"; $admin_name = "admin"; $admin_password = "admin-password-here";
5. Edit cgi/global.pl
$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
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>