New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !
HOWTO:TorrentFlux, php-based interface for bittorrent client
HOWTO:TorrentFlux, php-based interface for bittorrent client
Hi all,
i just wanted to share that i've successfully been using torrentflux on my bubba. howto is some posts down...
torrentflux is a set of PHP-scripts using a mysql backend to give a graphical interface to the python-client bittornado. It is capable of queueing torrents, limiting up/down speeds, setting share-ratios and resuming halted downloads.
It is a bit resource-heavy since it runs through python, but if i limit my concurrent downloads to 2 or 3 at the time, it works really well.
Check it out![/url]
/Bjorn
i just wanted to share that i've successfully been using torrentflux on my bubba. howto is some posts down...
torrentflux is a set of PHP-scripts using a mysql backend to give a graphical interface to the python-client bittornado. It is capable of queueing torrents, limiting up/down speeds, setting share-ratios and resuming halted downloads.
It is a bit resource-heavy since it runs through python, but if i limit my concurrent downloads to 2 or 3 at the time, it works really well.
Check it out![/url]
/Bjorn
Last edited by bjorn on 17 Feb 2007, 09:30, edited 2 times in total.
Howto install TorrentFlux 2.3 on Bubba.
Note: Use this at your own risk!. I might have made a typo which could render your system unusable, and I take no responsability for damage caused by following this howto. You have been warned.
Browse to bubba and create a useraccount and allow ssh-login for it, follow Bubba-usermanual for this. I created a user called "bjorn" and this will be used as example throuout this howto.
Download torretflux_2.3.tar.gz from http://www.torrentflux.com/ and save it as /home/bjorn/torrentflux_2.3.tar.gz on Bubba.
Connected to Bubba through SSH, login as your user.
become root
backup files that we change if something goes wrong
there are many file editors available, "vi" or "nano" are two good examples, "nano" would perhaps be better for beginners.
enable debian sarge repositories by editing /etc/apt/sources.list and remove comments ("#"-sign) for 3 top rows
Allow user "bjorn" to use the command "sudo" by adding the row "bjorn ALL=(ALL) ALL" to /etc/sudoers
leave root:
unpacked archive
update bubbas apt-system with new information
install nessesary software with the following (the packages has a number of requirements, apt will prompt you to install them as well):
set password for mysql-root user (default is blank-password, and not recomended!)
login to mysql as mysql-root:
run the following commands in mysql-client to create database, user and populate with data from torrentflux script (edit the below to use desired username and password):
edit the file /home/bjorn/torrentflux_2.3/html/config.php and insert values for database connection.
move files into webserver-documentroot
make the webserver-user owner of files
stop then start apache (a "force-reload" is done while running the apt-get install command above but for some reason this did not register mysql-support properly).
created a directory where to store downloads from torrentflux:
make folder writeable for all users
That should be it!
Browse to http://bubba/tf/ and enter your desired username and password. The first user to do this will become administrator and will be directly taken to the settings-screen.
Change the "path" to /home/storage/torrentflux/
make sure you forward a port-range for your bubba in your firewall/router, having open connection to the specified ports will greatly enhance your bittorrent experience.
I choosed to enable the "Queue manager" and run with default thread-settings.
/Bjorn
Note: Use this at your own risk!. I might have made a typo which could render your system unusable, and I take no responsability for damage caused by following this howto. You have been warned.
Browse to bubba and create a useraccount and allow ssh-login for it, follow Bubba-usermanual for this. I created a user called "bjorn" and this will be used as example throuout this howto.
Download torretflux_2.3.tar.gz from http://www.torrentflux.com/ and save it as /home/bjorn/torrentflux_2.3.tar.gz on Bubba.
Connected to Bubba through SSH, login as your user.
become root
Code: Select all
su
Code: Select all
cp /etc/apt/sources.list /etc/apt/sources.list.backup
cp /etc/sudoers /etc/sudoers.backup
enable debian sarge repositories by editing /etc/apt/sources.list and remove comments ("#"-sign) for 3 top rows
Code: Select all
vi /etc/apt/sources.list
Code: Select all
visudo
Code: Select all
exit
Code: Select all
tar zxvf /home/bjorn/torrentflux
Code: Select all
sudo apt-get update
Code: Select all
sudo apt-get install mysql-server php4-mysql python
Code: Select all
mysqladmin -u root -p password my_secret_password
Code: Select all
mysql -u root -p
Code: Select all
create database torrentflux;
grant all on torrentflux.* to 'tf_user'@'localhost' identified by 'tf_password';
flush privileges;
use torrentflux;
source /home/bjorn/torrentflux_2.3/sql/mysql_torrentflux.sql;
quit;
Code: Select all
vi /home/bjorn/torrentflux_2.3/html/config.php
Code: Select all
sudo mv /home/bjorn/torrentflux_2.3/html/ /var/www/html/tf
Code: Select all
sudo chown -R www-data.www-data /var/www/html/tf
Code: Select all
sudo /etc/init.d/apache2 stop
sudo /etc/init.d/apache2 start
Code: Select all
sudo mkdir -p /home/storage/torrentflux
Code: Select all
sudo chmod -R 777 /home/storage/torrentflux
Browse to http://bubba/tf/ and enter your desired username and password. The first user to do this will become administrator and will be directly taken to the settings-screen.
Change the "path" to /home/storage/torrentflux/
make sure you forward a port-range for your bubba in your firewall/router, having open connection to the specified ports will greatly enhance your bittorrent experience.
I choosed to enable the "Queue manager" and run with default thread-settings.
/Bjorn
Last edited by bjorn on 20 Feb 2007, 15:27, edited 2 times in total.
NIce article bjorn,
One minor comment. Don't use plain vi when editing /etc/sudoers. There is a special command for doing this visudo which does basic sanity checks and avoids concurent edits.
Other than that i can only say, nice stuff. Do you mind if we use this in our upcomming page with tips and tricks on Bubba?
/Tor
One minor comment. Don't use plain vi when editing /etc/sudoers. There is a special command for doing this visudo which does basic sanity checks and avoids concurent edits.
Other than that i can only say, nice stuff. Do you mind if we use this in our upcomming page with tips and tricks on Bubba?
/Tor
Co-founder OpenProducts and Ex Excito Developer
Thanks for a great HOWTO....but I got lost at the SQL-database.
When writing the commando:
source /home/MYUSERNAME/torrentflux_2.3/sql/mysql_torrentflux.sql;
I get the following error:
mysql> source /home/MYUSERNAME/torrentflux_2.3/sql/mysql_torrentflux.sql;
ERROR 1046: No Database Selected
When logging on via ftp I can see the "mysql_torrentflux.sql"-file in the right place.
What's wrong?
/Johnny
When writing the commando:
source /home/MYUSERNAME/torrentflux_2.3/sql/mysql_torrentflux.sql;
I get the following error:
mysql> source /home/MYUSERNAME/torrentflux_2.3/sql/mysql_torrentflux.sql;
ERROR 1046: No Database Selected
When logging on via ftp I can see the "mysql_torrentflux.sql"-file in the right place.
What's wrong?
/Johnny
Damn, my bad!
I missed a command amongst the sql-statments...
before the "source"-thingy you'd need to run
I'll update the howto appropriately
I missed a command amongst the sql-statments...
before the "source"-thingy you'd need to run
Code: Select all
use torrentflux;
Hi bjorn!
Thanks for your fast reply. I added the command and got passed it with success. Only now I got stucked when editing the config.php file. I change it where I thought I was supposed to, it now looks like this:
------------------------------------------------------------------------------------
$cfg["db_type"] = "mysql"; // mysql, postgres7 view adodb/drivers/
$cfg["db_host"] = "localhost"; // DB host computer name or IP
$cfg["db_name"] = "torrentflux"; // Name of the Database
$cfg["db_user"] = "MYUSERNAME"; // username for your MySQL database
$cfg["db_pass"] = "MYPASSWORD"; // password for database
------------------------------------------------------------------------------------
I then saved it and kept going with the rest of your instruction. But now when I try to login I get the following error:
------------------------------------------------------------------------------------
Warning: mysql_connect(): Access denied for user: 'MYUSERNAME@localhost' (Using password: YES) in /var/www/html/tf/adodb/drivers/adodb-mysql.inc.php on line 355
TorrentFlux Database/SQL Error
Database error: Access denied for user: 'MYUSERNAME@localhost' (Using password: YES)
Always check your database variables in the config.php file.
------------------------------------------------------------------------------------
I then tried to change the config.php file. First I couldn't find it where it used to be, but then I guessed I moved it to /var/www/html/tf but there I'm not allowed to edit the file.
Could you please help me out here, as I'm not used to do this kind of stuff
What's the correct values for the config.php file?
/Johnny
Thanks for your fast reply. I added the command and got passed it with success. Only now I got stucked when editing the config.php file. I change it where I thought I was supposed to, it now looks like this:
------------------------------------------------------------------------------------
$cfg["db_type"] = "mysql"; // mysql, postgres7 view adodb/drivers/
$cfg["db_host"] = "localhost"; // DB host computer name or IP
$cfg["db_name"] = "torrentflux"; // Name of the Database
$cfg["db_user"] = "MYUSERNAME"; // username for your MySQL database
$cfg["db_pass"] = "MYPASSWORD"; // password for database
------------------------------------------------------------------------------------
I then saved it and kept going with the rest of your instruction. But now when I try to login I get the following error:
------------------------------------------------------------------------------------
Warning: mysql_connect(): Access denied for user: 'MYUSERNAME@localhost' (Using password: YES) in /var/www/html/tf/adodb/drivers/adodb-mysql.inc.php on line 355
TorrentFlux Database/SQL Error
Database error: Access denied for user: 'MYUSERNAME@localhost' (Using password: YES)
Always check your database variables in the config.php file.
------------------------------------------------------------------------------------
I then tried to change the config.php file. First I couldn't find it where it used to be, but then I guessed I moved it to /var/www/html/tf but there I'm not allowed to edit the file.
Could you please help me out here, as I'm not used to do this kind of stuff

What's the correct values for the config.php file?
/Johnny
Hi again!
I fixed the problem I had. I guess I need to start learning to read between the lines
The problem occured because I had not entered the same username and password in the .php file as I had done in the sql file. After changing the php file with the command sudo nano /var/www/html/tf/config.php, I was able to do this and now it seems to work.
/Johnny
I fixed the problem I had. I guess I need to start learning to read between the lines

The problem occured because I had not entered the same username and password in the .php file as I had done in the sql file. After changing the php file with the command sudo nano /var/www/html/tf/config.php, I was able to do this and now it seems to work.
/Johnny
How do I update the search engines?
Anyone know how to update the search engines?
Apparently the Piratebay search engine has been updated from 1.05 to 1.06
http://www.torrentflux.com/forum/index. ... 125.0.html
But I'm not sure how to update this.....anyone knows?
Apparently the Piratebay search engine has been updated from 1.05 to 1.06
http://www.torrentflux.com/forum/index. ... 125.0.html
But I'm not sure how to update this.....anyone knows?
I removed my apache and mysql and installed LightTP and SQLite instead. Torrentflux works great and feels a bit faster, although i don't have any actual mem/cpu-usage details to compare the two...
There's also some discussions on the torrentflux-forums on using "transmission" which is a C++ bittorrent-client instead of the default bittornado-client. This would probably render much better performance than changeing web/db-server.
/Bjorn
There's also some discussions on the torrentflux-forums on using "transmission" which is a C++ bittorrent-client instead of the default bittornado-client. This would probably render much better performance than changeing web/db-server.
/Bjorn
is it possible to upgrade the guide with this ?bjorn wrote:I removed my apache and mysql and installed LightTP and SQLite instead. Torrentflux works great and feels a bit faster, although i don't have any actual mem/cpu-usage details to compare the two...
There's also some discussions on the torrentflux-forums on using "transmission" which is a C++ bittorrent-client instead of the default bittornado-client. This would probably render much better performance than changeing web/db-server.
/Bjorn