Hello,
As this is my first thread on TI (I am proud to to a member though) I would attempt to create a quick step-by-step tutorial on how to setup your own Linux seedbox that's more powerful than its Windows equivalents.
First of all, you need a PC or MAC whatever you have and a Ubuntu Linux ( I prefer Ubuntu over CentOS as I find it more user-friendly)
1) download Ubuntu iso from: http://releases.ubuntu.com/jaunty/ub...erver-i386.iso
2) Burn it to a DVD (https://help.ubuntu.com/community/BurningIsoHowto)
3) Install it on your computer (if you need help in the section please ask your question, I am happy to help otherwise refer to the standard documentation)
4a) If your network is DHCP (your IP address is automatically assigned) than you don't need to manually configure the network, your server is ready to go.
4b) If you have a static IP network you need to setup an IP address for this box during the installation, you will be asked.
5) You can say yet to almost everything, don't worry if you make mistakes, more you do more you learn :)
Well done, you have successfully installed your new Ubuntu server, your next step is to install rtorrent
6) Login with your username into your account.
7) Install rtorrent: # sudo apt-get install rtorrent screen php5-cli php5-curl
say yes to any question
Okay, you are good to go with seeding stuffs 24/7 with your box, but how you download the .torrent files in text based Linux? Simple!
There's a program called wget what it does it simply leeches a given url for example:
# wget http://*****.be/download.php/122472/...D-iMBT.torrent
You problably receive this:
2009-09-22 07:42:30 (2.93 MB/s) - `login.php?returnto=/download.php/122472%2 F%5BbHUm_%23122472%5DStar_Trek_DVDRip_XviD-iMBT.torrent' saved [2485]
What happened? Your request was redirected to the login page since the wget did not send any session cookies to the tracker obviously it did let you to download the stuff.
How can we send the cookies and how I can obtain one?
If you are familiar with PHP there's a little script you can use to get the session cookies from the tracker:
Now you have the right cookies in /tmp/my_cookies.txtCode:<?php $user = "username"; // set your username $password = "password"; // set your password getcookie(); function getcookie () { global $user, $password; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,"http://****.be/takelogin.php"); // replace the *****.be with your tracker's name curl_setopt($ch, CURLOPT_POSTFIELDS,'rembember=on&password='.$password.'&returnto=/&username='.$user); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_HEADER, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_COOKIEJAR, "/tmp/my_cookies.txt"); curl_setopt($ch, CURLOPT_COOKIEFILE, "/tmp/my_cookies.txt"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3"); echo curl_exec($ch); curl_close ($ch); } ?>
Ok, let's make WGET aware of this file now.
Let's try now:
Specifing a cookie file using a switch:
# wget --load-cookies=/tmp/my_cookies.txt http://*****.be/download.php/122472/%5BbHUm_%23122472%5DStar_Trek_DVDRip_XviD-iMBT.torrent
Saving to: `[bHUm_#122472]Star_Trek_DVDRip_XviD-iMBT.torrent'
[ <=> ] 34,215 --.-K/s in 0.1s
2009-09-22 07:57:11 (315 KB/s) - `[bHUm_#122472]Star_Trek_DVDRip_XviD-iMBT.torrent' saved [34215]
Yeah, you now have it downloaded. You can make it even quicker if you create .wgetrc file in your home folder:
Specifing a cookie file using a config file:
# cd ~
# echo "load_cookies = /tmp/my_cookies.txt" > ./.wgetrc
# wget -
2009-09-22 08:43:28 (324 KB/s) - `[bHUm_#122472]Star_Trek_DVDRip_XviD-iMBT.torrent.2' saved [34215]
I assume you have a basic knowledge on using screen, if you don't let me show quickly what it's good for:
It's not very well known to many people I mention it to but its one of those programs that you just can't stop using once you've started. Yes, I use screen on a regular daily basis and it’s really easy to use.
I know someone who says the only reason they invented X was so that you could use more virtual terminals. I think the real solution behind great command line multitasking is screen!
Here are some basic usage tips.
To start a command line based program within a virtual ’screen’ prefix that command with screen, such as:
# screen rtorrent
Once that has loaded you can detach the virtual screen for later use by pressing ctrl-a d. To reattach that screen type screen -r (or, if the screen was somehow not completely detached previously you would use screen -dr).
To start using rTorrent please see the basic functions of it here: RTorrentUserGuide – The libTorrent and rTorrent Project
You have reached the end of this tutorial, if you have any suggestions to make this a bit more detailed please share your thought with us.
Any questions are welcome.
I can give away two account to anyone who wants to play with rtorrent and ssh, please PM me.
Cheers.









LinkBack URL
About LinkBacks
Reply With Quote



