ďťż
 
 
   wtorrent instalacja przez www, nie łączy się z rtorrent
 
 

Tematy

 
    
 

 

 

 

wtorrent instalacja przez www, nie łączy się z rtorrent





kierzniak - 23-10-2008 11:44
Zrobilem wszytko tak jak w tym tutorialu, ale niestety wtorrent przy instalacji przez www nie chce sie polaczyc z rtorrentem. Moje pliki konfiguracyjne wygladaja tak:

rtorrent.rc: scgi_port = localhost:5000

min_peers = 40

max_peers = 100

min_peers_seed = 10

max_peers_seed = 50

max_uploads = 15

#upload_rate = 50

directory = /home/kierzniak/torrents/doing

session = /home/kierzniak/.rtsession

schedule = watch_directory,5,5,load_start=/home/kierzniak/torrents/watch/*.torrent

schedule = tied_directory,5,5,start_tied=

schedule = untied_directory,5,5,close_untied=

on_finished = move_complete,"execute=mv,-u,$d.get_base_path=,/home/kierzniak/torrents/done/ ;d.set_directory=/home/kierzniak/torrents/done/"

on_start    = link1,"create_link=tied,,.started"

on_stop    = link1,"delete_link=tied,,.started"

on_finished = link1,"create_link=tied,,.finished"

on_erase    = link1,"delete_link=tied,,.finished"

schedule = low_diskspace,5,60,close_low_diskspace=100M

#schedule = ratio,60,60,"stop_on_ratio=120,200M,2000"

port_range = 63963-63981

port_random = no

check_hash = yes

use_udp_trackers = yes

encryption = allow_incoming,try_outgoing,enable_retry

dht = auto

dht_port = 63982[/scroll] home.conf.php
[scroll]<?php
/*
This file is part of wTorrent.

wTorrent is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.

wTorrent is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

Modified version of class done by David Marco Martinez
*/

// Base URL of application (where index.php is)
define( 'URL', 'http://kierzniak/' );
define( 'BASE', 'http://kierzniak/' );

// SQLite database file (set folder permision 0777 or chmod to httpd server) (wTorrent will create database when running install.php)
define( 'DB_FILE', 'db/database.db');

// Host or IP to connect to rTorrent
define( 'RT_HOST',                        'localhost');
define( 'RT_PORT',                          5000);
define( 'RT_DIR',                                'RPC2/');
define( 'RT_AUTH',                              true);
define( 'RT_USER',                              'kierzniak');
define( 'RT_PASSWD',                              'kierzniak');
// where to use multicall or not
// if wTorrent makes your rtorrent crash, set this to true
define( 'NO_MULTICALL',                        true);

// Directory in which to save uploaded .torrent files (set folder permision 0777 or chmod to httpd server)
define( 'DIR_TORRENTS',        'torrents/');

// Full path to application directory (where index.php is)
define( 'DIR_EXEC',                '/var/www/');

// Permision to set for uploaded .torrent files (don't touch unless you know)
define( 'PERM_TORRENTS',        0777);

// Default location to save downloaded files (can be set for every uploaded .torrent on the ui)
define( 'DIR_DOWNLOAD',        '/home/kierzniak/doing');

// Don't touch any of the data below unless you know what you are doing
define( 'DIR_LANG',                'home/lang/' );
define( 'DIR_TPL',                'home/tpl/' );
define( 'DIR_TPL_COMPILE',        'tpl_c/' );
define( 'DIR_TPL_HTML',                'home/html/' );
define( 'DIR_BACKUP',                'backup/' );
define( 'DIR_UPLOAD',                'torrents/');

define( 'TITLE',                        'wTorrent' );
define( 'META_TITLE',                'rTorrent web interface' );
define( 'META_KEYWORDS',                'rtorrent xmlrpc interface php web html' );
define( 'META_DESCRIPTION',        'rtorrent web inrface using xmlrpc' );

define( 'DIR_CSS_DETALLS',                'home/css/detalls.css' );
define( 'DIR_CSS_ESTIL',                'home/css/estil.css' );
define( 'DIR_JS',                    'home/js/javasc.js' );
define( 'DIR_JSHADE',                    'home/js/shadedborder.js' );
define( 'DIR_JSPROTO',                    'home/js/prototype.js' );
define( 'DIR_SCRIPTACULOUS','home/js/scriptaculous/scriptaculous.js');
define( 'DIR_FAVICO',                'favicon.ico' );
//define( 'USER_RTORRENT',        'rtorrent');

define( 'DIR_IMG',                'home/img/' );
define( 'SRC_INDEX',                'index.php' );

define( 'SCRAMBLE',                false);
define( 'APP', 'wTorrent' );

// Librerias generales
require_once( 'lib/inc/includes.inc.php' );

// Autodeclaracion de clases
autoload( 'lib/cls/', 'cls/', 'home/cls/' );
// Definicion de rutas para UNIX
ini_set( 'include_path', DIR_EXEC );
?> htdigest kierzniak:XML-RPC:d9eabf0352c8ffe3d0c42e253b9168f3 lighttpd.conf: # Debian lighttpd configuration file
#

############ Options you really have to take care of ####################

## modules to load
# mod_access, mod_accesslog and mod_alias are loaded by default
# all other module should only be loaded if neccesary
# - saves some time
# - saves memory

server.modules              = (
            "mod_access",
            "mod_alias",
            "mod_accesslog",
                        "mod_scgi",
                        "mod_fastcgi",
#          "mod_rewrite",
#          "mod_redirect",
#          "mod_status",
#          "mod_evhost",
#          "mod_compress",
#          "mod_usertrack",
#          "mod_rrdtool",
#          "mod_webdav",
#          "mod_expire",
#          "mod_flv_streaming",
#          "mod_evasive"
 )

## a static document-root, for virtual-hosting take look at the
## server.virtual-* options
server.document-root      = "/var/www/"

## where to send error-messages to
server.errorlog            = "/var/log/lighttpd/error.log"

## files to check for if .../ is requested
index-file.names          = ( "index.php", "index.html",
                              "index.htm", "default.htm" )

## Use the "Content-Type" extended attribute to obtain mime type if possible
# mimetype.use-xattr = "enable"

#### accesslog module
accesslog.filename        = "/var/log/lighttpd/access.log"

## deny access the file-extensions
#
# ~    is for backupfiles from vi, emacs, joe, ...
# .inc is often used for code includes which should in general not be part
#      of the document-root
url.access-deny            = ( "~", ".inc" )

######### Options that are good to be but not neccesary to be changed #######

## bind to port (default: 80)
# server.port              = 81

## bind to localhost only (default: all interfaces)
## server.bind                = "localhost"

## error-handler for status 404
#server.error-handler-404  = "/error-handler.html"
#server.error-handler-404  = "/error-handler.php"

## to help the rc.scripts
server.pid-file            = "/var/run/lighttpd.pid"

##
## Format: <errorfile-prefix><status>.html
## -> ..../status-404.html for 'File not found'
#server.errorfile-prefix    = "/var/www/"

## virtual directory listings
dir-listing.encoding        = "utf-8"
server.dir-listing          = "enable"

## send unhandled HTTP-header headers to error-log
#debug.dump-unknown-headers  = "enable"

### only root can use these options
#
# chroot() to directory (default: no chroot() )
#server.chroot            = "/"

## change uid to <uid> (default: don't care)
server.username            = "www-data"

## change uid to <uid> (default: don't care)
server.groupname          = "www-data"

#### compress module
#compress.cache-dir          = "/var/tmp/lighttpd/cache/compress/"
#compress.filetype          = ("text/plain", "text/html")

#### status module
# status.status-url = "/server-status"
# status.config-url = "/server-config"

#### url handling modules (rewrite, redirect, access)
# url.rewrite                = ( "^/$"            => "/server-status" )
# url.redirect                = ( "^/wishlist/(.+)" => "http://www.123.org/$1" )

#
# define a pattern for the host url finding
# %% => % sign
# %0 => domain name + tld
# %1 => tld
# %2 => domain name without tld
# %3 => subdomain 1 name
# %4 => subdomain 2 name
#
# evhost.path-pattern = "/home/storage/dev/www/%3/htdocs/"

#### expire module
# expire.url                  = ( "/buggy/" => "access 2 hours", "/asdhas/" => "access plus 1 seconds 2 minutes")

#### rrdtool
# rrdtool.binary = "/usr/bin/rrdtool"
# rrdtool.db-name = "/var/www/lighttpd.rrd"

#### handle Debian Policy Manual, Section 11.5. urls
#### and by default allow them only from localhost

$HTTP["remoteip"] =~ "127.0.0.1" {
        alias.url += (
                "/doc/" => "/usr/share/doc/",
                "/images/" => "/usr/share/images/"
        )
        $HTTP["url"] =~ "^/doc/|^/images/" {
                dir-listing.activate = "enable"
        }
}

#### variable usage:
## variable name without "." is auto prefixed by "var." and becomes "var.bar"
#bar = 1
#var.mystring = "foo"

## integer add
#bar += 1
## string concat, with integer cast as string, result: "www.foo1.com"
#server.name = "www." + mystring + var.bar + ".com"
## array merge
#index-file.names = (foo + ".php") + index-file.names
#index-file.names += (foo + ".php")

#### external configuration files
## mimetype mapping
include_shell "/usr/share/lighttpd/create-mime.assign.pl"

## load enabled configuration files,
## read /etc/lighttpd/conf-available/README first
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"

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"
  )
  )
 )

 fastcgi.server = ( ".php" => ((
                    "bin-path" => "/usr/bin/php-cgi",
                    "socket" => "/tmp/php.socket"
                )))
                               
auth.backend = "htdigest"
auth.backend.htdigest.userfile = "/etc/lighttpd/htdigest"
auth.require = ( "/RPC2" =>
 (
  "method" => "basic",
  "realm" => "XML-RPC",
  "require" => "valid-user"
 ),
 "/torrents" =>
 (
  "method" => "basic",
  "realm" => "XML-RPC",
  "require" => "valid-user"
 ),
 "/db" =>
 (
  "method" => "basic",
  "realm" => "XML-RPC",
  "require" => "valid-user"
 )
)[/scroll] rtorrent init.d script
[scroll]#!/bin/bash

### BEGIN INIT INFO
# Provides:      rtorrent
# Required-Start:  $network
# Required-Stop:  $network
# Default-Start:  2 3 4 5
# Default-Stop:    0 1 6
# Short-Description: Start rtorrent as a daemon
### END INIT INFO

#!/bin/sh
#############
###<Notes>###
#############
# This script depends on screen.
# For the stop function to work, you must set an
# explicit session directory using ABSOLUTE paths (no, ~ is not absolute) in your rtorrent.rc.
# If you typically just start rtorrent with just "rtorrent" on the
# command line, all you need to change is the "user" option.
# Attach to the screen session as your user with
# "screen -dr rtorrent". Change "rtorrent" with srnname option.
# Licensed under the GPLv2 by lostnihilist: lostnihilist _at_ gmail _dot_ com
##############
###</Notes>###
##############

#######################
##Start Configuration##
#######################
# You can specify your configuration in a different file
# (so that it is saved with upgrades, saved in your home directory,
# or whateve reason you want to)
# by commenting out/deleting the configuration lines and placing them
# in a text file (say /home/user/.rtorrent.init.conf) exactly as you would
# have written them here (you can leave the comments if you desire
# and then uncommenting the following line correcting the path/filename
# for the one you used. note the space after the ".".
# . /etc/rtorrent.init.conf

#Do not put a space on either side of the equal signs e.g.
# user = user
# will not work
# system user to run as
user="kierzniak"

# the system group to run as, not implemented, see d_start for beginning implementation
# group=`id -ng "$user"`

# the full path to the filename where you store your rtorrent configuration
config="/home/kierzniak/.rtorrent.rc"

# set of options to run with
options=""

# default directory for screen, needs to be an absolute path
#base="/home/${user}"
base="/home/kierzniak"

# name of screen session
srnname="rtorrent"

# file to log to (makes for easier debugging if something goes wrong)
logfile="/var/log/rtorrentInit.log"
#######################
###END CONFIGURATION###
#######################
PATH=/usr/bin:/usr/local/bin:/usr/local/sbin:/sbin:/bin:/usr/sbin
DESC="rtorrent"
NAME=rtorrent
DAEMON=$NAME
SCRIPTNAME=/etc/init.d/$NAME

checkcnfg() {
        exists=0
        for i in `echo "$PATH" | tr ':' '\n'` ; do
                if [ -f $i/$NAME ] ; then
                        exists=1
                        break
                fi
        done
        if [ $exists -eq 0 ] ; then
                echo "cannot find rtorrent binary in PATH $PATH" | tee -a "$logfile" >&2
                exit 3
        fi
        if ! [ -r "${config}" ] ; then
                echo "cannot find readable config ${config}. check that it is there and permissions are appropriate" | tee -a "$logfile" >&2
                exit 3
        fi
        session=`getsession "$config"`
        if ! [ -d "${session}" ] ; then
                echo "cannot find readable session directory ${session} from config ${config}. check permissions" | tee -a "$logfile" >&2
                exit 3
        fi
}

d_start() {
  [ -d "${base}" ] && cd "${base}"
  stty stop undef && stty start undef
  su -c "screen -ls | grep -sq "\.${srnname}[[:space:]]" " ${user} || su -c "screen -dm -S ${srnname} 2>&1 1>/dev/null" ${user} | tee -a "$logfile" >&2
  # this works for the screen command, but starting rtorrent below adopts screen session gid
  # even if it is not the screen session we started (e.g. running under an undesirable gid
  #su -c "screen -ls | grep -sq "\.${srnname}[[:space:]]" " ${user} || su -c "sg \"$group\" -c \"screen -fn -dm -S ${srnname} 2>&1 1>/dev/null\"" ${user} | tee -a "$logfile" >&2
  su -c "screen -S "${srnname}" -X screen rtorrent ${options} 2>&1 1>/dev/null" ${user} | tee -a "$logfile" >&2
}

d_stop() {
        session=`getsession "$config"`
        if ! [ -s ${session}/rtorrent.lock ] ; then
                return
        fi
        pid=`cat ${session}/rtorrent.lock | awk -F: '{print($2)}' | sed "s/[^0-9]//g"`
        if ps -A | grep -sq ${pid}.*rtorrent ; then # make sure the pid doesn't belong to another process
                kill -s INT ${pid}
        fi
}

getsession() {
        session=`awk '/^[[:space:]]*session[[:space:]]*=[[:space:]]*/{print($3)}' "$config"`
        echo $session
}

checkcnfg

case "$1" in
  start)
        echo -n "Starting $DESC: $NAME"
        d_start
        echo "."
        ;;
  stop)
        echo -n "Stopping $DESC: $NAME"
        d_stop
        echo "."
        ;;
  restart|force-reload)
        echo -n "Restarting $DESC: $NAME"
        d_stop
        sleep 1
        d_start
        echo "."
        ;;
  *)
        echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
        exit 1
        ;;
esac

exit 0 I jescze jak wyglada strona instalacji wtorrenta w lynx moze tu cos zle wpisuje? INSTALL

wTorrent Settings

  Language:
  [en___]
  Database file: db/database.db______
  rTorrent scgi host: localhost___________
  rTorrent scgi port: 80__________________
  rTorrent scgi folder: /RPC2_______________
  Enable auth for the scgi folder:
  [False]
  rTorrent scgi user: ____________________
  rTorrent scgi password: ____________________
  Don't use multicall:
  [True_]
  User scriptaculous effects:
  [True_]
  Folder to save uploaded torrents: torrents/___________
  Folder where wTorrent is: /var/www/___________
  Default folder to save torrent data: /data_______________

Set wTorrent login

  User: ____________________
  Password: ____________________
  Try configuration Save configuration Oczywiscie uruchamiam /etc/init.d rtorrent. Wszedzie pozamienialem rt na nazwe mojego uzytkownika moze gdzies cos nie potrzebnie? No i problem kiedy wciskam try configuration wyskakuje mi: Error: cannot connect to rtorrent, please check host, folder and port values (and user/password if you have auth set up). Bawilem sie tymi portami troche ale kazdy jest do czego innego i wkoncu nie wiem jak to ustawic.

[ Dodano: 2008-10-24, 16:40 ]
Jezeli nikt nic nie wie to moze macie jakies inne propozycje GUI do rtorrenta? A moze jaki inny klient? Docelowo ma on byc na dysku sieciowym dns-313 wiec jakis lekki.



ruun - 24-10-2008 18:30
Ja obecnie korzystam z torrentfluxa (nakładka na bittorrnado) i jestem z niego zadowolony. Polecam.



zet120 - 30-01-2009 13:28
Witam.
Temat stary, ale problem wciąż aktualny.
Czy zatem udało się komuś pomyślnie zainstalować wTorrenta?
Osobiscie próbuję od kilku dni, ale utknąłem na ostatnim etapie czyli na zapamietaniu ustawień w install.php.

[ Dodano: 2009-01-31, 10:33 ]
Dokładnie otrzymuję taki błąd:

Fatal error: Uncaught exception 'PDOException' with message 'could not find driver' in /var/www/lib/cls/PDOe.cls.php:52 Stack trace: #0 /var/www/lib/cls/PDOe.cls.php(52): PDO->construct('sqlite:db/datab...', NULL, NULL) #1 /var/www/cls/install.cls.php(187): PDOe->construct('sqlite:db/datab...', NULL, NULL, Array) #2 /var/www/cls/install.cls.php(75): install->saveConfig(Array) #3 /var/www/lib/cls/Web.cls.php(106): install->construct() #4 /var/www/install.php(32): Web::getClass('install') #5 {main} thrown in /var/www/lib/cls/PDOe.cls.php on line 52

Szukam rozwiązania, ale jakoś brak takowego na horyzoncie, a może....
Liczę, że ktoś to jednak zainstalował

EDIT:

Trzy wirtualne systemy, kilka tutoriali, kilkadziesiąt godzin w google, ale warto było. :-)
EFEKT:

http://pic.ipicture.ru/uploads/09020...4VH8oAyf5W.png

Jak to zwykle bywa rozwiązanie problemu okazało się banalne, a sprowadzało się do:
apt-get install php5-sqlite
  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • minister.pev.pl

  •  

     


     

     
    Copyright 2003. MĂłj serwis