Install TorrentFlux-b4rt
From OpenFSG
This describes how to setup a web-based Bit-Torrent Client.
The web application allows you to search and download torrents to your FSG and from there down to your local PC. It supports multi users and different download engines. You may also download files from other users to your local PC.
Environment
This documentation was created for this environment:
- FSG-3 with Firmware version: 3.3.14
- TorrentFlux-b4rt
System Requirements
Download Resources
Version b4rt-94
- TorrentFlux b4rt-94 Special version of TorrentFlux-b4rt which was prepared especially for FSG-3. (TorrentFlux b4rt-94 is based on TorrentFlux 2.1.)
Version 2.3
- TorrentFlux 2.3 Current version of TorrentFlux on SourceForge.net. Important: Installation of this version is not described here (yet).
Preparations of the FSG-3
Assumptions
This instructions assume that TorrentFlux is deployed into a separate virtual webserver instance of your FSG-3. Therefore the FSG-3 Admin web interface is used to create a directory as well as an additional virtual websever.
Create a directory on your FSG-3
Requirements
- You are logged on to your FSG-3 administration web application.
Actions
- For creating the directory on the FSG-3 use the Admin web interface. Select menu items: Folders -> New.
- Enter the name of the directory. Remark: This documentation uses the directory name FSG_TorrentFlux. Of course you may choose any directory name which is more appropriate to you.
- Press button "Apply".
The directory is located on your FSG-3 in the /home directory. So the full path is /home/FSG_TorrentFlux.
Troubleshooting
Create a virtual Webserver on your FSG-3
Requirements
- You are logged on to your FSG-3 administration web application.
Actions
- For creating a virtual webserver instance on the FSG-3 use the Admin web interface: Select menu items: Services -> HTTP Server -> New.
- Enter the values as appropriate.
This documentation uses these values for configuration:
Name: TorrentFlux DNS name: torrentflux.yourfsg.de Port: 8081 Folder Name: FSG_TorrentFlux Enable PHP 4: Checked
Of course you may choose to select any other values for your local installation. Please refer to the User Manual of your FSG, section Webserver for detail descriptions of those parameters and values.
- Press button "Apply".
A new virtual webserver instance is created and your webserver is being rebooted. Just wait some time until the webserver is available again. It may be necessary to log into the web-based admin tool of you FSG-3 again.
Troubleshooting
Enable SQL Server
Requirements
- You are logged on to your FSG-3 administration web application.
Actions
- For enabeling the SQL Server on the FSG-3 use the Admin web interface: Select menu items: Services -> SQL Server.
- Check the box for "Run SQL server".
- Press button "Apply".
Troubleshooting
Install Python
See Install Python. Hint: Because torrentflux assumes "python" in /usr/bin, and the actual installation sets the executable as python2.5 in /opt/bin, create a sym-link from /opt/bin/python2.5 to /usr/bin/python.
Install AWK
See Install GAWK.
Install Unzip
See Install Unzip.
Install Net-Tools
See Install Net-Tools.
Install Unrar
See Install Unrar.
Untar downloaded files
- Requirements
- You have access to your FSG-3 using ssh.
- You have loaded the file Torrentflux-fsg-1-.tar.gz to your FSG-3.
- You have write access to the directory where you have placed the file Torrentflux-fsg-1-.tar.gz on your FSG-3.
- You have installed the tool tar.
Actions
- Use the command tar to unpack the downloaded files.
The parameters are x -zf <file name> with <file name> being Torrentflux-fsg-1-.tar.gz
- You may use the commands ls and cdto verify the results.
Example
The full command and the results should look like this:
# tar x -zf Torrentflux-fsg-1-.tar.gz # ls Torrentflux-fsg-1-.tar.gz trunk # cd trunk # ls CHANGES COPYING INSTALL addons clients html setup.php sql
Troubleshooting
Copy files
Requirements
- You have access to your FSG-3 using ssh.
- You have write access to the directory on your FSG-3 which you want to use as the html directory of the TorrentFlux installation.
Actions
- Copy all files from the unpacked html directory into the web server's directory.
Use the command cd to change into the unpacked directory. Use the command cp -r to copy all files recursively into the target directory. The target directory in this example is /home/FSG_TorrentFlux which is used to store the html and other files. You have created that directory here.
Example
The results should look like this:
# cd trunk/html # cp -r * /home/FSG_TorrentFlux
Troubleshooting
Create a database and load it
The tool for all steps in this section is phpMyAdmin, which is already installed on your FSG-3.
Requirements
- You are logged on to your FSG-3 administration web application.
- SQL database server is enabled on your FSG-3. Click here for a description how to do this.
- You have unpacked the downloaded installation file. Click here for a description how to do this.
Actions
- You may start phpMyAdmin with the FSG-3 Admin web interface: Select menu items: Services -> SQL Server.
- Click the link in "To go to the SQL administration page click here."
Troubleshooting
Create Database
Actions
- In the start page of phpMyAdmin enter the name of the new database. This example uses the database name torrentflux. It is recommended that you also use that name.
- Press the button "Create".
The database is created and you will see an overview of that database. The next step is to create tables in this new database.
Troubleshooting
Create Database Tables
Actions
- Go to phpMyAdmin folder "Import"
- For field "Location of the text file" select file trunk/sql/mysql/mysql_torrentflux-b4rt-1.0.sql which is located in your unpacked TorrentFlux files.
- Press button "Go"
The script is loaded from your local PC and the tables are created according to the statements of the script. Next step is to create a user, who will have access to these tables.
Troubleshooting
Create Database User
Actions
- In the main view of phpMyAdmin select "Privileges"
- Click link "Add a new User"
- Enter the user's configuration as appropriate.
This documentation uses these values for configuration:
User Name: torrentflux Host: local Password: Secer3T Re-type: Secer3T
Of course you may choose to enter any other values for your local installation. Anyway using those values for "user name" and "host" is strongly recommended! It is also recommended that you do NOT use the same password as shown in this example, but use a secure password.
- Press button "Go".
The user is created. In the next step he will receive access permissions to the newly generated tables.
Troubleshooting
Configure Database User
Actions
- In section "Database-specific privileges" for selection box "Add privileges on the following database:" select the database which you have just created: torrentflux.
- Check those checkboxes in section "Data":
SELECT INSERT UPDATE DELETE
- Press the button "Go".
Now the user has all required access privileges for the new tables in the new database.
Troubleshooting
Edit "config.db.php" for database settings
The file config.db.php.dist is located in the inc/config directory of your webserver instance. In this example it is /home/FSG_TorrentFlux/inc/config/config.db.php.dist. See above where you have defined that directory.
Requirements
- You have access to your FSG-3 using ssh.
- You have read and write access to the directory /home/FSG_TorrentFlux/inc/config.
- You have installed the editor vi.
- You know how to use vi
- You have information about
- Your database system type, which stores the data for your TorrentFlux installation
- The machine name on which you run your TorrentFlux database
- The database name, which holds the tables for your your TorrentFlux installation
- The user name who connects to that database from the TorrentFlux web application
- The password of that user
Actions
- Log on to your FSG using ssh.
- Change to directory /home/FSG_TorrentFlux/inc/config and copy the file config.db.php.dist to config.db.php as shown in the next example.
# cd /home/FSG_TorrentFlux/inc/config # cp config.db.php.dist config.db.php
- Open the file config.db.php in an editor, e.g. vi as shown in the next example.
# cd /home/FSG_TorrentFlux/inc/config # vi config.db.php
- Change the file, so that it matches your environment. The next examples show the most important settings:
This documentation uses the mysql database, so it is recommended that your settings also look exactly like this:
$cfg["db_type"] = "mysql"; // mysql, postgres7 view adodb/drivers/
This documentation uses the database on your local machine, so it is recommended that your settings also look exactly like this:
$cfg["db_host"] = "localhost"; // DB host computer name or IP
This documentation uses the database user name torrentflux as defined here. So it is recommended that your settings also look exactly like this:
$cfg["db_name"] = "torrentflux"; // Name of the Database
This documentation uses the database name torrentflux as defined here. So it is recommended that your settings also look exactly like this:
$cfg["db_user"] = "torrentflux"; // username for your MySQL database
This documentation uses the database user password Secer3T as defined here. Anyway it is recommended that you do not use the password from the example below, but your own secure password. This is just an example:
$cfg["db_pass"] = "Secer3T"; // password for database
Troubleshooting
Start TorrentFlux and Enter Admin User
Requirements
- TorrentFlux is set up properly as described in all steps above.
- You have a Webbrowser, which can connect to your FSG-3.
Actions
- Open the URL of your TorrenFlux installation in your browser.
This documentation uses this example:
http://yourfsg.de:8081
The login screen is displayed.
- Enter the username and the password for the Superuser of your TorrentFlux installation.
This documentation uses this example:
Username: root Password: Adm1n1strat0r
Of course you may choose to enter any other values for your local installation. It is recommended that you do NOT use the same password as shown in this example, but use a secure password.
- Press button "Login".
Torrentflux creates a new user with TorrentFlux superuser permissions. With that user you may create additional users and maintain them. But first you should configure TorrentFlux.
Troubleshooting
Configure TorrentFlux
to be done...
Credits
This documentation was inspired by the original documentation which was provided by Kapoira. Thanks a lot for the great documentation and the conversion of TorrentFlux-b4rt to the FSG-3. Although I could use your installation instructions very well I wanted to write some very detailed instructions so that a lot more people may set up TorrentFlux on their FSG-3.
