================================================================= $Id$ ================================================================= TorrentFlux-NG installation ----------------------------------------------------------------- System Requirements ----------------------------------------------------------------- -- A Linux or FreeBSD Box installed and working properly. (tested on Debian, Ubuntu, LMDE, Gentoo, RedHat, Fedora and others) -- Web Server. * Apache (http://www.apache.org) * Lighttpd (http://www.lighttpd.net) -- SQL-Database. Supported are : * MySQL (http://www.mysql.com) * SQLite (http://www.sqlite.org) or (not fully tested) * PostgreSQL (http://www.postgresql.org) -- PHP Version 5 or higher with Session and PCRE support enabled. Socket-Support is required for fluxd. (http://www.php.net) -- Python 2.2 or higher for BitTornado and Python 2.4 or higher for Mainline (BitTorrent). (http://www.python.org) -- Vuze 4.5.1.2 or higher with the xmwebui Plugin (0.2.9) to use an Azureus-Server as RPC server. * Azureus (http://azureus.sourceforge.net) -- Transmission Deamon to use Transmission RPC server. -- Perl 5.6 or higher for fluxd, nzbperl, ttools.pl and fluxpoller.pl (see Section "Perl-Modules" for Perl-Module- Requirements) (http://www.perl.org) -- Safe Mode must be turned off. (php.ini : safe_mode = Off) Allow Url fopen must be allowed. (php.ini : allow_url_fopen = On) -- SELinux should be turned off (to check) ----------------------------------------------------------------- Installation with "setup.php" ----------------------------------------------------------------- 1. Untar the package into a directory then copy the contents of the "html" folder into your web site directory. tar -xjpvf torrentflux-ng*.tar.bz2 2. ensure the files + dirs in the docroot are readable by your webserver-user. if it is not the case one possible solution is to "chown" the files to your webserver-user. this may be done with a line like that : chown -R username /path/to/torrentflux-docroot change dir + username to fit your system so a possible line would be : chown -R www-data /var/www 3. ensure the dir "inc/config/" in your torrentflux-docroot is writable by your webserver-user. 4. open "setup.php" in a browser and complete it step by step. 5. IMPORTANT: The first time you access the application, you will be prompted for a user/password -- this is when you will set the SUPER ADMIN user and password by what you enter. For example, you pull the site up for the first time, you will be prompted to login and if you put in user: 'goombah' and password: 'iama' then your super admin user account will be set to goombah/iama. 6. On your first login you should check all the admin settings pages and configure your installation. ----------------------------------------------------------------- Manual Installation ----------------------------------------------------------------- 1. Untar the package into a directory then copy the contents of the "html" folder into your web site directory. tar -xjvf torrentflux-ng*.tar.bz2 2. Create a database and import the sql-script. You may specify the type of the database you want to use in the file "config.db.php", but the examples here use MySQL. mysqladmin create torrentflux "mysql_torrentflux-b4rt-1.0.sql" contains the commands to build the table structure and the default data. Import the script into your torrentflux database (from sql directory). ./sqlscript.php.sh mysql install > mysql_TorrentFlux-NG-1.0.sql mysql torrentflux < mysql_TorrentFlux-NG-1.0.sql Or load the script with PHPMyAdmin (web interface) 3. rename the file "config.db.php.dist" in the dir "inc/config/" to "config.db.php" and set the database-settings to use your torrentflux-database. You may specify type of database you want to use, but the examples here use MySQL. 4. ensure the files + dirs in the docroot are readable by your webserver-user. if it is not the case one possible solution is to "chown" the files to your webserver-user. this may be done with a line like that : chown -R username /path/to/torrentflux-docroot change dir + username to fit your system so a possible line would be : chown -R www-data /var/www 5. Remove or rename the file /path/to/torrentflux-docroot/setup.php. This is a security precaution to ensure a malicious user does not attempt to overwrite your torrentflux-b4rt installation. Your installation will not run with setup.php in the document root folder. 6. IMPORTANT: The first time you access the application, you will be prompted for a user/password -- this is when you will set the SUPER ADMIN user and password by what you enter. For example, you pull the site up for the first time, you will be prompted to login and if you put in user: 'goombah' and password: 'iama' then your super admin user account will be set to goombah/iama. 7. On your first login you should check all the admin settings pages and configure your installation. ----------------------------------------------------------------- Upgrade from TorrentFlux-b4rt with "upgrade.php" ----------------------------------------------------------------- 1. If QueueManager is running dequeue all torrents and stop it. 2. Stop all transfers and delete them. (data-delete/reset/wipe is not needed, delete is enough) 3. Delete content of docroot of the v9x-installation. (recursive) 4. Untar the package into a directory then copy the contents of the "html" folder into your web site directory. tar -jxvf torrentflux-b4rt_1.0.tar.bz2 5. ensure the files + dirs in the docroot are readable by your webserver-user. if it is not the case one possible solution is to "chown" the files to your webserver-user. this may be done with a line like that : chown -R username /path/to/torrentflux-docroot change dir + username to fit your system so a possible line would be : chown -R www-data /var/www 6. ensure the dir "inc/config/" in your torrentflux-docroot is writable by your webserver-user. 7. copy the file "upgrade.php" from the dir "upgrade/v9x_1.0/" to your torrentflux-docroot. choose the appropriate version. 8. open the just copied file "upgrade.php" in a browser and complete it step by step. 9. Remove or rename the file /path/to/torrentflux-docroot/setup.php. This is a security precaution to ensure a malicious user does not attempt to overwrite your torrentflux-b4rt installation. Your installation will not run with setup.php in the document root folder. 10. On your first login after the upgrade you should check all the admin settings pages and configure your installation. ----------------------------------------------------------------- Manual Upgrade from TorrentFlux-b4rt ----------------------------------------------------------------- 1. If QueueManager is running dequeue all torrents and stop it. 2. Stop all transfers and delete them. (data-delete/reset/wipe is not needed, delete is enough) 3. Delete content of docroot of the v98-installation. (recursive) 4. Untar the package into a directory then copy the contents of the "html" folder into your web site directory. tar -xjvf torrentflux-b4rt_1.0.tar.bz2 5. Import the Update-sql-script. You may specify the type of the database you want to use in the file "config.db.php", but the examples here use MySQL. go to the sql folder and type : ./sqlscript.php.sh mysql upgrade v1.0beta2 > upgrade.sql Import the script into your torrentflux database. mysql torrentflux < upgrade.sql Or load the script with PHPMyAdmin (web interface) 6. rename the file "config.db.php.dist" in the dir "inc/config/" to "config.db.php" and set the database-settings to use your torrentflux-database. You may specify type of database you want to use, but the examples here use MySQL. 7. ensure the files + dirs in the docroot are readable by your webserver-user. if it is not the case one possible solution is to "chown" the files to your webserver-user. this may be done with a line like that : chown -R username /path/to/torrentflux-docroot change dir + username to fit your system so a possible line would be : chown -R www-data /var/www 8. rename the dir ".torrents" in your path to ".transfers". on a default install this would be : /usr/local/torrent/.torrents/ -> /usr/local/torrent/.transfers/ 9. Remove or rename the file /path/to/torrentflux-docroot/setup.php. This is a security precaution to ensure a malicious user does not attempt to overwrite your torrentflux-b4rt installation. Your installation will not run with setup.php in the document root folder. 10. On your first login after the upgrade you should check all the admin settings pages and configure your installation. ----------------------------------------------------------------- Upgrade from official TorrentFlux 2.1/2.2/2.3 with "upgrade.php" ----------------------------------------------------------------- Same method, edit sql/sqlscript.php.sh to change default version and generate the upgrade sql script with the correct version. Old method (to check) 1. If QueueManager is running dequeue all torrents and stop it. 2. Stop all transfers. 3. Delete content of docroot of the 2.1/2.2/2.3 installation. (recursive) 4. Untar the package into a directory then copy the contents of the "html" folder into your web site directory. tar -xjvf torrentflux-b4rt_1.0.tar.bz2 5. ensure the files + dirs in the docroot are readable by your webserver-user. if it is not the case one possible solution is to "chown" the files to your webserver-user. this may be done with a line like that : chown -R username /path/to/torrentflux-docroot change dir + username to fit your system so a possible line would be : chown -R www-data /var/www 6. ensure the dir "inc/config/" in your torrentflux-docroot is writable by your webserver-user. 7. copy the file "upgrade.php" from the dir "upgrade/TF21_1.0/" or "upgrade/TF22_1.0/" or "upgrade/TF23_1.0/" to your docroot. (choose the version of your current installation) 8. open the just copied file "upgrade.php" in a browser and complete it step by step. 9. Remove or rename the file /path/to/torrentflux-docroot/setup.php. This is a security precaution to ensure a malicious user does not attempt to overwrite your torrentflux-b4rt installation. Your installation will not run with setup.php in the document root folder. 10. On your first login after the upgrade you should check all the admin settings pages and configure your installation. ----------------------------------------------------------------- Manual Upgrade from official TorrentFlux 2.1/2.2/2.3 ----------------------------------------------------------------- 1. If QueueManager is running dequeue all torrents and stop it. 2. Stop all transfers. 3. Delete content of docroot of the 2.1/2.2/2.3 installation. (recursive) 4. Untar the package into a directory then copy the contents of the "html" folder into your web site directory. tar -jxvf torrentflux-b4rt_1.0.tar.bz2 5. Import the Update-sql-script. You may specify the type of the database you want to use in the file "config.db.php", but the examples here use MySQL for update from TorrentFlux 2.3. "mysql_update_torrentflux23.to.torrentflux-b4rt-1.0.sql" contains the commands to update the table structure and the default data. Import the script into your torrentflux database. mysql torrentflux < mysql_update_torrentflux23.to.torrentflux-b4rt-1.0.sql Or load the script with PHPMyAdmin (web interface) 6. rename the file "config.db.php.dist" in the dir "inc/config/" to "config.db.php" and set the database-settings to use your torrentflux-database. You may specify type of database you want to use, but the examples here use MySQL. 7. ensure the files + dirs in the docroot are readable by your webserver-user. if it is not the case one possible solution is to "chown" the files to your webserver-user. this may be done with a line like that : chown -R username /path/to/torrentflux-docroot change dir + username to fit your system so a possible line would be : chown -R www-data /var/www 8. rename the dir ".torrents" in your path to ".transfers". on a default install this would be : /usr/local/torrent/.torrents/ -> /usr/local/torrent/.transfers/ 9. rename stat-files and prio-files. Note: it is also possible to just delete all transfers before upgrading and then re-inject after upgrade. (then this point can be skipped) change to your path-dir. (the dir just renamed in 8.) on a default install this would be : cd /usr/local/torrent/.transfers/ execute this commands (requires perl) in that dir : ls -1 *.torrent | perl -e 'while(){chomp;$o=lc(((substr($_,0,(length($_))-7))))."stat";$n=$_.".stat";print $o."->".$n;print `mv $o $n;echo`;}' ls -1 *.prio | perl -e 'while(){chomp;$o=$_;$n=((substr($_,0,(length($_))-4)))."torrent.prio";print $o."->".$n;print `mv $o $n;echo`;}' 10. Remove or rename the file /path/to/torrentflux-docroot/setup.php. This is a security precaution to ensure a malicious user does not attempt to overwrite your torrentflux-b4rt installation. Your installation will not run with setup.php in the document root folder. 11. On your first login after the upgrade you should check all the admin settings pages and configure your installation. ----------------------------------------------------------------- Additional / Optional ----------------------------------------------------------------- -- PyCrypto (Python Cryptography Toolkit) is needed to run BitTornado with encryption. (avail. since BitTornado 0.3.18) PyCrypto is also required for Mainline (BitTorrent) Client. PyCrypto can be found at : http://www.amk.ca/python/code/crypto -- Twisted is needed to run Mainline (BitTorrent) Client. It can be found at : http://twistedmatrix.com Twisted requires at least Zope Interface 3.0.1 or higher. It can also work with ZopeX3 version 3.0.0c1 or higher. Zope Interface is included in Twisted-source-tarball or can be found at : http://www.zope.org/Products/ZopeInterface -- UUDeview is needed for nzbperl.pl. UUDeview can be found at : http://fpx.de/fp/Software/UUDeview/ -- unrar (for Linux) and rarbsd (for FreeBSD) can be found at : http://www.rarlab.com/rar/ -- cksfv (needed for SFV check) can be found at : http://zakalwe.virtuaalipalvelin.net/~shd/foss/cksfv/files/devel/ -- vlc (needed for Streaming Feature) can be found at : http://www.videolan.org/ -- To compile Transmission on Mac OS X you need the Developer Tools from Apple. -- To use wget on Mac OS X install : http://www.statusq.org/images/wget.zip ----------------------------------------------------------------- Perl-Modules ----------------------------------------------------------------- -- fluxd.pl (part of fluxd) * IO::Select (perl -MCPAN -e "install IO::Select") * IO::Socket::UNIX (perl -MCPAN -e "install IO::Socket::UNIX") * IO::Socket::INET (perl -MCPAN -e "install IO::Socket::INET") * POSIX (perl -MCPAN -e "install POSIX") -- FluxDB.pm (part of fluxd) (only in dbi-mode) * all database-types : DBI (perl -MCPAN -e "install Bundle::DBI") * MySQL : DBD::mysql (perl -MCPAN -e "install DBD::mysql") * SQLite : DBD::SQLite (perl -MCPAN -e "install DBD::SQLite") * PostgreSQL : DBD::Pg (perl -MCPAN -e "install DBD::Pg") -- Fluxinet.pm (part of fluxd) * IO::Select (perl -MCPAN -e "install IO::Select") * IO::Socket::INET (perl -MCPAN -e "install IO::Socket::INET") -- tfnzbperl.pl (usenet transfer-client) Required : * IO::File * IO::Select * IO::Socket::INET * File::Basename * Getopt::Long * Cwd * XML::Simple * XML::DOM Optional : * threads * Thread::Queue -- ttools.pl (metainfoclient) * Digest::SHA1 (perl -MCPAN -e "install Digest::SHA1") * LWP::UserAgent (perl -MCPAN -e "install LWP::UserAgent") ----------------------------------------------------------------- Known Issues ----------------------------------------------------------------- Please check at: https://github.com/epsylon3/torrentflux/issues