Install Torrentflux-b4rt on Debian 4.0 Etch
Torrentflux is a Web application allowing you to control various BitTorrent clients. Written in PHP, it allow you to start BitTorrent, Usenet and standard downloads from any computer connected to the Internet. It is very useful if you move a lot, and use BitTorrent download frequently.
First, you need to install a HTTP server with PHP support. In order to do this, you can follow my guide Install Lighttpd and PHP 5 on Debian 4.0 Etch.
You also need to create a TORRENTFLUX database. This can be done by following my guide MySQL for Debian 4.0 Etch.
You need to install needed PHP extensions and softwares :
/usr/bin/apt-get install bzip2 php5-mysql php5-gd php5-cli unrar grep python \
net-tools mawk wget unzip cksfv vlc-nox uudeview apg python-psyco python-crypto \
libxml-simple-perl libxml-dom-perl libdbd-mysql-perl libdigest-sha1-perl \
Once this done, you have to make sure that PHP has loaded the newly installed modules by restarting your web server. For example, with lighttpd, do:
First, select the Torrentflux-b4rt version you want to install. For the moment, we use a Beta version (which is only Beta because of its HTML interface, but work perfectly) :
And we download the sources :
/usr/bin/wget http://download.berlios.de/tf-b4rt/torrentflux-b4rt_$VERSION.tar.bz2 \
We untar the downloaded file :
/bin/tar --directory /tmp -xjf /tmp/torrentflux-b4rt_$VERSION.tar.bz2
And we move the created folder to its destination :
/bin/mv /tmp/torrentflux-b4rt_$VERSION /opt/torrentflux
We create a symbolic link for the Torrentflux web front-end to a place available to the HTTP server :
/bin/ln -s /opt/torrentflux/html /var/www/torrentflux
We make the configuration folder writable by the server :
/bin/chown -R www-data:www-data /var/www/torrentflux/inc/config/
Now, create the Torrentflux download folder :
/bin/mkdir --parent /var/lib/torrentflux
And make it writable for the HTTP server :
/bin/chown -R www-data:www-data /var/lib/torrentflux
You can now start configuring Torrentflux by viewing :
Follow the configuration steps :
- Database : Disable database creation (by unchecking the "Create Database" checkbox).
- Server configuration : Use /var/lib/torrentflux as User Download Path location.
- Software dependencies check : This step should went fine.
- setup.php file deletion : Warning, this step fail. It is normal, don't worry about it.
Once you are at the setup.php file deletion step, your configuration is done. Come back to your command line, and remove the setup.php file :
And make unwritable by the server the Torrentflux configuration :
/bin/chown -R root:root /var/www/torrentflux/inc/config/
Once this done, choose a login and password for your administrator account. This can be done by this command line :
TORRENTFLUX_PWD=`apg -q -a 0 -n 1 -M NCL`
echo "Your password for the 'admin' account is '$TORRENTFLUX_PWD'."
Note and remember this password, and go to the Torrentflux login page. The first login is used as administration account. You can use your usual administrator login, or the one proposed by the command line before :
Once your login done, you will be redirect to a configuration page.
The only change to do here is :
- transmissioncli : /usr/bin/transmissioncli
In this page, you configure file transfers parameters. On my own, I use the following settings :
- Default BitTorrent Client : BitTornado : This client allow encryption.
- Torrent Metainfo Client : btshowmetainfo.py
- Port Range (B+T+M) : Select here the BitTorrent connection ports. Don't forget to open them on your firewall or router.
- Default Percentage When Seeding Should Stop (B+T+M+A) : 150 % : Be nice, don't use a value under 100%.
- Wget : Enable Passive FTP : True : Mandatory if you use a firewall or a router.
- Enable Nzbperl : All users : Allow all of your users to run Usenet downloads.
- Use Subdirectories : Use Usenet group name.
In this page, you setup your interface parameters. I change the following values:
- Select Authentication Type: Form-Auth + Cookie : This value will ease your life :D.
- Default language : English, or any other language that fit you :D
- Enable template cache : True
In this page, you change the interface automatic update parameters. Here are the ones I use:
- AJAX update : True : AJAX update of the download list.
- Default Torrent Search Engine: mininova : TorrentSpy is not a very good idea :D.
- Default Sort Order : Name - Ascending : We sort torrents by name (it is easier to use in my opinion).
DirIn this page, you can change downloads folders parameters.
- Public Write : True : Very useful to delete your downloaded files from shell without using root account.
In this page, you can create your users. Use the admin account only for administration, not for downloading.
Using Transmission as BitTorrent client
If you want to use Transmission in stead of BitTornado to manage your downloads, be aware that you can not use the version provided by Debian. You need to build by yourself a modified version of Transmission. This modification is needed by Torrentflux in order to work flawlessly.
In order to do this, you first need to choose the version of Transmission to install:
And start the download:
/usr/bin/wget http://download.m0k.org/transmission/files/transmission-$VERSION.tar.bz2 \
Untar the downloaded sources:
/bin/tar --directory /tmp -xjf /tmp/transmission-$VERSION.tar.bz2
Untar the Torrentflux patch for Transmission 1.06:
/bin/tar --directory /tmp -xjf /opt/torrentflux/clients/transmission/Transmission-1.06_tfCLI-svn3356.tar.bz2
Patch the Transmission sources:
/bin/cp /tmp/Transmission-1.06_tfCLI-svn3356/cli/transmissioncli.c /tmp/transmission-$VERSION/cli/transmissioncli.cInstall the build dependancies:
/usr/bin/apt-get install make gcc libc6-dev pkg-config libssl-devGo in the sources folder:
Now, I suggest you to remove the build dependencies in order to keep your system clean:
/usr/bin/apt-get --purge remove make gcc libc6-dev libssl-dev pkg-config
Now, log into Torrentflux as admin, and edit your settings in order to use the Transmission command line.
Note: The path to use in the "server" tab for the Transmission command line interface is:
You may have been surprised by the fact that VLC (Video LAN Client)
is part of Torrentflux dependencies. Well, the reason to this is that Torrentflux use VLC in order to "stream" the downloaded Video contents. In order to this fonctionnality to work, you need to open the 8080 port of your firewall or router (You can change this port in the "Stats" configuration page).
This tool allow Torrentflux to do some actions even if you are not connected to the tool. Having not found a init.d script for this daemon, and having no use of it for the moment, i only point this tool to you. I encourage you to read the description of this tool functions in its configuration page. Some can be of use to you.
If Torrentflux-B4rt does not fit your needs, I encourage you to try BTG, another BitTorrent client with Web interface. In order to do this, I invite you to follow my guide Install BitTorrent client BTG and its Web user interface wwwBTG on Debian 4.0 Etch.
- Thanks to Torrentflux-b4rt developers.