I have torrentflux running in my debianized NSLU2 but Apache and MySQL are quite the recource hogs for the puny 133/266MHz ARM processor. As a solution I changed Apache to LightTPD + php5-cgi and MySQL to SQLite. I haven't really benchmarked it yet but at least it feels to be running A LOT smoother now.
Since i had quite an amount of trouble getting the SQLite running I decidet to post this _short_ HOWTO to help othes in similar trouble.
Setting up LightTPD was a breeze following the instructions found at
http://trac.lighttpd.net/trac/wiki/TutorialLighttpdAndPHP I'm using Debian unstable so I coud just apt-get the lighttpd and php5-cgi packages.
Following changes were made to confs:
/etc/lighttpd/lighttpd.confADD
fastcgi.server = ( ".php" => ((
"bin-path" => "/usr/bin/php5-cgi",
"socket" => "/tmp/php.socket",
)))
/etc/php5/cgi/php.iniMODIFY
# cgi.fix_pathinfo = 0
to
cgi.fix_pathinfo = 1
After reloading lighttpd php should be up and running.
SQLite:
ADOdb can't handle SQLite3 databases yet so I had to settle for SQLite 2.x. I suppose it doesn't affect torrentflux that much but I had to edit the orginal torrentflux.sql-fire a bit more.
Install SQLite:
apt-get install sqlite php5-sqlite
This required no configuration at all.
create the SQLite database using the customized sql-file:
sqlite torrentflux.db
sqlite>.read /path/to/sqlite2-torrentflux.sql
sqlite>.quit
now just put the resulted torrentflux.db file somewhere where lighttpd can access it and make sure that lighttpd (usually user www-data) has rights to access it.
Config torrentflux:
/var/www/torrentflux/config.phpMODIFY
$cfg["db_type"] = "mysql";
$cfg["db_host"] = "localhost";
to
$cfg["db_type"] = "sqlite";
$cfg["db_host"] = "/path/to/torrentflux.db";
db_name/user/pass fields are not used with SQLite so you can let them be at default values.
Do the usual torrentflux confs...
That's it. I'm attaching the modified .sql file and the ready SQLite .db file. They should work. (just strip the .txt from filenames)
So this is how I got the thing working... hopefully this helps someone in need of lightweight paltform for torrentflux...
-Akhbit