web-interface к rtorrent

SLAX, Deep Style, ZenWalk

Модератор: Модераторы разделов

Аватара пользователя
Archangel
Сообщения: 431
ОС: Slackware64-14.1

web-interface к rtorrent

Сообщение Archangel »

Стоит один сервачек, качает себе торренты, работает на нем rtorrent через screen. Только неудобно в таком варианте запускать новые закачки, одинаковые клавиши горячие пересекаются. Решил поставить web-interface к нему, дабы упростить, читаю что надо пересобрать libtorrent с поддержкой xmlrpc. Дописал в слакбилд: --with-xmlrpc-c, а он при сборке ругается:

Код: Выделить всё

libtorrent.SlackBuild.build: line 62: --with-xmlrpc-c: команда не найдена
Спасибо сказали:
Аватара пользователя
Rootlexx
Бывший модератор
Сообщения: 4471
Статус: GNU generation
ОС: Debian GNU/Linux

Re: web-interface к rtorrent

Сообщение Rootlexx »

Ну покажите хоть сам файл.
Спасибо сказали:
Аватара пользователя
Archangel
Сообщения: 431
ОС: Slackware64-14.1

Re: web-interface к rtorrent

Сообщение Archangel »

Код: Выделить всё

#!/bin/sh

# Slackware build script for libtorrent
# Written by Tom Fitzhenry <tom@fitzhenry.name> 2007/08/22

# Updated by Andrew Brouwers, abrouwers@gmail.com
# Updated to 0.12.6 by Brian Kysela <brian.kysela@gmail.com> 2010-02-17

PRGNAM=libtorrent
VERSION=0.12.6
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}

# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
  case "$( uname -m )" in
    i?86) ARCH=i486;;
    arm*) ARCH=arm;;
    # Unless $ARCH is already set, use uname -m for all other archs:
       *) ARCH=$( uname -m );;
  esac
fi

CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}

if [ "$ARCH" = "i486" ]; then
  SLKCFLAGS="-O2 -march=i486 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
  SLKCFLAGS="-O2 -march=i686 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
  SLKCFLAGS="-O2 -fPIC"
  LIBDIRSUFFIX="64"
else
  SLKCFLAGS="-O2"
  LIBDIRSUFFIX=""
fi

set -e

rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
rm -rf $TMP/$PRGNAM-$VERSION
cd $TMP
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .

CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
  --prefix=/usr \
  --libdir=/usr/lib${LIBDIRSUFFIX} \
  --sysconfdir=/etc \
  --localstatedir=/var \
  --build=$ARCH-slackware-linux
  --with-xmlrpc-c
make
make install DESTDIR=$PKG

mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
  AUTHORS COPYING INSTALL NEWS README \
    $PKG/usr/doc/$PRGNAM-$VERSION
find $PKG/usr/doc/$PRGNAM-$VERSION -type f -exec chmod 644 {} \;
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM-SlackBuild

find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
  | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true

mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc

cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
Спасибо сказали:
Аватара пользователя
Rootlexx
Бывший модератор
Сообщения: 4471
Статус: GNU generation
ОС: Debian GNU/Linux

Re: web-interface к rtorrent

Сообщение Rootlexx »

Обратите внимание, как оформлены предыдущие строки.
Как известно, интерпретация идёт построчно, поэтому чтобы каждый указанный параметр не рассматривался как отдельная команда, символ перевода строки экранируется обратной чертой.
Вы же добавили строку, но символ переноса не экранировали, поэтому ваш добавленный параметр интерпретируется отдельной строкой.
Должно быть так:

Код: Выделить всё

...
  --localstatedir=/var \
  --build=$ARCH-slackware-linux \
  --with-xmlrpc-c
...
Спасибо сказали:
Аватара пользователя
Archangel
Сообщения: 431
ОС: Slackware64-14.1

Re: web-interface к rtorrent

Сообщение Archangel »

Спасибо за просветление.
Спасибо сказали:
Аватара пользователя
Archangel
Сообщения: 431
ОС: Slackware64-14.1

Re: web-interface к rtorrent

Сообщение Archangel »

Что-то я опять стопорнулся, делал все по мануалу как здесь. Вроде все почти получилось, только при запуске httpd ругается на строки которые я внес, как указано в мануале. Вот сам httpd.conf:

Код: Выделить всё

#
# This is the main Apache HTTP server configuration file.  It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.2> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do.  They're here only as hints or reminders.  If you are unsure
# consult the online docs. You have been warned.
#
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path.  If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so "/var/log/httpd/foo_log"
# with ServerRoot set to "/usr" will be interpreted by the
# server as "/usr//var/log/httpd/foo_log".

#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# Do not add a slash at the end of the directory path.  If you point
# ServerRoot at a non-local disk, be sure to point the LockFile directive
# at a local disk.  If you wish to share the same ServerRoot for multiple
# httpd daemons, you will need to change at least LockFile and PidFile.
#
ServerRoot "/usr"

#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
Listen 80

#
# Dynamic Shared Object (DSO) Support
#
# To be able to use the functionality of a module which was built as a DSO you
# have to place corresponding `LoadModule' lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Statically compiled modules (those listed by `httpd -l') do not need
# to be loaded here.
#
# Example:
# LoadModule foo_module modules/mod_foo.so
#

# for rtorrent web-interface
LoadModule scgi_module lib/httpd/modules/mod_scgi.so
SCGIMount /RPC2 127.0.0.1:5000

LoadModule authn_file_module lib/httpd/modules/mod_authn_file.so
LoadModule authn_dbm_module lib/httpd/modules/mod_authn_dbm.so
LoadModule authn_anon_module lib/httpd/modules/mod_authn_anon.so
LoadModule authn_dbd_module lib/httpd/modules/mod_authn_dbd.so
LoadModule authn_default_module lib/httpd/modules/mod_authn_default.so
LoadModule authn_alias_module lib/httpd/modules/mod_authn_alias.so
LoadModule authz_host_module lib/httpd/modules/mod_authz_host.so
LoadModule authz_groupfile_module lib/httpd/modules/mod_authz_groupfile.so
LoadModule authz_user_module lib/httpd/modules/mod_authz_user.so
LoadModule authz_dbm_module lib/httpd/modules/mod_authz_dbm.so
LoadModule authz_owner_module lib/httpd/modules/mod_authz_owner.so
LoadModule authnz_ldap_module lib/httpd/modules/mod_authnz_ldap.so
LoadModule authz_default_module lib/httpd/modules/mod_authz_default.so
LoadModule auth_basic_module lib/httpd/modules/mod_auth_basic.so
LoadModule auth_digest_module lib/httpd/modules/mod_auth_digest.so
LoadModule file_cache_module lib/httpd/modules/mod_file_cache.so
LoadModule cache_module lib/httpd/modules/mod_cache.so
LoadModule disk_cache_module lib/httpd/modules/mod_disk_cache.so
LoadModule mem_cache_module lib/httpd/modules/mod_mem_cache.so
LoadModule dbd_module lib/httpd/modules/mod_dbd.so
LoadModule dumpio_module lib/httpd/modules/mod_dumpio.so
LoadModule reqtimeout_module lib/httpd/modules/mod_reqtimeout.so
LoadModule ext_filter_module lib/httpd/modules/mod_ext_filter.so
LoadModule include_module lib/httpd/modules/mod_include.so
LoadModule filter_module lib/httpd/modules/mod_filter.so
LoadModule substitute_module lib/httpd/modules/mod_substitute.so
LoadModule deflate_module lib/httpd/modules/mod_deflate.so
LoadModule ldap_module lib/httpd/modules/mod_ldap.so
LoadModule log_config_module lib/httpd/modules/mod_log_config.so
LoadModule log_forensic_module lib/httpd/modules/mod_log_forensic.so
LoadModule logio_module lib/httpd/modules/mod_logio.so
LoadModule env_module lib/httpd/modules/mod_env.so
LoadModule mime_magic_module lib/httpd/modules/mod_mime_magic.so
LoadModule cern_meta_module lib/httpd/modules/mod_cern_meta.so
LoadModule expires_module lib/httpd/modules/mod_expires.so
LoadModule headers_module lib/httpd/modules/mod_headers.so
LoadModule ident_module lib/httpd/modules/mod_ident.so
LoadModule usertrack_module lib/httpd/modules/mod_usertrack.so
LoadModule unique_id_module lib/httpd/modules/mod_unique_id.so
LoadModule setenvif_module lib/httpd/modules/mod_setenvif.so
LoadModule version_module lib/httpd/modules/mod_version.so
LoadModule proxy_module lib/httpd/modules/mod_proxy.so
LoadModule proxy_connect_module lib/httpd/modules/mod_proxy_connect.so
LoadModule proxy_ftp_module lib/httpd/modules/mod_proxy_ftp.so
LoadModule proxy_http_module lib/httpd/modules/mod_proxy_http.so
LoadModule proxy_scgi_module lib/httpd/modules/mod_proxy_scgi.so
LoadModule proxy_ajp_module lib/httpd/modules/mod_proxy_ajp.so
LoadModule proxy_balancer_module lib/httpd/modules/mod_proxy_balancer.so
#LoadModule ssl_module lib/httpd/modules/mod_ssl.so
LoadModule mime_module lib/httpd/modules/mod_mime.so
LoadModule dav_module lib/httpd/modules/mod_dav.so
LoadModule status_module lib/httpd/modules/mod_status.so
LoadModule autoindex_module lib/httpd/modules/mod_autoindex.so
LoadModule asis_module lib/httpd/modules/mod_asis.so
LoadModule info_module lib/httpd/modules/mod_info.so
LoadModule cgi_module lib/httpd/modules/mod_cgi.so
LoadModule dav_fs_module lib/httpd/modules/mod_dav_fs.so
LoadModule vhost_alias_module lib/httpd/modules/mod_vhost_alias.so
LoadModule negotiation_module lib/httpd/modules/mod_negotiation.so
LoadModule dir_module lib/httpd/modules/mod_dir.so
LoadModule imagemap_module lib/httpd/modules/mod_imagemap.so
LoadModule actions_module lib/httpd/modules/mod_actions.so
LoadModule userdir_module lib/httpd/modules/mod_userdir.so
LoadModule alias_module lib/httpd/modules/mod_alias.so
LoadModule rewrite_module lib/httpd/modules/mod_rewrite.so

<IfModule !mpm_netware_module>
<IfModule !mpm_winnt_module>
#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
#
User apache
Group apache

</IfModule>
</IfModule>

# 'Main' server configuration
#
# The directives in this section set up the values used by the 'main'
# server, which responds to any requests that aren't handled by a
# <VirtualHost> definition.  These values also provide defaults for
# any <VirtualHost> containers you may define later in the file.
#
# All of these directives may appear inside <VirtualHost> containers,
# in which case these default settings will be overridden for the
# virtual host being defined.
#

#
# ServerAdmin: Your address, where problems with the server should be
# e-mailed.  This address appears on some server-generated pages, such
# as error documents.  e.g. admin@your-domain.com
#
ServerAdmin you@example.com

#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
#
#ServerName www.example.com:80

#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/srv/httpd/htdocs"

#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# features.
#
<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
</Directory>

#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/srv/httpd/htdocs">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.2/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
    #
    AllowOverride None

    #
    # Controls who can get stuff from this server.
    #
    Order allow,deny
    Allow from all

</Directory>

#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
    DirectoryIndex index.html
</IfModule>

#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<FilesMatch "^\.ht">
    Order allow,deny
    Deny from all
    Satisfy All
</FilesMatch>

#
# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here.  If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
ErrorLog "/var/log/httpd/error_log"

#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
LogLevel warn

<IfModule log_config_module>
    #
    # The following directives define some format nicknames for use with
    # a CustomLog directive (see below).
    #
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %>s %b" common

    <IfModule logio_module>
      # You need to enable mod_logio.c to use %I and %O
      LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
    </IfModule>

    #
    # The location and format of the access logfile (Common Logfile Format).
    # If you do not define any access logfiles within a <VirtualHost>
    # container, they will be logged here.  Contrariwise, if you *do*
    # define per-<VirtualHost> access logfiles, transactions will be
    # logged therein and *not* in this file.
    #
    CustomLog "/var/log/httpd/access_log" common

    #
    # If you prefer a logfile with access, agent, and referer information
    # (Combined Logfile Format) you can use the following directive.
    #
    #CustomLog "/var/log/httpd/access_log" combined
</IfModule>

<IfModule alias_module>
    #
    # Redirect: Allows you to tell clients about documents that used to
    # exist in your server's namespace, but do not anymore. The client
    # will make a new request for the document at its new location.
    # Example:
    # Redirect permanent /foo http://www.example.com/bar

    #
    # Alias: Maps web paths into filesystem paths and is used to
    # access content that does not live under the DocumentRoot.
    # Example:
    # Alias /webpath /full/filesystem/path
    #
    # If you include a trailing / on /webpath then the server will
    # require it to be present in the URL.  You will also likely
    # need to provide a <Directory> section to allow access to
    # the filesystem path.

    #
    # ScriptAlias: This controls which directories contain server scripts.
    # ScriptAliases are essentially the same as Aliases, except that
    # documents in the target directory are treated as applications and
    # run by the server when requested rather than as documents sent to the
    # client.  The same rules about trailing "/" apply to ScriptAlias
    # directives as to Alias.
    #
    ScriptAlias /cgi-bin/ "/srv/httpd/cgi-bin/"

</IfModule>

<IfModule cgid_module>
    #
    # ScriptSock: On threaded servers, designate the path to the UNIX
    # socket used to communicate with the CGI daemon of mod_cgid.
    #
    #Scriptsock /var/run/httpd/cgisock
</IfModule>

#
# "/srv/httpd/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "/srv/httpd/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>

#
# DefaultType: the default MIME type the server will use for a document
# if it cannot otherwise determine one, such as from filename extensions.
# If your server contains mostly text or HTML documents, "text/plain" is
# a good value.  If most of your content is binary, such as applications
# or images, you may want to use "application/octet-stream" instead to
# keep browsers from trying to display binary files as though they are
# text.
#
DefaultType text/plain

<IfModule mime_module>
    #
    # TypesConfig points to the file containing the list of mappings from
    # filename extension to MIME-type.
    #
    TypesConfig /etc/httpd/mime.types

    #
    # AddType allows you to add to or override the MIME configuration
    # file specified in TypesConfig for specific file types.
    #
    #AddType application/x-gzip .tgz
    #
    # AddEncoding allows you to have certain browsers uncompress
    # information on the fly. Note: Not all browsers support this.
    #
    #AddEncoding x-compress .Z
    #AddEncoding x-gzip .gz .tgz
    #
    # If the AddEncoding directives above are commented-out, then you
    # probably should define those extensions to indicate media types:
    #
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz

    #
    # AddHandler allows you to map certain file extensions to "handlers":
    # actions unrelated to filetype. These can be either built into the server
    # or added with the Action directive (see below)
    #
    # To use CGI scripts outside of ScriptAliased directories:
    # (You will also need to add "ExecCGI" to the "Options" directive.)
    #
    #AddHandler cgi-script .cgi

    # For type maps (negotiated resources):
    #AddHandler type-map var

    #
    # Filters allow you to process content before it is sent to the client.
    #
    # To parse .shtml files for server-side includes (SSI):
    # (You will also need to add "Includes" to the "Options" directive.)
    #
    #AddType text/html .shtml
    #AddOutputFilter INCLUDES .shtml
</IfModule>

#
# The mod_mime_magic module allows the server to use various hints from the
# contents of the file itself to determine its type.  The MIMEMagicFile
# directive tells the module where the hint definitions are located.
#
#MIMEMagicFile /etc/httpd/magic

#
# Customizable error responses come in three flavors:
# 1) plain text 2) local redirects 3) external redirects
#
# Some examples:
#ErrorDocument 500 "The server made a boo boo."
#ErrorDocument 404 /missing.html
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
#ErrorDocument 402 http://www.example.com/subscription_info.html
#

#
# EnableMMAP and EnableSendfile: On systems that support it,
# memory-mapping or the sendfile syscall is used to deliver
# files.  This usually improves server performance, but must
# be turned off when serving from networked-mounted
# filesystems or if support for these functions is otherwise
# broken on your system.
#
#EnableMMAP off
#EnableSendfile off

# Supplemental configuration
#
# The configuration files in the /etc/httpd/extra/ directory can be
# included to add extra features or to modify the default configuration of
# the server, or you may simply copy their contents here and change as
# necessary.

# Server-pool management (MPM specific)
#Include /etc/httpd/extra/httpd-mpm.conf

# Multi-language error messages
#Include /etc/httpd/extra/httpd-multilang-errordoc.conf

# Fancy directory listings
#Include /etc/httpd/extra/httpd-autoindex.conf

# Language settings
#Include /etc/httpd/extra/httpd-languages.conf

# User home directories
#Include /etc/httpd/extra/httpd-userdir.conf

# Real-time info on requests and configuration
#Include /etc/httpd/extra/httpd-info.conf

# Virtual hosts
#Include /etc/httpd/extra/httpd-vhosts.conf

# Local access to the Apache HTTP Server Manual
#Include /etc/httpd/extra/httpd-manual.conf

# Distributed authoring and versioning (WebDAV)
#Include /etc/httpd/extra/httpd-dav.conf

# Various default settings
#Include /etc/httpd/extra/httpd-default.conf

# Secure (SSL/TLS) connections
#Include /etc/httpd/extra/httpd-ssl.conf
#
# Note: The following must must be present to support
#       starting without SSL on platforms with no /dev/random equivalent
#       but a statically compiled-in mod_ssl.
#
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>

# Uncomment the following line to enable PHP:
#
#Include /etc/httpd/mod_php.conf

# Uncomment the following lines to enable svn support:
#
#LoadModule dav_svn_module lib/httpd/modules/mod_dav_svn.so
#LoadModule authz_svn_module lib/httpd/modules/mod_authz_svn.so

Ругается следующим образом:

Код: Выделить всё

httpd: Syntax error on line 56 of /etc/httpd/httpd.conf: Cannot load /usr/lib/lighttpd/mod_scgi.so into server: /usr/lib/lighttpd/mod_scgi.so: undefined symbol: chunkqueue_free
Спасибо сказали:
Аватара пользователя
RocksLinux
Сообщения: 223
ОС: Slackware

Re: web-interface к rtorrent

Сообщение RocksLinux »

Доброго времени!
Вы выполняли всё точно по инструкции?
Убедились, что файл физически существует?
ls -l /usr/lib/httpd/modules/mod_scgi.so
Почему в выводе указан lighttpd?
P.s. не люблю инструкции такого рода, webui у них не понятно где расположен.
http://code.google.com/p/rutorrent/ wiki на официальном сайте rutorrent (ака webui)
http://www.lissyara.su/rtorrent+utorrent_webui/ хорошая инструкция (и ресурс :)
P.p.s. можно обойтись и без scgi
«Знать, что мы знаем то, что мы знаем, и что мы не знаем того, чего мы не знаем — это и есть истинное знание». //Конфуций\\
120 минут классики рока
Спасибо сказали:
Аватара пользователя
Archangel
Сообщения: 431
ОС: Slackware64-14.1

Re: web-interface к rtorrent

Сообщение Archangel »

Прошу прощенья немного неправильно показал, ошибка в httpd.conf. Ну сначала делал точно по инструкции, но httpd ругнулся, что по адресу /usr/lib/httpd/modules/mod_scgi.so указанной библиотеки нет, глянул и вправду нет. Посмотрел, она лежит как раз в /usr/lib/lighttpd/mod_scgi.so. Вот правильный httpd.conf, переписал в нем адрес на библиотеку:

Код: Выделить всё

#
# This is the main Apache HTTP server configuration file.  It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.2> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do.  They're here only as hints or reminders.  If you are unsure
# consult the online docs. You have been warned.
#
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path.  If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so "/var/log/httpd/foo_log"
# with ServerRoot set to "/usr" will be interpreted by the
# server as "/usr//var/log/httpd/foo_log".

#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# Do not add a slash at the end of the directory path.  If you point
# ServerRoot at a non-local disk, be sure to point the LockFile directive
# at a local disk.  If you wish to share the same ServerRoot for multiple
# httpd daemons, you will need to change at least LockFile and PidFile.
#
ServerRoot "/usr"

#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
Listen 80

#
# Dynamic Shared Object (DSO) Support
#
# To be able to use the functionality of a module which was built as a DSO you
# have to place corresponding `LoadModule' lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Statically compiled modules (those listed by `httpd -l') do not need
# to be loaded here.
#
# Example:
# LoadModule foo_module modules/mod_foo.so
#

# for rtorrent web-interface
LoadModule scgi_module lib/lighttpd/mod_scgi.so
SCGIMount /RPC2 127.0.0.1:5000

LoadModule authn_file_module lib/httpd/modules/mod_authn_file.so
LoadModule authn_dbm_module lib/httpd/modules/mod_authn_dbm.so
LoadModule authn_anon_module lib/httpd/modules/mod_authn_anon.so
LoadModule authn_dbd_module lib/httpd/modules/mod_authn_dbd.so
LoadModule authn_default_module lib/httpd/modules/mod_authn_default.so
LoadModule authn_alias_module lib/httpd/modules/mod_authn_alias.so
LoadModule authz_host_module lib/httpd/modules/mod_authz_host.so
LoadModule authz_groupfile_module lib/httpd/modules/mod_authz_groupfile.so
LoadModule authz_user_module lib/httpd/modules/mod_authz_user.so
LoadModule authz_dbm_module lib/httpd/modules/mod_authz_dbm.so
LoadModule authz_owner_module lib/httpd/modules/mod_authz_owner.so
LoadModule authnz_ldap_module lib/httpd/modules/mod_authnz_ldap.so
LoadModule authz_default_module lib/httpd/modules/mod_authz_default.so
LoadModule auth_basic_module lib/httpd/modules/mod_auth_basic.so
LoadModule auth_digest_module lib/httpd/modules/mod_auth_digest.so
LoadModule file_cache_module lib/httpd/modules/mod_file_cache.so
LoadModule cache_module lib/httpd/modules/mod_cache.so
LoadModule disk_cache_module lib/httpd/modules/mod_disk_cache.so
LoadModule mem_cache_module lib/httpd/modules/mod_mem_cache.so
LoadModule dbd_module lib/httpd/modules/mod_dbd.so
LoadModule dumpio_module lib/httpd/modules/mod_dumpio.so
LoadModule reqtimeout_module lib/httpd/modules/mod_reqtimeout.so
LoadModule ext_filter_module lib/httpd/modules/mod_ext_filter.so
LoadModule include_module lib/httpd/modules/mod_include.so
LoadModule filter_module lib/httpd/modules/mod_filter.so
LoadModule substitute_module lib/httpd/modules/mod_substitute.so
LoadModule deflate_module lib/httpd/modules/mod_deflate.so
LoadModule ldap_module lib/httpd/modules/mod_ldap.so
LoadModule log_config_module lib/httpd/modules/mod_log_config.so
LoadModule log_forensic_module lib/httpd/modules/mod_log_forensic.so
LoadModule logio_module lib/httpd/modules/mod_logio.so
LoadModule env_module lib/httpd/modules/mod_env.so
LoadModule mime_magic_module lib/httpd/modules/mod_mime_magic.so
LoadModule cern_meta_module lib/httpd/modules/mod_cern_meta.so
LoadModule expires_module lib/httpd/modules/mod_expires.so
LoadModule headers_module lib/httpd/modules/mod_headers.so
LoadModule ident_module lib/httpd/modules/mod_ident.so
LoadModule usertrack_module lib/httpd/modules/mod_usertrack.so
LoadModule unique_id_module lib/httpd/modules/mod_unique_id.so
LoadModule setenvif_module lib/httpd/modules/mod_setenvif.so
LoadModule version_module lib/httpd/modules/mod_version.so
LoadModule proxy_module lib/httpd/modules/mod_proxy.so
LoadModule proxy_connect_module lib/httpd/modules/mod_proxy_connect.so
LoadModule proxy_ftp_module lib/httpd/modules/mod_proxy_ftp.so
LoadModule proxy_http_module lib/httpd/modules/mod_proxy_http.so
LoadModule proxy_scgi_module lib/httpd/modules/mod_proxy_scgi.so
LoadModule proxy_ajp_module lib/httpd/modules/mod_proxy_ajp.so
LoadModule proxy_balancer_module lib/httpd/modules/mod_proxy_balancer.so
#LoadModule ssl_module lib/httpd/modules/mod_ssl.so
LoadModule mime_module lib/httpd/modules/mod_mime.so
LoadModule dav_module lib/httpd/modules/mod_dav.so
LoadModule status_module lib/httpd/modules/mod_status.so
LoadModule autoindex_module lib/httpd/modules/mod_autoindex.so
LoadModule asis_module lib/httpd/modules/mod_asis.so
LoadModule info_module lib/httpd/modules/mod_info.so
LoadModule cgi_module lib/httpd/modules/mod_cgi.so
LoadModule dav_fs_module lib/httpd/modules/mod_dav_fs.so
LoadModule vhost_alias_module lib/httpd/modules/mod_vhost_alias.so
LoadModule negotiation_module lib/httpd/modules/mod_negotiation.so
LoadModule dir_module lib/httpd/modules/mod_dir.so
LoadModule imagemap_module lib/httpd/modules/mod_imagemap.so
LoadModule actions_module lib/httpd/modules/mod_actions.so
LoadModule userdir_module lib/httpd/modules/mod_userdir.so
LoadModule alias_module lib/httpd/modules/mod_alias.so
LoadModule rewrite_module lib/httpd/modules/mod_rewrite.so

<IfModule !mpm_netware_module>
<IfModule !mpm_winnt_module>
#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
#
User apache
Group apache

</IfModule>
</IfModule>

# 'Main' server configuration
#
# The directives in this section set up the values used by the 'main'
# server, which responds to any requests that aren't handled by a
# <VirtualHost> definition.  These values also provide defaults for
# any <VirtualHost> containers you may define later in the file.
#
# All of these directives may appear inside <VirtualHost> containers,
# in which case these default settings will be overridden for the
# virtual host being defined.
#

#
# ServerAdmin: Your address, where problems with the server should be
# e-mailed.  This address appears on some server-generated pages, such
# as error documents.  e.g. admin@your-domain.com
#
ServerAdmin you@example.com

#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
#
#ServerName www.example.com:80

#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/srv/httpd/htdocs"

#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# features.
#
<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
</Directory>

#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/srv/httpd/htdocs">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.2/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
    #
    AllowOverride None

    #
    # Controls who can get stuff from this server.
    #
    Order allow,deny
    Allow from all

</Directory>

#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
    DirectoryIndex index.html
</IfModule>

#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<FilesMatch "^\.ht">
    Order allow,deny
    Deny from all
    Satisfy All
</FilesMatch>

#
# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here.  If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
ErrorLog "/var/log/httpd/error_log"

#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
LogLevel warn

<IfModule log_config_module>
    #
    # The following directives define some format nicknames for use with
    # a CustomLog directive (see below).
    #
    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %>s %b" common

    <IfModule logio_module>
      # You need to enable mod_logio.c to use %I and %O
      LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
    </IfModule>

    #
    # The location and format of the access logfile (Common Logfile Format).
    # If you do not define any access logfiles within a <VirtualHost>
    # container, they will be logged here.  Contrariwise, if you *do*
    # define per-<VirtualHost> access logfiles, transactions will be
    # logged therein and *not* in this file.
    #
    CustomLog "/var/log/httpd/access_log" common

    #
    # If you prefer a logfile with access, agent, and referer information
    # (Combined Logfile Format) you can use the following directive.
    #
    #CustomLog "/var/log/httpd/access_log" combined
</IfModule>

<IfModule alias_module>
    #
    # Redirect: Allows you to tell clients about documents that used to
    # exist in your server's namespace, but do not anymore. The client
    # will make a new request for the document at its new location.
    # Example:
    # Redirect permanent /foo http://www.example.com/bar

    #
    # Alias: Maps web paths into filesystem paths and is used to
    # access content that does not live under the DocumentRoot.
    # Example:
    # Alias /webpath /full/filesystem/path
    #
    # If you include a trailing / on /webpath then the server will
    # require it to be present in the URL.  You will also likely
    # need to provide a <Directory> section to allow access to
    # the filesystem path.

    #
    # ScriptAlias: This controls which directories contain server scripts.
    # ScriptAliases are essentially the same as Aliases, except that
    # documents in the target directory are treated as applications and
    # run by the server when requested rather than as documents sent to the
    # client.  The same rules about trailing "/" apply to ScriptAlias
    # directives as to Alias.
    #
    ScriptAlias /cgi-bin/ "/srv/httpd/cgi-bin/"

</IfModule>

<IfModule cgid_module>
    #
    # ScriptSock: On threaded servers, designate the path to the UNIX
    # socket used to communicate with the CGI daemon of mod_cgid.
    #
    #Scriptsock /var/run/httpd/cgisock
</IfModule>

#
# "/srv/httpd/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "/srv/httpd/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>

#
# DefaultType: the default MIME type the server will use for a document
# if it cannot otherwise determine one, such as from filename extensions.
# If your server contains mostly text or HTML documents, "text/plain" is
# a good value.  If most of your content is binary, such as applications
# or images, you may want to use "application/octet-stream" instead to
# keep browsers from trying to display binary files as though they are
# text.
#
DefaultType text/plain

<IfModule mime_module>
    #
    # TypesConfig points to the file containing the list of mappings from
    # filename extension to MIME-type.
    #
    TypesConfig /etc/httpd/mime.types

    #
    # AddType allows you to add to or override the MIME configuration
    # file specified in TypesConfig for specific file types.
    #
    #AddType application/x-gzip .tgz
    #
    # AddEncoding allows you to have certain browsers uncompress
    # information on the fly. Note: Not all browsers support this.
    #
    #AddEncoding x-compress .Z
    #AddEncoding x-gzip .gz .tgz
    #
    # If the AddEncoding directives above are commented-out, then you
    # probably should define those extensions to indicate media types:
    #
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz

    #
    # AddHandler allows you to map certain file extensions to "handlers":
    # actions unrelated to filetype. These can be either built into the server
    # or added with the Action directive (see below)
    #
    # To use CGI scripts outside of ScriptAliased directories:
    # (You will also need to add "ExecCGI" to the "Options" directive.)
    #
    #AddHandler cgi-script .cgi

    # For type maps (negotiated resources):
    #AddHandler type-map var

    #
    # Filters allow you to process content before it is sent to the client.
    #
    # To parse .shtml files for server-side includes (SSI):
    # (You will also need to add "Includes" to the "Options" directive.)
    #
    #AddType text/html .shtml
    #AddOutputFilter INCLUDES .shtml
</IfModule>

#
# The mod_mime_magic module allows the server to use various hints from the
# contents of the file itself to determine its type.  The MIMEMagicFile
# directive tells the module where the hint definitions are located.
#
#MIMEMagicFile /etc/httpd/magic

#
# Customizable error responses come in three flavors:
# 1) plain text 2) local redirects 3) external redirects
#
# Some examples:
#ErrorDocument 500 "The server made a boo boo."
#ErrorDocument 404 /missing.html
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
#ErrorDocument 402 http://www.example.com/subscription_info.html
#

#
# EnableMMAP and EnableSendfile: On systems that support it,
# memory-mapping or the sendfile syscall is used to deliver
# files.  This usually improves server performance, but must
# be turned off when serving from networked-mounted
# filesystems or if support for these functions is otherwise
# broken on your system.
#
#EnableMMAP off
#EnableSendfile off

# Supplemental configuration
#
# The configuration files in the /etc/httpd/extra/ directory can be
# included to add extra features or to modify the default configuration of
# the server, or you may simply copy their contents here and change as
# necessary.

# Server-pool management (MPM specific)
#Include /etc/httpd/extra/httpd-mpm.conf

# Multi-language error messages
#Include /etc/httpd/extra/httpd-multilang-errordoc.conf

# Fancy directory listings
#Include /etc/httpd/extra/httpd-autoindex.conf

# Language settings
#Include /etc/httpd/extra/httpd-languages.conf

# User home directories
#Include /etc/httpd/extra/httpd-userdir.conf

# Real-time info on requests and configuration
#Include /etc/httpd/extra/httpd-info.conf

# Virtual hosts
#Include /etc/httpd/extra/httpd-vhosts.conf

# Local access to the Apache HTTP Server Manual
#Include /etc/httpd/extra/httpd-manual.conf

# Distributed authoring and versioning (WebDAV)
#Include /etc/httpd/extra/httpd-dav.conf

# Various default settings
#Include /etc/httpd/extra/httpd-default.conf

# Secure (SSL/TLS) connections
#Include /etc/httpd/extra/httpd-ssl.conf
#
# Note: The following must must be present to support
#       starting without SSL on platforms with no /dev/random equivalent
#       but a statically compiled-in mod_ssl.
#
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>

# Uncomment the following line to enable PHP:
#
#Include /etc/httpd/mod_php.conf

# Uncomment the following lines to enable svn support:
#
#LoadModule dav_svn_module lib/httpd/modules/mod_dav_svn.so
#LoadModule authz_svn_module lib/httpd/modules/mod_authz_svn.so

А так и вправду, ругался, что файла нет.
PS Действительно не совсем по инструкции делал, я пакеты ставил, а не собирал. Поскольку посмотрел в репозитарии уже, вроде как, версии удовлетворяющие инструкцию находяться.
Спасибо сказали:
Аватара пользователя
RocksLinux
Сообщения: 223
ОС: Slackware

Re: web-interface к rtorrent

Сообщение RocksLinux »

Lighttpd всё-таки у Вас нет?
Соберите самостоятельно эту библиотеку, удалив старую.
wget http://python.ca/scgi/releases/scgi-1.14.tar.gz
tar xvf scgi-1.14.tar.gz
cd apache2
/usr/sbin/apxs -i -a -c mod_scgi.c
«Знать, что мы знаем то, что мы знаем, и что мы не знаем того, чего мы не знаем — это и есть истинное знание». //Конфуций\\
120 минут классики рока
Спасибо сказали:
Аватара пользователя
Archangel
Сообщения: 431
ОС: Slackware64-14.1

Re: web-interface к rtorrent

Сообщение Archangel »

Так сделал, теперь на:

Код: Выделить всё

 sudo /etc/rc.d/rc.httpd start

Выдает:

Код: Выделить всё

[Sat Oct 23 15:15:08 2010] [warn] module scgi_module is already loaded, skipping
httpd (pid 1642) already running

Дальше вроде как можно подключаться из браузера на адрес server:5000/rtorrent. Но страница не открывается, говорит ресурс недоступен.
Спасибо сказали:
Аватара пользователя
RocksLinux
Сообщения: 223
ОС: Slackware

Re: web-interface к rtorrent

Сообщение RocksLinux »

У Вас два раза прописан модуль mod_scgi.so
Вы его прописали самостоятельно.
"
# for rtorrent web-interface
LoadModule scgi_module lib/lighttpd/mod_scgi.so
SCGIMount /RPC2 127.0.0.1:5000
"
И приведённая мною команда, с параметром "-a", дописала его в конец httpd.conf, удалить повторную запись.
Извините, а зачем Вы запрашиваете этот адрес?
Далее загружаете rutorrent, разархивируете его в web (server/htdocs) директорию сервера, настраиваете rutorrent, как описано на http://code.google.com/p/rutorrent/wiki/Config, запускаете rtorrent, переходите по адресу web/rutorrent.
«Знать, что мы знаем то, что мы знаем, и что мы не знаем того, чего мы не знаем — это и есть истинное знание». //Конфуций\\
120 минут классики рока
Спасибо сказали:
Аватара пользователя
Archangel
Сообщения: 431
ОС: Slackware64-14.1

Re: web-interface к rtorrent

Сообщение Archangel »

Ну адрес я запрашиваю с другого компьютера, собственно для этого все и затевалось. Я так понимаю оно должно работать наподобие web-морды к CUPS или SWAT от samba. Или что-то не так?
PS Еще я что-то не совсем пойму что является корневым каталогом моего сервера, как я понял из httpd.conf - это вроде как /usr. Так это или нет?
Спасибо сказали:
Аватара пользователя
RocksLinux
Сообщения: 223
ОС: Slackware

Re: web-interface к rtorrent

Сообщение RocksLinux »

Archangel писал(а):
23.10.2010 22:16
Ну адрес я запрашиваю с другого компьютера, собственно для этого все и затевалось. Я так понимаю оно должно работать наподобие web-морды к CUPS или SWAT от samba. Или что-то не так?

http://code.google.com/p/rutorrent/wiki/Ma...%B0%D0%B5%D1%82
Начиная с версии 0.7.6 rTorrent поддерживает удаленное управление по протоколу XMLRPC через SCGI шлюз. Работать напрямую с SCGI шлюзом браузер не может - протокол не позволяет, да и открывать этот шлюз на сервере "наружу" никто в здравом уме не будет. Зато браузер (а значит и ruTorrent) может работать с веб-сервером, который, в свою очередь, переправляет команды в этот самый шлюз.


Под web (server/htdocs) я подразумевал DocumentRoot, а не ServerRoot

http://www.opennet.ru/docs/RUS/apache/
ServerRoot

В этой директиве задается базовый каталог, в котором будет установлено программное обеспечение HTTP-сервера Apache. По умолчанию это каталог /usr/local/etc/httpd. Если вы до сих пор следовали нашим инструкциям, вам не придется менять эту строку.

DocumentRoot

В этой директиве задается каталог, из которого берутся передаваемые клиентам документы. По умолчанию принимается каталог /usr/local/etc/ httpd/htdocs. Можно предоставлять клиентам и файлы, находящиеся в других каталогах, ≈ для этого используются символьные ссылки.


ServerRoot "/usr"

Именно относительно этой директории указываются компоненты Apache.
Например, LoadModule authn_file_module lib/httpd/modules/mod_authn_file.so
ls -l /usr/lib/httpd/modules/mod_authn_file.so
-rwxr-xr-x 1 root root 4952 2010-03-09 00:57 /usr/lib/httpd/modules/mod_authn_file.so

DocumentRoot "/srv/httpd/htdocs"

Указывает на директорию /srv. Лично я, не припомню таковой в конфигурационных файлах. Традиционно, в Slackware DocumentRoot указывает на /var/www/htdocs, в этом легко убедиться на практике. Следовательно, я могу предположить, что /srv "жёстко" прописана в компонентах Apache.

http://slackware.osuosl.org/slackware-13.1...ttpd.SlackBuild
# On Slackware, the traditional location for the Apache document root has always
# been "/var/www/htdocs/". We can avoid an unpleasant surprise for people by
# leaving things where they've always been, and comply with the FHS by providing
# symlinks allowing access through the FHS-approved pathnames. KDE, for example,
# will look for htdig's htsearch here: /var/www/cgi-bin/htsearch
mv $PKG/srv/httpd $PKG/var/www
( cd $PKG/srv
ln -sf /var/www .
ln -sf /var/www httpd
)


Теперь, Вам нужно загрузить и установить rutorrent.
wget http://rutorrent.googlecode.com/files/rutorrent-3.1.tar.gz;
tar xvf rutorrent-3.1.tar.gz;;
echo "Please, login as root";
su -c "mv -v rutorrent /var/www/htdocs/ || echo error; chown -R apache:apache /var/www/rutorrent;
cat >> /home/имя/.rtorrent.rc << EOF
scgi_port = localhost:5000
EOF
chown имя:users /home/rtorrent/.rtorrent.rc;
" root;
Запускаете rtorrent и переходите по адресу http://example.com/rutorrent.
Также, следует ограничить доступ к директории rutorrent, например при помощи .htaccess.

Используя команды, описанные ниже, можно установить rtorrent & rutorrent в системе Slackware 13.1. Я не проверял! Теория!

Код: Выделить всё

mkdir -p build/source;
cd build;
wget -P source http://slackbuilds.org/slackbuilds/13.1/libraries/libsigc++.tar.gz;
wget -P source http://ftp.gnome.org/pub/GNOME/sources/libsigc++/2.2/libsigc++-2.2.7.tar.bz2;
tar xvf source/libsigc++.tar.gz -C .;
cp source/libsigc++-2.2.7.tar.bz2 libsigc++;
echo "Please, login as root";
su -c "sh libsigc++/libsigc++.SlackBuild && installpkg /tmp/libsigc++-2.2.7-*.tgz || echo error" root;
wget -P source http://slackbuilds.org/slackbuilds/13.1/libraries/xmlrpc-c.tar.gz;
wget -P source http://dev.slackverse.org/sources/xmlrpc-c-r1964.tar.bz2;
tar xvf source/xmlrpc-c.tar.gz -C .;
cp source/xmlrpc-c-r1964.tar.bz2 xmlrpc-c;
echo "Please, login as root";
su -c "sh xmlrpc-c/xmlrpc-c.SlackBuild && installpkg /tmp/xmlrpc-c-r1964-*.tgz || echo error" root;
wget -P source http://slackbuilds.org/slackbuilds/13.1/libraries/libtorrent.tar.gz;
wget -P source http://libtorrent.rakshasa.no/downloads/libtorrent-0.12.6.tar.gz;
tar xvf source/libtorrent.tar.gz -C .;
cp source/libtorrent-0.12.6.tar.gz libtorrent;
echo "Please, login as root";
su -c "sh libtorrent/libtorrent.SlackBuild && installpkg /tmp/libtorrent-0.12.6-*.tgz || echo error" root;
wget -P source http://slackbuilds.org/slackbuilds/13.1/network/rtorrent.tar.gz;
wget -P source http://libtorrent.rakshasa.no/downloads/rtorrent-0.8.6.tar.gz;
tar xvf source/rtorrent.tar.gz -C .;
cp source/rtorrent-0.8.6.tar.gz rtorrent;
awk '{print; if( $0 ~ "./configure" ) print "  --with-xmlrpc-c \\"}' rtorrent/rtorrent.SlackBuild > file_tmp && mv file_tmp rtorrent/rtorrent.SlackBuild;
echo "Please, login as root";
su -c "sh rtorrent/rtorrent.SlackBuild && installpkg /tmp/rtorrent-0.8.6-*.tgz || echo error" root;
wget -P source http://python.ca/scgi/releases/scgi-1.14.tar.gz
tar xvf source/scgi-1.14.tar.gz -C .;
echo "Please, login as root";
su -c "/usr/sbin/apxs -i -c scgi-1.14/apache/mod_scgi.c || echo error;
useradd -d /home/rtorrent -s /bin/bash -g rtorrent -m -k /dev/null rtorrent;
echo rtorrent:`mkpasswd | tee logfile_passwd` | chpasswd;
mkdir -p /var/www/rutorrent;
htpasswd -c -b /var/www/rutorrent/.httppaswd  rutorrent `mkpasswd | tee www_chpasswd`;
cat >> /var/www/rutorrent/.htaccess << EOF
AuthType Basic
AuthName "Password Required"
AuthUserFile /var/www/rutorrent/.httppaswd
EOF
cat >> /etc/httpd/httpd.conf << EOF

#Parametrs for rutorrent
LoadModule scgi_module lib/httpd/modules/mod_scgi.so
SCGIMount /RPC2 127.0.0.1:5000
<Directory /var/www/rutorrent>
  AuthType Basic
  AuthName "Authentication Required"
  AuthUserFile /var/www/rutorrent/.httppaswd
  Require valid-user
  Order allow,deny
  Allow from all
</Directory>
#End
EOF
awk '{print; if( $0 ~ "<IfModule alias_module>" ) print "#Alias for rutorrent \nAlias /rutorrent /var/www/rutorrent \n#End"}' /etc/httpd/httpd.conf > file_tmp && mv file_tmp /etc/httpd/httpd.conf || echo error;" root;
wget -P source http://rutorrent.googlecode.com/files/rutorrent-3.1.tar.gz;
tar xvf source/rutorrent-3.1.tar.gz; -C .;
echo "Please, login as root";
su -c "mv -v rutorrent/* /var/www/rutorrent/ || echo error; chown -R apache:apache /var/www/rutorrent;
cat >> /home/rtorrent/.rtorrent.rc << EOF
scgi_port = localhost:5000
EOF
chown rtorrent:users /home/rtorrent/.rtorrent.rc;
/etc/rc.d/rc.httpd restart;
" root;
«Знать, что мы знаем то, что мы знаем, и что мы не знаем того, чего мы не знаем — это и есть истинное знание». //Конфуций\\
120 минут классики рока
Спасибо сказали:
Аватара пользователя
Archangel
Сообщения: 431
ОС: Slackware64-14.1

Re: web-interface к rtorrent

Сообщение Archangel »

Вроде как свершилось чудо и у меня получилось зайти на rutorrent. Только я в нем вижу все по нулям, т.е. список закачек пуст, торрент простаивает. В то же время через консоль я вижу, что rtorrent прекрасно работает. Так и должно быть? Или я что-то натворил не так?
В логе rutorrent видно следующее:

Код: Выделить всё

[26.11.2010 23:36:53] WebUI started.
[26.11.2010 23:36:54] Bad response from server: (200 [parsererror,getuisettings]) <?php require_once( 'util.php' ); $fname = getSettingsPath()."/uisettings.json"; $s = @file_get_contents($fname); if($s==false) $s = '{}'; cachedEcho($s,"application/json",true); ?>
Спасибо сказали:
Аватара пользователя
Archangel
Сообщения: 431
ОС: Slackware64-14.1

Re: web-interface к rtorrent

Сообщение Archangel »

Вот интересно, а seamonkey говорит другую ошибку:

Код: Выделить всё

[09.01.2011 22:07:11] WebUI started.
[09.01.2011 22:07:11] JS error: [http://server/rutorrent/ : 274] XML cannot be the whole program

посмотрел, оказывается не стартует lighttpd.

Код: Выделить всё

root@server:~# /etc/rc.d/rc.lighttpd start
Starting lighttpd: /usr/sbin/lighttpd
/etc/rc.d/rc.lighttpd: line 38: /usr/sbin/lighttpd: Нет такого файла или каталога

Из-за чего могло так получиться? Криво встал lighttpd?
Спасибо сказали:
Аватара пользователя
SLEDopit
Модератор
Сообщения: 4824
Статус: фанат консоли (=
ОС: GNU/Debian, RHEL

Re: web-interface к rtorrent

Сообщение SLEDopit »

[offtop]
сколько сложностей из-за такой просто проблемы.
откройте для себя schedule в ~/.rtorrent.rc

Код: Выделить всё

schedule = watch_directory_1,5,5,"load_start=/home/user/torrents/sounds/*.torrent,d.set_directory=/docus/tmp/sounds/"
schedule = watch_directory_2,5,5,"load_start=/home/user/torrents/films/small/*.torrent,d.set_directory=/docus/films/small"
тогда все, что будет нужно для того, чтобы поставить на закачку торрент - всего лишь положить торрент файл в правильную папку.
я просто тоже сначала думал, что webui это будет круто и удобно, но на практике я им вообще не пользуюсь.
[offtop]
UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity. © Dennis Ritchie
The more you believe you don't do mistakes, the more bugs are in your code.
Спасибо сказали:
Аватара пользователя
Archangel
Сообщения: 431
ОС: Slackware64-14.1

Re: web-interface к rtorrent

Сообщение Archangel »

Научимся настраивать web-интерфейс, а там уже посмотрим, что проще. Например с телефона у которого только тачскрин, проще через вебморду работать, чем через консоль.
Пришел к такому результату, при запущеном httpd, остановленном lighttpd в опере выдает:

Код: Выделить всё

[09.01.2011 23:25:13] WebUI started.
[09.01.2011 23:25:13] Bad response from server: (200 [parsererror,getuisettings]) <?php require_once( 'util.php' ); $fname = getSettingsPath()."/uisettings.json"; $s = @file_get_contents($fname); if($s==false) $s = '{}'; cachedEcho($s,"application/json",true); ?>

в seamonkey:

Код: Выделить всё

[09.01.2011 23:33:42] WebUI started.
[09.01.2011 23:33:42] JS error: [http://server/rutorrent/ : 274] XML cannot be the whole program

Если наоборот остановить httpd, запустить lighthttpd, получаю в опере:

Код: Выделить всё

404-NOT FOUND

в seamonkey:

Код: Выделить всё

[09.01.2011 23:36:21] Bad response from server: (404 [error,getuisettings]) <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">  <head>  <title>404 - Not Found</title>  </head>  <body>  <h1>404 - Not Found</h1>  </body> </html>
Спасибо сказали: