1
0

azureus.txt 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287
  1. =======================================================================
  2. $Id: azureus.txt 3238 2007-10-28 15:01:59Z b4rt $
  3. vim: set comments=fb\:o,fb\:#,fb\:-,fb\:*,fb\:A.,fb\:Q. et tw=72 sw=4:
  4. =======================================================================
  5. /**********************************************************************
  6. Torrentflux-b4rt Fluazu Setup Guide
  7. **********************************************************************/
  8. Introduction
  9. Fluazu provides support for Azureus in Torrentflux-b4rt. The
  10. azureus server runs in the background and the fluazu interface
  11. communicates with the azureus server to control the torrents running
  12. under Azureus.
  13. This guide covers:
  14. * Requirements
  15. * Installation and initial configuration of a working console
  16. based Azureus - no X required - plus installation of the Azureus
  17. XML over HTTP plugin.
  18. With thanks to 'Jessy' on the forums:
  19. https://tf-b4rt.berlios.de/forum/index.php?topic=903.msg3493
  20. * Configuring Fluazu within Torrentflux-b4rt.
  21. * Fluazu Limitations
  22. * Checking Azureus Works
  23. Requirements
  24. * Python 2.2.1 or higher for fluazu-daemon
  25. http://www.python.org
  26. * Azureus 2.5.0.0 or higher
  27. http://azureus.sourceforge.net
  28. * The Azureus XML/HTTP Plugin
  29. http://azureus.sourceforge.net/plugin_details.php?plugin=xml_http_if
  30. Installation And Initial Configuration Of Azureus Without X
  31. --
  32. Submitted by Jessy with thanks:
  33. https://tf-b4rt.berlios.de/forum/index.php?topic=903.msg3493
  34. --
  35. This HOWTO assumes you already have java installed.
  36. You should chown all the files you have created/downloaded to the
  37. user Azureus will run as.
  38. 1. Download necessary files:
  39. Go to:
  40. http://azureus.sourceforge.net/index_CVS.php
  41. Download:
  42. * AzureusXXXX-XXX.jar
  43. * log4j.jar
  44. * commons-cli.jar
  45. Go to:
  46. http://azureus.sourceforge.net/plugin_details.php?plugin=xml_http_if
  47. Download the XML over HTTP plugin.
  48. Save all downloaded files in the same directory and rename
  49. AzureusXXXX-XXX.jar into Azureus2.jar
  50. Note:
  51. -----
  52. While it doesn't matter where you install Azureus, it is
  53. important that a directory called /var/www/.azureus exists and
  54. is writable by Azureus. It stores its configuration there (i
  55. think this is a bug?).
  56. 2. Run Azureus on the commandline and do some basic configuration
  57. (optional). On the shell commandline run:
  58. java -jar Azureus2.jar --ui=console
  59. When Azureus shows up type this at the console to set ports:
  60. set TCP.Listen.Port 50000
  61. set UDP.Listen.Port 50001
  62. set UDP.NonData.Listen.Port 50002
  63. You may also want to check if the port configuration is ok with
  64. the following command in the azureus console:
  65. show nat
  66. Finally, exit out of Azureus for now:
  67. quit
  68. 3. Install XML over HTTP plugin:
  69. Make a directory called xml_http_if in your plugins directory,
  70. which should be where you installed Azureus.
  71. Unpack xml_http_if_1.0.zip into that directory.
  72. 4. Create a script that runs Azureus in background:
  73. Create an executable (+x) azureusd.pl file containing the
  74. following code:
  75. #!/usr/bin/perl
  76. use POSIX 'setsid';
  77. open STDIN, "/dev/null";
  78. open STDOUT,">/dev/null";
  79. open STDERR,">/dev/null";
  80. exit if fork > 0;
  81. setsid;
  82. exec("java -jar Azureus2.jar --ui=console");
  83. 5. Start up Azureus using the script created above.
  84. IMPORTANT:
  85. ----------
  86. Ensure the azureus server is run as the webserver user - use su
  87. or sudo if necessary.
  88. Notes:
  89. ------
  90. Useful links for installation / configuration of console azureus:
  91. http://azureuswiki.com/index.php/Daemonized_Azureus
  92. http://www.azureuswiki.com/index.php/ConsoleUI
  93. http://tf-b4rt.berlios.de/azureus
  94. Configuring Fluazu within Torrentflux-b4rt.
  95. 1. Login to torrentflux-b4rt web interface as an admin user:
  96. + admin
  97. + transfer
  98. + fluazu-settings
  99. 2. Enter the required Azureus server settings in the form and on
  100. the fluazu settings page and save.
  101. Example:
  102. -----
  103. Note this is only an example, enter the settings appropriate for
  104. your own Azureus server setup:
  105. Host: localhost
  106. Port: 6884
  107. Secure: false
  108. Username: none (leave empty)
  109. Password: none (leave empty)
  110. 3. Start fluazu-daemon - goto the following menu item:
  111. + admin
  112. + transfer
  113. + fluazu-settings
  114. and click the 'start' button.
  115. Fluazu will start up and connect to the Azureus server. After
  116. connecting to the Azureus server, the Fluazu settings page will
  117. show an additional form which makes it possible to see and set
  118. some additional settings for the Azureus server - eg global
  119. bandwidth and connection limits.
  120. Fluazu is now ready to use just like any other client within
  121. torrentflux-b4rt - just select 'azureus' as the transfer client when
  122. starting up new transfers.
  123. Fluazu Limitations
  124. Due to the design of fluazu there are some limitations on what
  125. features are available when using Azureus in conjunction with
  126. Torrentflux-b4rt - all features that depend on process-list or
  127. netstat-per-transfer-code:
  128. - The transfer hosts page within Torrentflux-b4rt will not display
  129. any connection information.
  130. - The process list displayed in the superadmin window in
  131. Torrentflux-b4rt will not include any Azureus based transfers.
  132. - The force stop feature within the superadmin pages will also not
  133. work with transfers running under Azureus.
  134. - The maintenance feature in Torrentflux-b4rt (auto-restart of
  135. dead transfer client process) does not currently work.
  136. Checking Azureus Works
  137. 1. Open a shell on the server and cd to the dir
  138. "bin/clients/fluazu" in your tfb-installation.
  139. For example if torrentflux-b4rt is installed in "/var/www" this
  140. would be "/var/www/bin/clients/fluazu"
  141. 2. Start a python shell. If python is in the path, just enter
  142. "python" and hit enter. This should open up a interactive
  143. python shell:
  144. $:/var/www/bin/clients/fluazu# python
  145. Python 2.5 (r25:51908, Sep 19 2006, 23:00:51)
  146. [GCC 2.95.4 20011002 (Debian prerelease)] on linux2
  147. Type "help", "copyright", "credits" or "license" for more information.
  148. >>>
  149. 3. At the python shell, start the dopal.interact module using the
  150. following commands:
  151. import dopal.interact
  152. dopal.interact.main()
  153. When prompted to enter the Azureus server settings in the python
  154. shell, do so:
  155. Enter host: localhost
  156. Enter port (default is 6884): 6884
  157. Enter user name (leave blank if not applicable): foobar
  158. Success!
  159. -------
  160. If the steps above succeeded, you will be connected to the
  161. server successfully and should see:
  162. ------------------------
  163. DOPAL 0.60 - interact module
  164. Connection object stored in 'connection' variable.
  165. Plugin interface stored in 'interface' variable.
  166. >>>
  167. You can now as further test print the connection using the
  168. command "print connection":
  169. >>> print connection
  170. DopalConnection for localhost [Azureus 2.5.0.4]
  171. For further information, check the examples-page for dopal:
  172. http://dopal.sourceforge.net/examples.html
  173. Failure!
  174. --------
  175. If the configuration failed, you will be unable to connect to the
  176. server correctly and should see something like:
  177. ------------------------
  178. DOPAL 0.60 - interact module
  179. Connection object stored in 'connection' variable.
  180. Error getting plugin interface object - could not connect to
  181. Azureus, error:
  182. URLError: <urlopen error (111, 'Connection refused')>
  183. ('http://localhost:6884/process.cgi')
  184. >>>
  185. The message is 'Connection refused' and in this test case the
  186. Azureus server at localhost was not running.
  187. For full troubleshooting please check the requirements page for
  188. Dopal:
  189. http://dopal.sourceforge.net/requirements.html