Wednesday, May 14, 2008

Setting up transmission and clutch

Setting up transmission+clutch is really simple if you have upgraded to fonz's fun_plug version 0.5. Here's a quick how-to.

Transmission (aka the core) setup

  1. Grab the transmission package transmission-1.20-ffp0.5.tgz.
  2. Grab the required package curl-7.18.1.tgz.
  3. Install both using funpkg -i . (FYI, funpkg is found in the /ffp/sbin folder in case this is not setup on your path. This usually happens when you telnet/ssh in as a normal user and then do a su to root)
  4. By default, transmission will create the directory /mnt/HD_a2/.transmission where it stores its working files and also your downloads. To change the location of this folder, edit the variable TRANSMISSION_HOME in the startup script /ffp/start/ To change the downloads folder, you will need to use the CLI or web interface (see below).
  5. Start transmission by using the command . /ffp/start/ start (note the dot in the beginning and the space immediately after).
  6. Make the script /ffp/start/ executable if you want it to auto start every time you boot. i.e. chmod a+x /ffp/start/

For controlling the core, you have two options.

(1) Using the CLI via transmission-remote

No installation is required as this is bundled together with the core transmission package. For help on how to use, just type in the command without any arguments. Using the CLI also means that you have to first telnet into the box.

(2) Using the web interface by installing Clutch

Clutch is a web application that connects to the transmission core via the daemon socket file. As it is distributed as a web application package separately from transmission, you will need to go through some installation steps. Also, as it is just a web application package, you will need to install a web server (with PHP capabilities) on your box as a pre-requisite.

  1. Assuming you have ffp v0.5 already, you will have lighttpd (i.e. the web server) installed (but not running yet) by default. To get the PHP capabilities, download the package php-5.2.6-1.tgz and run the funpkg -i command to install it.
  2. Configure your web server by copying the configuration script from the examples directory. i.e. cp /ffp/etc/examples/lighttpd.conf-with-php lighttpd.conf
  3. The web server assumes that your web document root is at /mnt/HD_a2/www and you will need to create the necessary directories manually. i.e. mkdir -p /mnt/HD_a2/www/logs /mnt/HD_a2/www/pages
  4. Now that we got the pre-requisite setup completed, time to grab the clutch package Clutch-0.4.tar.gz.
  5. Note that this is not a ffp package and you do not use funpkg -i to install it. Instead, you simply untar it into your web document root directory. i.e. tar zxf Clutch-0.4.tar.gz -C /mnt/HD_a2/www/pages
  6. You may wish to change the path to the clutch package for URL easy access. i.e. mv /mnt/HD_a2/www/pages/Clutch-0.4 /mnt/HD_a2/www/pages/clutch
  7. And finally, to allow clutch to find your transmission core, create the file clutch/remote/data/socket.txt and store the path to the transmission socket file in there. i.e. echo /mnt/HD_a2/.transmission/daemon/socket > /mnt/HD_a2/www/pages/clutch/remote/data/socket.txt
  8. Once all the above setup is done, we are ready to start the web server. To do so run the command . /ffp/start/ start.
  9. Make the script /ffp/start/ executable if you want it to auto start every time you boot. i.e. chmod a+x /ffp/start/
  10. To access the web interface, point your browser to http://[ip_address_of_your_box]:8080/clutch. Note that Clutch does not support Internet Explorer so you have to use Firefox, Opera or Safari instead.
  11. Note that by default, anyone can access the BT client via the URL above. If you are paranoid over security or thinking of exposing it over the internet (so that you can control your BT downloads from office?), you may want to setup access control via directory ACL in lighttpd.

No comments: