LinHES Forums http://forums.linhes.org/ |
|
R6 rtorrent + wtorrent http://forums.linhes.org/viewtopic.php?f=3&t=20447 |
Page 1 of 1 |
Author: | bigtoedsloth [ Fri Oct 30, 2009 5:03 am ] |
Post subject: | R6 rtorrent + wtorrent |
Look, if you're running LinHES then you're running a really lean linux distribution, so if you're into downloading stuff via torrents then you shouldn't resort to a bloated bittorrent client. You want rtorrent. But the user interface is really only for hard-core users, so there's a web-based interface to rtorrent, called wtorrent (which is one of many web-based rtorrent interfaces). Installing rtorrent This isn't too hard, but does mean compiling some stuff yourself. But don't be afraid, one of the advantages of an arch-based distribution is that you can use the awesome "Arch Build System". I've grabbed the necessary PKGBUILD files from the mainline arch. rtorrent has two dependencies which need to be installed first. First libsigc++2.0 Code: mkdir libsigc++2.0 Then copy this as a file called PKGBUILD into that directorycd libsigc++2.0 Code: # $Id: PKGBUILD 15586 2008-10-15 21:29:06Z jgc $ Now build using# Maintainer: Jan de Groot <jgc@archlinux.org> # Contributor: Tom Newsom <Jeepster@gmx.co.uk> pkgname=libsigc++2.0 pkgver=2.2.3 pkgrel=1 pkgdesc="Libsigc++ implements a full callback system for use in widget libraries - V2" arch=(i686 x86_64) license=('LGPL') url="http://libsigc.sourceforge.net/" source=(http://ftp.gnome.org/pub/GNOME/sources/libsigc++/2.2/libsigc++-${pkgver}.tar.bz2) depends=('gcc-libs>=4.3.2') options=(!libtool !emptydirs) md5sums=('f4574b343eebc4bff66a9e1e5ce6e490') build() { cd "${srcdir}/libsigc++-${pkgver}" ./configure --prefix=/usr || return 1 make || return 1 make DESTDIR="${pkgdir}" install || return 1 } Code: makepkg -s and install usingCode: sudo pacman -U libsigc++2.0-2.2.3-1-i686.pkg.tar.gz Now a similar process for libtorrent Code: mkdir libtorrent Copy this into the new directory as a file called PKGBUILDcd libtorrent Code: # Maintainer: Daenyth <Daenyth+Arch [at] gmail [dot] com> Compile with# Contributor: Jeff Mickey <jeff@archlinux.org> # Contributor: sh__ pkgname=libtorrent pkgver=0.12.5 pkgrel=1 pkgdesc="BitTorrent library written in C++" arch=('i686' 'x86_64') url="http://libtorrent.rakshasa.no" license=('GPL') depends=('libsigc++2.0' 'openssl') options=('!libtool') source=(http://libtorrent.rakshasa.no/downloads/$pkgname-$pkgver.tar.gz) md5sums=('fe8155d364b220713074423100d4bf29') build() { cd "$srcdir/$pkgname-$pkgver" CXXFLAGS="$CXXFLAGS -fno-strict-aliasing" \ ./configure --prefix=/usr --disable-debug || return 1 make || return 1 make DESTDIR="$pkgdir" install } Code: makepkg -s then install withCode: sudo pacman -U libtorrent-0.12.5-1-i686.pkg.tar.gz Now comes building and installing rtorrent. First a dependency which is already in the LinHES repositories Code: sudo pacman -S xmlrpc-c Following a procedure that should seem familiar by nowCode: mkdir rtorrent Copy this as a file called PKGBUILDcd rtorrent Code: # Maintainer: Daenyth <Daenyth [at] gmail [dot] com> compile# Contributor: Jeff Mickey <jeff@archlinux.org> # Contributor: sh__ pkgname=rtorrent pkgver=0.8.5 pkgrel=1 pkgdesc="Ncurses BitTorrent client based on libTorrent" arch=('i686' 'x86_64') url="http://libtorrent.rakshasa.no" license=('GPL') depends=('libtorrent=0.12.5' 'curl>=7.14.3' 'xmlrpc-c') source=(http://libtorrent.rakshasa.no/downloads/$pkgname-$pkgver.tar.gz) md5sums=('e701095e1824b7e512a17000f4c0a783') build() { cd "$srcdir/$pkgname-$pkgver" CXXFLAGS="$CXXFLAGS -fno-strict-aliasing" \ ./configure --prefix=/usr --disable-debug --with-xmlrpc-c || return 1 make || return 1 make DESTDIR="$pkgdir" install } Code: makepkg -s and installCode: sudo pacman -U rtorrent-0.8.5-1-i686.pkg.tar.gz Now rtorrent is installed and something should happen when you run it. rtorrent setup I run rtorrent as a specific rtorrent user for security purposes. So I will assume that you do the same (making a new account for a new user is outside the scope of this tip). All of the usual torrent tweaking parameters are in a .rtorrent.rc file in the rtorrent user directory. Start off by going to the directory where you made the rtorrent package, then Code: cd src/rtorrent-0.8.5/doc/ Then you'll want to edit the file (as the rtorrent user) according to your system requirements. Some reasonable directions on how to do that are on the arch wiki http://wiki.archlinux.org/index.php/RTorrent.sudo cp rtorrent.rc ~rtorrent/.rtorrent.rc At this point rtorrent should run and be configured to allow downloading/uploading torrents. wtorrent wtorrent needs lighttpd (which is probably already installed), plus sqlite. Install with Code: sudo pacman -S sqlite3 The wtorrent website is here http://www.wtorrent-project.org/trac/ and offers excellent installation instructions, which I won't repeat here. The installation directory is Code: /data/srv/httpd/htdocs php.ini requires some modification. EditCode: /etc/php/php.ini and down the bottom of the file uncomment the lines that look likeCode: extension=curl.so During the wtorrent setup you specify a torrent directory, I had to add that directory to the open_basedir variable in php.ini.... extension=pdo.so extension=pdo_mysql.so extension=pdo_odbc.so extension=pdo_pgsql.so extension=pdo_sqlite.so rtorrent as a service To have rtorrent running all of the time you can add it to the list of runsvdir services. Just as an aside, this runit set of boot scripts and services is seriously good ... so simple and effective. In /etc/sv create a directory called rtorrent (as root). In that directory create an executable file called run, containing Code: #!/bin/sh exec 2>&1 export TERM=linux . /etc/rc.conf . /etc/rc.d/functions stat_runit "Starting rtorrent server" exec su rtorrent -c rtorrent > /dev/null To start the service (and have it start every time on boot) simply create a link to this directory in /var/service Code: sudo ln -s /etc/sv/rtorrent /var/service/rtorrent Check the status with Code: sudo sv status rtorrent orCode: ps -e | grep rtorrent
That's it. Done. |
Author: | langelgjm [ Fri Oct 30, 2009 11:16 am ] |
Post subject: | |
Thanks for the howto. I'm currently using torrentflux-b4rt on my LinHES box... it is pretty good, feature-rich, but sometimes sluggish (which was more of a problem on my older machine, after upgrading to my current MBE it has not been an issue). I just looked at some of the wtorrent screenshots, and it seems to have a very nice web interface that supports multiple users. Any comments on file prioritization (i.e., prioritizing files within a torrent)? Or on how it compares to something like torrentflux? When I get some more time I may have a go and try installing it. |
Author: | Martian [ Thu Jan 21, 2010 3:10 pm ] |
Post subject: | |
I have rtorrent install and working (with magnet link support as well!) and I can run it as a daemon per your instructions however I need to have it startup in a screen on bootup so that I can interact with it manually when needed. Presently i can't add magnet links to rtorrent through the web frontend so I must add them manually. Anyone have any ideas on how to modify the startup script to launch rtorrent in a screen??? Thanks, Martian ps: I have pacman packages for installing rtorrent with magnet link support that I would be happy to post along with instructions if someone knows of a good place to host the files (~5 MB) |
Author: | Golffies [ Sun Apr 04, 2010 10:52 am ] |
Post subject: | Re: R6 rtorrent + wtorrent |
Hello, bigtoedsloth wrote: Installing rtorrent
This isn't too hard, but does mean compiling some stuff yourself. But don't be afraid, one of the advantages of an arch-based distribution is that you can use the awesome "Arch Build System". I've grabbed the necessary PKGBUILD files from the mainline arch. Thanks so much for the step by step tutorial. To which extend your PKGBUILD files can be tuned to install libtorrent-0.12.6 / rtorrent-0.8.6 or any later version ? Is it just a matter of update for packages and dependencies names, or something else would change ? Libtorrent / rtorrent is not available from LinHES repositories, but ArchLinux does provide the packages. With debian based distributions, I was used to 'pin' a few applications from repositories other than main ones (for instance, picking apps from "testing", when running "stable"). Does it make sense to do the same with LinHES, and 'pinning' libtorrent / rtorrent from ArchLinux repositories ? Could it ease later upgrades with LinHES ? Or does this potentially break LinHES and lead to more problems than it may solve ? Thanks for advice. |
Author: | mihanson [ Sun Apr 04, 2010 3:56 pm ] |
Post subject: | |
For R6 I reccommed transmission-cli for the LinHES repos. You can run the web interface in conjuction with the daemon. There are instructions when you install for the first time on how to set up a web proxy to make surfing to the web site extra easy. |
Author: | Golffies [ Mon Apr 05, 2010 3:29 am ] |
Post subject: | transmission |
Yes, this is a side idea. Does Transmission pre-allocate files as rtorrent does from version 0.8.5, in order to avoid massive fragmentation under XFS file system ? EDIT: Sorry for having asked. I read from changelog this is the case since version 1.60 (2009/05/04) at least: Quote: Transmission 1.60 (2009/05/04)
All tickets closed by this release All Platforms (SNIP) Support for file preallocation on XFS filesystems |
Author: | Martian [ Mon Apr 05, 2010 7:18 am ] |
Post subject: | |
Golffies It's not to difficult to craft a PKGBUILD for whatever version of libtorrent / rtorrent you want. As stated earlier in the thread you need to install / upgrade a for other packages as well but it's not to bad. Look into ABS and AUR for arch and you will find everything you need. If you have any questions feel free to hit me up. I'm presently running an SVN version of libtorrent / rtorrent with Magnet Link support using an SVN version of rutorrent as the web frontend. I can simply right click on a Magnet Link and select "copy link location" then paste it into the "start torrent" page in rutorrent and away it goes. It's stupid easy! I tried several different torrent setups and rtorrent-svn + rutorrent was the best IMO. Martian |
Author: | ThurmanMcdearman [ Fri Oct 08, 2010 12:18 pm ] |
Post subject: | |
What do you recommend for the linhes repos? I'm keen on each of our perfect uninstaller to improve my personal computer and truth about six pack abs to change simple health care. Investing in utilized this salehoo review to make money world wide web? |
Author: | bigB [ Thu Nov 11, 2010 8:54 pm ] |
Post subject: | |
Hi, I'm just recovering from a recent HDD failure. I have successfully had rtorrent and wtorrent working in the past, but this time around, i'm having issues. On the wtorrent page i get "Error: could not connect to rtorrent". In lighttpd error.log I get Code: 2010-11-12 12:44:55: (mod_scgi.c.2276) establishing connection failed: Connection refused 2010-11-12 12:44:55: (mod_scgi.c.2403) fcgi-server disabled: 127.0.0.1 5000 2010-11-12 12:44:55: (mod_scgi.c.2784) all handlers for /RPC2 on /RPC2 are down. .rtorrent.rc contains "scgi_port = localhost:5000" and lighttpd.conf contains: Code: scgi.server = ( "/RPC2" => # RT_DIR ( "127.0.0.1" => ( "host" => "127.0.0.1", # Ip where rtorrent is listening "port" => 5000, # Port specified in .rtorrent.rc "check-local" => "disable" ) ) ) and wtorrent/conf/user.conf.php contains: Code: <?php
/* wTorrent autoconfiguration file. Created 10/11/2010 */ define ('LANGUAGE', 'en'); define ('DB_FILE', 'db/database.db'); define ('RT_HOST', 'localhost'); define ('RT_PORT', 80); define ('RT_DIR', '/RPC2'); define ('RT_AUTH', false); define ('RT_USER', ''); define ('RT_PASSWD', ''); define ('NO_MULTICALL', true); define ('EFFECTS', true); define ('DIR_TORRENTS', 'torrents/'); define ('DIR_EXEC', '/data/srv/httpd/htdocs/wtorrent/'); define ('DIR_DOWNLOAD', '/myth/bittorrent_inprogress'); ?> versions are: xmlrpc-c 1.06.41 libtorrent 0.12.7 rtorrent 0.8.7 Any help would be great, if i've left anything out, please ask. BigB. |
Author: | bigB [ Fri Nov 12, 2010 7:35 pm ] |
Post subject: | |
Hi, Should have known it was something stupid and not my settings. I don't know what issue i was having, but something prompted me to update the version of xmlrpc-c. When i did that, i recompiled rtorrent, but not libtorrent. I have just recompile both and now it works again. ![]() BigB |
Author: | bigB [ Fri Nov 12, 2010 8:11 pm ] |
Post subject: | |
Hi Ultimately my problem was the versions of rtorrent and libtorrent. Don't use: libtorrent 0.12.7 rtorrent 0.8.7 I downgraded to: ibtorrent 0.12.6 rtorrent 0.8.6 And i am now a happy camper. BigB. |
Author: | Martian [ Sun Nov 14, 2010 8:42 pm ] |
Post subject: | |
Be sure to check out rutorrent. It is really an amazing front end to rtorrent. |
Author: | mediathreat [ Mon Sep 19, 2011 5:10 pm ] |
Post subject: | |
anyone using rtorrent and rutorrent on LInHes 7? My first few attempts broke mythfrontend when i installed some of the dependencies. |
Author: | Martian [ Thu Sep 22, 2011 9:31 am ] |
Post subject: | |
mediathreat wrote: anyone using rtorrent and rutorrent on LInHes 7?
My first few attempts broke mythfrontend when i installed some of the dependencies. I had both running at one time although I've since moved my torrent setup to another box. I can't think of any rtorrent dependencies that should break mythfrontend. Are you building the packages yourself from AUR or did you change to the Arch repository and try to install rtorrent? Changing repositories and trying to install anything is a sure fire way to hose your system. You need to build the packages yourself from AUR. Martian |
Page 1 of 1 | All times are UTC - 6 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |