![]() |
|
|
#1 (permalink) | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Extreme User
Join Date: Oct 2007
Location: near me
Posts: 2,770
Thanks: 55
Thanked 175 Times in 115 Posts
Rep Power: 5 ![]()
|
This guide is currently a work in progress. If you notice any errors, inaccuracies or know a better way of accomplishing what I am trying to explain please PM me or comment below.
Things to Fix - Grammar - ... Index 01. Credits 02. Initial Configuration 03. libtorrent, rTorrent & xmlrpc-c 04. rutorrent 05. Updating & Patching 06. rutorrent Plugins 07. apache 08. vnStat & PHP Frontend 09. vsftpd 10. Security 11. Troubleshooting I need to credit various sources on the internet for giving me the knowlegde I needed to write this. A few months ago I knew nothing about configuring a server and everything I have learned has been from these people/sources. Thanks go to naq, EmEyKeYwAy & scribe. I have also used Google and all of the software developers websites as well as lots of patient IRC dwellers' help. Initial Configuration This guide assumes you know a small amount about Linux and using the command line. Having said this nothing we will do is very hard and I will make every effort to explain each step. ![]() I assume you will begin with a stock standard Debian server install but pretty much any version of Debian and its derivatives (Ubuntu etc...) will work just fine. The principles of what I am doing will apply to any distribution of Linux although the commands and file locations will differ. At the end of this guide you will have a server running the latest version of rTorrent with apache serving the latest version of rutorrent. I'll also provide instructions for compiling vsftpd, a light and secure FTP server. This guide will also cover some basic security measures you can take to harden your server against bots and hackers. You will need root access to your server, be it at home or somewhere else. We will do most of what follows as root. Be careful as you can cause mayhem! I will assume you are interfacing with your seedbox using PuTTY (above) or a similar SSH client. I have placed the commands you need to input in [ quote] [ /quote] tags. You can literally copy and paste these into PuTTY. Note that the '#' or '$' preceding each command are not part of the command. '#' denotes that the command is done as root and '$' means it is executed as a normal user. Don't include it when you copy and paste! Each command has its own set of tags so you don't get confused and try to run two commands at once. Handy Hint: The default 'paste' command in PuTTY is right click. Ctrl V will not work. First off lets make sure we are up to date. Quote:
![]() ![]() Quote:
Quote:
![]() You will need to agree to any dependancies these packages may have and depending on the server's connection to the internet installation may take several minutes. If you have no users on your system you will need to create a new one to run rTorrent. A note on rTorrent and rutorrent; they are both designed as single user systems which means that if you are setting up a box to resell or even just to share you will need to either run multiple instances or rTorrent and rutorrent (one per user) or simply have everyone use the same instance and make use of rutorrent's labelling system. I believe the latter is better for conserving system resources but the downside is that each user will be able to see what the other is downloading and the WebUI can become quite cluttered depending on the number of users. I will provide a guide detailing how to configure a single user system which multiple users can use. If demand is high, I will add an example of how to setup a server running multiple instances of rTorrent and different versions of rutorrent for each user. Quote:
![]() You will be asked for some random information about your user. You can add whatever information you'd like. Now we'll create the needed directories. Quote:
Quote:
Quote:
Quote:
Quote:
![]() You're now ready to install rTorrent. libtorrent, rTorrent & xmlrpc-c Now we will compile the latest versions of libtorrent and rTorrent. rTorrent can also make use of xmlrpc-c as well so we'll compile it too. I usually compile software in /usr/local/src/ but where you compile source is up to you. xmlrpc-c Quote:
![]() Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
![]() Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
![]() Quote:
Quote:
Quote:
After all that we should update some shared libraries: Quote:
![]() Update the system libraries. Quote:
Quote:
![]() There are several dozen options you can play with in rTorrent. Take a look over here for the full list. Here is an example rTorrent configuration file. You can copy and paste it into nano if you'd like. [quote]# SCGI Settings scgi_port = 127.0.0.1:7001
__________________
Oi! Oi! Oi!
Last edited by puroi; 11-15-2009 at 08:27 PM. |
||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
|
|
#2 (permalink) | ||||||||||||||||||||||||||||||||||||||||
|
Extreme User
Join Date: Oct 2007
Location: near me
Posts: 2,770
Thanks: 55
Thanked 175 Times in 115 Posts
Rep Power: 5 ![]()
|
# General Settings
bind = SERVER.IP.ADDRESS ip = SERVER.IP.ADDRESS port_range = 60450-60460 port_random = no encoding_list = UTF-8 check_hash = no directory = /home/USERNAME/downloads session = /home/USERNAME/.rtorrent/session encryption = allow_incoming,try_outgoing,enable_retry peer_exchange = no schedule = watch_directory,5,5,load_start=/home/USERNAME/watch/*.torrent schedule = low_diskspace,5,60,close_low_diskspace=500M schedule = untied_directory,5,5,stop_untied= # Throttle Settings upload_rate = 0 download_rate = 0 min_peers = 1 max_peers = 256 min_peers_seed = 1 max_peers_seed = 256 max_uploads = 64 max_uploads_global = 64 max_downloads_global = 64 # Tracker Related Settings enable_trackers = yes use_udp_trackers = yes dht = disable # Extra Settings #schedule = tied_directory,5,5,start_tied= #schedule = untied_directory,5,5,close_untied= #on_start = link1,"create_link=tied,,.started" #on_stop = link1,"delete_link=tied,,.started" #on_finished = link1,"create_link=tied,,.finished" #on_erase = link1,"delete_link=tied,,.finished" #schedule = low_diskspace,5,60,close_low_diskspace=500M #schedule = ratio,60,60,"stop_on_ratio=1020,9000M,9000" #on_erase = rm_complete,"execute=rm,-rf,--,$d.get_base_path="[/quote] There are several options you will need to configure. They are marked in red. The other options listed can also be configured as you like. The port range you use is up to you but keep in mind that the default bittorrent port range is not permitted to be used on most trackers. Generally somewhere in between 49152 - 65535 will do for most private sites. The text in 'Extra Settings' is commented out but there are some powerful commands you can add to rTorrent to customise it. Read more over at the author's site. The throttle settings are pretty much default and can be adjusted to suit your hardware and connection. rutorrent Now we will install rutorrent, a WebUI to rTorrent. There are several different web user interfaces available for rTorrent but I prefer rutorrent. You can check out wtorrent, rtgui and ntorrent but I won't offer support for them. Navigate to the directory that apache can see (the default is /var/www/) and grab the latest build of rutorrent. Quote:
![]() Quote:
Quote:
![]() Edit the line which includes RPC_TIME_OUT and change it to 15000. This simply cuts down on the number of messages which are logged to rutorrent about timeout requests (it can become annoying). Next, edit the line starting with $scgi_host and change it to the same port as you set in the rTorrent configuration file. It is very important these numbers are the same and that you remember this number for later when we configure apache. Updating & Patching libtorrent & rTorrent If a new release of rTorrent is released and you need/want to upgrade (make sure TehConnection has whitelisted it first!) all you need to do is navigate to the source directory and update: Quote:
Quote:
rutorrent If you ever need to update rutorrent you can simply issue these commands from the directory rutorrent is installed in (/var/www/rtorrent/): Quote:
At times the developers and testers will find issues with rutorrent and issue a patch to correct it. These patches can often be useful and waiting for the next release takes a while. This page shows how to add patches to software in Linux. rutorrent Plugins There are many plugins available for the rutorrent frontend which offer enhanced functionality. You can view these here. I'll update this guide as I experiment with them and recommend the better ones. If you have any experience with any of these plugins please PM me and I'll add extra info. apache Now we need to enable SCGI in apache. This is so rTorrent and rutorrent can communicate. There is a plugin for rutorrent which accomplishes this but I have not tested it and from what I have heard my method provides better performance for now. Copy over the SCGI mod to enable it in apache. Quote:
Quote:
![]() Restart apache so the changes take effect: Quote:
![]() Because we have been editing and creating files as root our file permissions will be slightly borked. Lets fix that. Quote:
Quote:
![]() Quote:
![]() If you get an error "[screen is terminating]" there is most likely an error with the rTorrent configuration file or rTorrent itself. You can take a look at the file as your user by simply typing: Quote:
http://IP.ADDRESS.OF.YOUR.SERVER/rtorrent/ - If your host has given you a URL (some.server.net) then that will work as well. If everything loads nicely then all has gone well. ![]() Authentication You might have noticed that we were able to browse directly to the rutorrent page without having to enter any kind of password. Unfortunately rutorrent does not have any kind of authentication system. To protect our WebUI we will need to make apache ask for a password. On top of this I have also decided that I will explain how to use ssl for communicating with apache (https). This is because the username and password will be sent in clear text and anyone sniffing your packets will be able to grab the credentials otherwise. First off, lets create ourselves a self-signed certificate. We need this to use encryption but unfortunately browsers will throw up exceptions to self-signed certificates. There is nothing wrong with them it is just that they cannot be verified by a third party Certificate Authority (CA). You would do well to not trust any self-signed certificates unless you trust the website owner. Since that owner is yourself we are going to be OK. Generate a key for the Certificate Signing Request (CSR): Quote:
Now we'll use our new key to create the CSR proper: Quote:
Now we'll create the certificate: Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Lets create the password file and then reboot apache and see if its all running smoothly. Quote:
Quote:
Quote:
Quote:
https://IP.ADDRESS.OF.YOUR.SERVER/rtorrent/ vnStat vnStat is a handly little program which keeps a record of your bandwidth usage by the server. It works by monitoring the network interface and can display the statistics via the commandline even in realtime. This is useful to us but for those who can't be bothered firing up PuTTY for something like this there is a useful little frontend you can install so you can monitor bandwidth from your browser.
__________________
Oi! Oi! Oi!
Last edited by puroi; 11-15-2009 at 08:29 PM. |
||||||||||||||||||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||||||||||||||||||
| The Following User Says Thank You to puroi For This Useful Post: | Tektonik (11-15-2009) |
|
|
#3 (permalink) | ||||||||||||||||||||||||||||||||||||||||||||||
|
Extreme User
Join Date: Oct 2007
Location: near me
Posts: 2,770
Thanks: 55
Thanked 175 Times in 115 Posts
Rep Power: 5 ![]()
|
Lets grab the source for vnStat and get it running and configured:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
If you see some data on the page then all is well! You can edit the other PHP files if you don't want to have the other interfaces appear or if you want a different colour scheme. vsftpd vsftpd is my favourite FTP daemon. It is light and secure and is able to provide encryption. Pretty much everything you could need. Remember that even during encrypted FTP sessions only the command channel is encrypted. The data channels remain unencrypted so anyone who is sniffing can see what is transferred. For the most secure possible session investigate rsync/sFTP over SSH. If you'd prefer another FTPd then you can also check out Pure-FTPd or ProFTPD. Lets grab the vsftpd source. Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Security Most of this information can be found in other places but as I have time I will add it here; probably in different tutorials as this one is long enough already. To Add: Changing the FTPd and SSHd port. Authorized Keys. Limit number of SSHd connection attempts. Limit root login. Configuring iptables. PortSentry (listen on 21 & 22 to see who tries to connect). rsync/sFTP over SSH (completely encrypted file transfer). Troubleshooting Common Problems Coming soon...
__________________
Oi! Oi! Oi!
|
||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||
|
|
#4 (permalink) | ||||||||||||||
|
Extreme User
Join Date: Feb 2008
Posts: 1,173
Thanks: 218
Thanked 69 Times in 62 Posts
Rep Power: 4 ![]()
|
Sunt noob total in linux adr nu inteleg ce faci prin tutorialu asta?
Iti transformi PC-ul itr-un seedbox? e deja ca un seedbox De unde banda mare sau alt calculator ca la seedbox? Nu va luati de mine prea urat , nu prea le am cu astea
|
||||||||||||||
|
|
|
||||||||||||||
|
|
#5 (permalink) | ||||||||||||||
|
Power User
Join Date: Dec 2007
Location: ™
Posts: 738
Thanks: 62
Thanked 54 Times in 29 Posts
Rep Power: 3 ![]()
|
Pai, cum spune si titlul threadului, iti faci propriul seedbox. De exemplu, daca ai un server dedicat cu banda buna si nu vrei sa iti iei un seedbox(care e si el un server dedicat dar care are aceste aplicatii deja instalate), urmezi tutorialul acesta si ai un seedbox.
E interesant tutorialul dar ce m-ar interesa pe mine, e partea care il face practic un seedbox; partea in care downloadeaza si uploadeaza automat, mai repede ca un client torrent cu rss-ul setat. @puroi: poate ma iluminezi si pe mine cu aceasta treaba, continuand tutorialul cu ce am scris eu mai sus |
||||||||||||||
|
|
|
||||||||||||||
| The Following User Says Thank You to TheJudge For This Useful Post: | tripl3x |
|
|
#6 (permalink) | ||||||||||||||
|
Extreme User
Join Date: Oct 2007
Location: near me
Posts: 2,770
Thanks: 55
Thanked 175 Times in 115 Posts
Rep Power: 5 ![]()
|
Configuring a Debian Server As a Seedbox
Nu l-am facut eu. O sa va tin la curent cu ce modificari i se mai aduc tutorialului, desi daca cititi atent si va luati dupa acest tutorial, trebuie sa reusiti, de unde l-am luat are comentarii ca ar fi reusit cei care au incercat.
__________________
Oi! Oi! Oi!
|
||||||||||||||
|
|
|
||||||||||||||
|
|
#7 (permalink) | ||||||||||||||
|
Power User
Join Date: Dec 2007
Location: ™
Posts: 738
Thanks: 62
Thanked 54 Times in 29 Posts
Rep Power: 3 ![]()
|
Nu contest faptul ca nu ar fi bun tutorialul, dar tot ce reusesti sa faci cu serverul dupa ce ai urmat tutorialul e sa iei torrent prin intermediul serverului, sa te conectezi remote la el, sa il controlezi remote si sa iei fisiere de pe el prin intermediul ftp-ului. Nicaieri in tutorial nu scrie despre upload si download automat folosind IRC-ul, ceea ce ma intereseaza pe mine si ceea ce nu stiu sau nu am cautat destul de mult...
|
||||||||||||||
|
|
|
||||||||||||||
|
|
#8 (permalink) | ||||||||||||||
|
Extreme User
Join Date: Oct 2007
Location: near me
Posts: 2,770
Thanks: 55
Thanked 175 Times in 115 Posts
Rep Power: 5 ![]()
|
To Add:
Changing the FTPd and SSHd port. Authorized Keys. Limit number of SSHd connection attempts. Limit root login. Configuring iptables. PortSentry (listen on 21 & 22 to see who tries to connect). rsync/sFTP over SSH (completely encrypted file transfer). |
||||||||||||||
|
|
|
||||||||||||||
|
|
#9 (permalink) | ||||||||||||||
|
Global Moderator
Join Date: Oct 2007
Location: RO
Posts: 1,472
Thanks: 0
Thanked 401 Times in 180 Posts
Rep Power: 4 ![]()
|
Sau varianta prescurtata:
Plateste 15-20$ in plus pentru server cu Windows 2003 web sau Windows 2008 Sau fa-ti tu sistem acasa pe care instalezi Windows, orice versiune. Instaleaza uTorrent pe el si logheaza-te pe sistem folosind Remote Desktop Connection. Problem solved.
__________________
|
||||||||||||||
|
|
|
||||||||||||||
|
|
#11 (permalink) | |||||||||||||||
|
Extreme User
Join Date: Oct 2007
Location: near me
Posts: 2,770
Thanks: 55
Thanked 175 Times in 115 Posts
Rep Power: 5 ![]()
|
Quote:
primu pe pagina:P |
|||||||||||||||
|
|
|
|||||||||||||||
|
|
#13 (permalink) | ||||||||||||||
|
Senior User
Join Date: Dec 2007
Posts: 284
Thanks: 34
Thanked 24 Times in 15 Posts
Rep Power: 3 ![]()
|
Nu este ceva foarte complicat, e treaba de copy paste daca stati si va uitati.
Totul este ce sa faceti atunci cand intampinati vreo eroare. Celor care au ca sistem de operare Ubuntu, exista un "installer", care instaleaza si WebUI nemaifiind necesar toti pasii din acest tutorial. |
||||||||||||||
|
|
|
||||||||||||||
|
|
#14 (permalink) | |||||||||||||||
|
Global Moderator
Join Date: Oct 2007
Location: RO
Posts: 1,472
Thanks: 0
Thanked 401 Times in 180 Posts
Rep Power: 4 ![]()
|
Spuneti voi unui user sa scrie asta in linie de comanda:
Quote:
De exemplu stau si ma uit si ma mir de ce ar avea nevoie rTorrent de libcurl3 SI libcurl4 care fac acelasi lucru, libsqlite SI libmysql SI sqlite (pai ori una ori alta), postfix (mail server pt rTorrent? ), ntp si ntpdate (la ce trebuie time server?), perl, perl-modules si php5 (pai folosesti perl sau php5, sunt doua limbaje de scripting diferite)... Si daca totul ar merge brici ar fi minunat dar din pacate in realitate nu se intampla asa, ci o sa vezi cum downloadeaza jumatate din programe, le compileaza si le copiaza in directoarele care trebuie si apoi la jumatatea procesului incearca sa descarce de pe un ftp un pachet si da timeout ftp-ul sau daca nu da timeout iti raporteaza scriptul o eroare de genul "ai descarcat libpcre3 care are nevoie de apache 2.0.x dar tu ai instalat automat cu apt-get apache2.2-common dar daca dezinstalezi apache2.2 si pui apache2.0 nu o sa mai mearga libapache2-mod-php5 pentru ca apache2.0-common se pupa numai cu libapache20-mod-php5" si turbezi langa calculator. Da, nu spun ca nu e extrem de eficient si ca poti face minuni in linie de comanda dar e ridicol cat de mult trebuie un om normal sa butoneze si sa bage comenzi si se presupune ca trebuie sa stie anumite lucruri. Esenta la tot tutorialul ala este asta: Ai nevoie sa * instalezi un server Apache care e serverul prin care te vei putea conecta la interfata web a lui rTorrent * instalezi un pachet SSL si configurezi certificat SSL ca sa mearga cu Apache ca accesul la interfata rTorrent sa fie criptat * adaugi un user pentru ca nu e bine sa rulezi rTorrent ca root * instalezi rTorrent * instalezi un server FTP ca sa poti transfera fisierele pe calculator. Asta e tot ce e de facut dar e ingrozitor cat de multi pasi sunt pt asta. FreeBSD e mult mai smecher cu pachete gata compilate dar tot iti mai prinzi urechile din cand in cand.
__________________
Last edited by Penemue; 11-17-2009 at 03:35 AM. |
|||||||||||||||
|
|
|
|||||||||||||||
|
|
#15 (permalink) | |||||||||||||||
|
Power User
Join Date: Dec 2007
Location: ™
Posts: 738
Thanks: 62
Thanked 54 Times in 29 Posts
Rep Power: 3 ![]()
|
@Penemue: Sunt de acord cu tine in tot ceea ce ai spus mai sus, dar un utilizator care e obisnuit cu linia de comanda nu va considera toate acestea decat o jucarie care are mai mult sau mai putin pana a fi finalizata
![]() Quote:
|
|||||||||||||||
|
|
|
|||||||||||||||
|
|
#16 (permalink) | ||||||||||||||
|
banned
Join Date: Oct 2007
Location: Somwhere hot
Posts: 1,792
Thanks: 31
Thanked 184 Times in 81 Posts
Rep Power: 4 ![]()
|
rtorrentul nu se instaleaza pe debian fara putin ajutor. am uitat exact care fisier era cu probleme.
iar rtorrent pe debian x64 e si mai complicat. |
||||||||||||||
|
|
|
||||||||||||||
|
|
#17 (permalink) | ||||||||||||||
|
Junior User
Join Date: Nov 2007
Posts: 54
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 3 ![]()
|
Asta cu rtorrent e cam complicat...
Cel mai simplu si mai usor e sa instalezi Torrentflux-b4rt Torrentflux-b4rt - A BitTorrent and Internet Transfer Web Control Application Si pt ca intreaba unii unde sa-l folosesti, eu de exemplu am un VPS pe care imi tin site-urile dar si un seedbox Oricum e un tutorial foarte bun si folositor !
Last edited by Fynnon; 01-16-2010 at 07:38 PM. |
||||||||||||||
|
|
|
||||||||||||||
![]() |
| Thread Tools | |
| Display Modes | |
|
|