Getting MICROPERL into your Seagate Satellite

I bought a Seagate Satellite disk which is really a portable NAS station with a 500GB HDD. On top of the many things that i have done with the disk, i included PERL in the CGI mechanisms of the lighttpd server that is included as part of the firmware. 

Of course, i did many other things to ensure that the Satellite runs as fast as it can while loading as little as possible… but that’s another post for another time (hopefully soon).

To jump the gun a little, here is how i got my  NAS running perl. I assume basic linux knowledge in this post.

1) I first obtained the microperl package as a ipkg for arm and unpacked it using the commands from my other post. Why microperl? coz i believe there isn’t enough disk space for everything. So if you are going to develop stuff using this, avoid using modules. I obtained the package from this link http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/ form the Seagate forum post here.

2) Following which, i extracted the microperl binary and placed it within the /usr/bin/ directory, and i created a soft link to perl.

3) After that, i modified the lighttpd.conf file as described in http://www.cyberciti.biz/tips/lighttpd-howto-setup-cgi-bin-access-for-perl-programs.html to enable mod_cgi in addition to assigning .pl files to be executed as PERL.

4) I then added “index.pl” to the list of approved indexes. Once done, just restart lighttpd and you are done!

A simple PERL script such as the below would work.. YEAH!

NOTE: but DARN… environment variables don’t work…. hum….

#!/usr/bin/perl

print “Content-type: text/html\n\n”;

print “Hello Script!”