How to install torrentflux on centos 5.5

by Ruchira on September 17, 2010


This is a guide to install (torrent seedbox)torrentflux latest 2.4 on centos 5.5 from scratch! you dont need to know anything because all the steps are clearly provided so don’t hesitate to follow these steps.

First of all you need a dedicated server or vps for installing torrentflux. I recommend getting a vps from Germany hosting provider like or like that because most of providers in USA doesn’t like to run torrents on their servers due to copyright issues.

You need a bigger bandwidth at least 300GB, Disk Space and RAM of at least 512MB because this script consumes about 400MB of RAM in most basic configuration.

You need to have centos linux installed to continue these steps if not simply install centos from your provided vps control panel.

You need to download SSH client first like PUTTY

After installing run it and enter your ip address given by vps or dedicated provider to login to your box.

When prompted enter your user name ( default user name after installing centos is-root) and your pass so it will log you on to the system.


You can see that now I have successfully logged on to the centos server and now follow these commands to install torrentflux. ( Type these codes and press enter inside putty)

You need to update to latest centos 5.5 first so the run the code below to update the centos operating system. After hit enter this will take time and after finished you will be able to type codes again so wait until it complete.
yum update

Then we need to install apache,mysql,php and curl so run this codes

yum install httpd python php mysql-server php-mysql php-common php-gd php-curl


Now we have installed all the scripts necessary so restart apache by using this code

/etc/init.d/httpd restart

Now we need to create my sql data base user. run this


And we need a apache and mysql to be automatically started if our server reboot. So run this

chkconfig --levels 235 httpd on
chkconfig --levels 235 mysqld on

Then type this to restart  mysql

/etc/init.d/mysqld restart
Then wee need to create mysql root password you can use any password for this simply replace YOURPASSHERE with your desired password.
mysqladmin -u root password YOURPASSHERE

Then you need to create a directory to run torrentflux because running on the main directory might give us some problems so please create a directory. Its like normal directory for ex- ! In this guide I have set the directory as torrentflux you can see it below! Run this code

mkdir /var/www/html/torrentflux

Next you need to download torrentflux and install it so run this codes one by one,

cd /var/www/html/torrentflux/

Default downloaded torrentflux installation files are compressed. So uncompress it by running following codes.

tar -xzf torrentflux_2.4.tar.gz
mv torrentflux_2.4/html/* /var/www/html/torrentflux/

Now lets create a mysql database for torrentflux just like you do for wordpress
run this codes


cd /var/www/html/torrentflux/torrentflux_2.4/sql/
And on this step put your mysql password as you set early in previous steps as YOURPASSHERE
Im creating a database named “torrents” run below codes one by one
mysql -u root -pPassword: YOURPASSHEREmysql>create database torrents;mysql>\q
And run this too also replace YOURPASSHERE with your preset password when prompted after running first line of command
mysql torrentflux < mysql_torrentflux.sql -u root -pPassword: YOURPASSHERE

Then you need to create a directory to store downloaded files. Im making a directory called downloads. Also run these commands one by one

mkdir /downloads chmod 777 /downloadschown apache.apache /downloads

Now we need to edit torrentflux configuration file, (like we edit wordpress’s wp-config.php )

You need to install nano text editor so run this commands one by one

yum install nanonano /var/www/html/torrentflux/config.php

then nano text editor will display following sheet. Its your torrentflux config.php file! You can navigate by arrow keys and enter the database details on that. You can edit it just like you edit file in windows notepad.

/**************************************************************************/// YOUR DATABASE CONNECTION INFORMATION/**************************************************************************/// Check the adodb/drivers/ directory for support for your database// you may choose from many (mysql is the default)$cfg["db_type"] = "mysql";     // mysql, postgres7, postgres8 view adodb/drivers/$cfg["db_host"] = "localhost";   // DB host computer name or IP$cfg["db_name"] = "torrents"; // Name of the Database$cfg["db_user"] = "root";        // username for your MySQL database$cfg["db_pass"] = "YOURPASSHERE";    // password for database/**************************************************************************/

After editing to correct database details. Press your keyboards Ctrl (Control key) and when holding Ctrl press O ( Not zero) then release the both keys (Ctrl+O) and it will ask you to save the edited file then press enter to confirm.

For exit press and hold Ctrl and then press X ( Ctrl+X)

Then tighten up your security little bit. Run these commands on ssh.

chmod -R 755 /var/www/chown -R apache.apache /var/www/

Then restart apache and mysql services

/etc/init.d/httpd restart/etc/init.d/mysqld restart

Yeah! Its 100% complete navigate to http://yourip/torrentflux/

Then it will ask for user name and password the default password and username is-




yes its finished Now I think you can setup the basic things in torrentflux after you logged on! So enjoy and seed @ Piratebay! :P

I'm Ruchira Sahan and all posts on this blog are completely my thoughts and writings. I love DIY and Technology. So feel free to contact me for anything about this blog and don't forget to add a comment if this blog helped you! Thanks
View all posts by Ruchira

Last 5 posts by Ruchira

  • Anonymous

    Really well written tutorial. But I’d like to suggest you to introduce each program(Eg: Shell) and why it’s used at the point. So they can get a better understanding.

    • Admin

      Yes. but if people know whats a vps and own a vps. They should know whats Shell and SSH. I know its better to write “What is Shell” but in this situation its unnecessary. How ever thanks for your idea.

  • Anonymous

    I know. :) But there are still people out there who don’t have knowledge in the shell even they use VPS from big time. Most of them just use cPanel to administrate the server.(I know it’s not advanced. But they still do.)

  • Zippee

    I’m blocked to this step

    mysql -u root -pPassword: YOURPASSHEREmysql>create database torrents;mysql>q

    Keep saying : Access denied for user ‘root’@’localhost’ (using password: yes)

    I try to change my password. Still don’t work… What else can I try ?

    Thank you !

    • Ruchira

      Hello Zippee,
      Are you 100% sure that you are using correct password?

  • unruhe7

    I bave simular problem :(

    mysqladmin: connect to server at ‘localhost’ failed
    error: ‘Access denied for user ‘root’@’localhost’ (using password: NO)’

    Any solution ?

    • Ruchira

      Using password:NO means you didnt entered the password when prompting! Please use correct root password when prompted to do so!

      • unruhe7

        Thx for fast response.
        But I provide my root password…
        I paste:
        # mysqladmin -u root password myrootpassword

        And after this i have that message.
        Myrootpassword is for 100% correct…

        • lupetalo

          I have same problem, 100% correct pass and stil error
          Can you explain this line:
          mysql -u root -pPassword: YOURPASSHEREmysql>create database torrents;mysql>q

          no space or anything between “YOURPASSHERE” and “mysq”

  • tina

    I’ve been exploring for some time for that solid view in respect to the following subject . Checking in Yahoo I now noticed this blog post. Seeing this post I’m just seriously happy to pronounce that I’ve got a great impression I stumbled upon just what I needed. I’ll ensure to remember this website and look it over consistently.

  • imithFaisaTus

    Wow all I can say is that you are a great writer! Where can I contact you if I want to hire you?

    • Ruchira

      there is a contact form if you want to contact me! But im not open to writing jobs :)

  • ranpha

    This is a very good guide to set up a seedbox. Thanks :)
    I have it up on my VPS now.

  • Chocolateshirt


    very good tutorials..

  • dominic

    stuck at mysql -u root -pPassword: YOURPASSHEREmysql>create database torrents;mysql>q error 1045
    please help

    • Ruchira

      I think I have already answered this!

  • dominic

    it shows access denied for user roo @localhost with password (yes) error1045

    • Ruchira

      its root not roo

  • Passion

    hey ruchira i am stucked @ mysqladmin: connect to server at ‘localhost’ failed
    error: ‘Access denied for user ‘root’@’localhost’ (using password: NO)’
    please help me !

  • Unnikrishnan

    Hello, Ruchira

    Really nice work. I am going to try this in my centos VPS. I have already installed rutorrent, utorrent and transmission in same vpa, hope this too work on it..

    Thanks again

  • cowboyup910


    stuck here @
    mysql -u root -pPassword: YOURPASSHEREmysql>create database torrents;mysql>q

    I enter the password I created at this step:
    mysqladmin -u root password YOURPASSHERE

  • joe

    mysqladmin: connect to server at ‘localhost’ failed
    error: ‘Access denied for user ‘root’@’localhost’ (using password: NO)’

    i usung the correct pass, but why cant connect?
    pls teach me.

  • Dave

    I need help the whole install whent great for me no errors or anything just the problem im having is when i go to http://myip/torrentflux/ i get white screen and i’ve checked all the log files and there are no errors

  • Alexander McN


    I get python path is wrong but its correct ?


  • Usman


    I have setup and installed torrentflux on one of my vps hosted at budgetvm. The problem is when I upload a torrent file to download it fails specifically when the file was downloaded from and it shows connecting to peers when the file downloaded from other torrent site.

    Please reply and let me know how to solve this problem.

    Thank you.

    • Ruchira

      Well i didnt understood your question. Do you mean your downloads are failing?

  • Sarai

    Hello Ruchira.

    i done every thing Plz help me. server is up link is working. but when i upload torrent file on flux file is not start downloading. That point front of torrent file appear RED. Please help me sir.

    Thank you

    • Ruchira

      maybe a tracker problem? Also restart the server and try again

      • Sarai

        tracker good .. download on my desktop working fine. and ill also download many times. can i give you my path and login details can you please check ones.

Previous post:

Next post: