Here is a simple how-to-guide on setting up Ktorrent on Debian and Centos System with KDE GUI interface. A Simple Guide to getting rid of boring SSH Terminal for those new to linux boxes.
First of all lets setup the tool and gui itself to remote login using interface of the server.
SSH into your server first, using tools like Putty. Login as root, using su – command if you are not already logged in as root.
apt-get update apt-get install kde x-window-system vncserver
Start up your vncserver now using command: Please note you can change BloggyBloggy.com name to w/e u like, and resolution from 1280×1024 to w/e really works for you. Please use x for the multiple there, cause if you copy paste this code directly it will not work so remember to change the x in the 2 numbers.
To change password for vncserver ever again in case you forget just type vncpasswd and you will be all set
vncserver -geometry 1280x1024 -depth 24 :1 -name BloggyBloggy.com
This will ask you for a password, and then create your ~/.vnc directory (if running as root, it will be in /.vnc or /root/.vnc or /home/root/.vnc).
cd / mkdir softsdownloads cd softsdownloads wget http://www.configserver.com/free/csf.tgz tar xzf csf.tgz cd csf sh install.sh cd /etc/csf nano csf.confg
Setup a firewall like CSF (i like this and is easy to configure and handle and does not cause much loads). Type and do as below:
Add port 5901 for vncserver to work, and later on can add w/e ports you want.
# Allow incoming TCP ports TCP_IN = "20,21,22,25,53,80,110,143,443,5901,465,953,993,995" # Allow outgoing TCP ports TCP_OUT = "20,21,22,25,53,80,110,5901,113,443,953,9999"
How do you login to server using GUI ?
Simple, download VNCviewer from http://www.realvnc.com/products/free/4.1/download.html
and download this file : VNC Free Edition Viewer for Windows Stand-alone Viewer Version 4.1.2 (do not enter anything in fields just proceed to downloads)
Than simply execute and in the Server Field type serverip:1 remember, to use :1 after the ip, as it specifies the desktop/session window,enter you password you setup for vncserver and for first time you run it, a configure menu for kde should be there, just skip it or just set it up.
Now for Ktorrent Installation
Run the following commands if on Debian or ubuntu you use
apt-get install packagename to install the package and to search for package you type apt-cache search packagename.
For centos after this is a small guide attached for the same, only difference is you use yum install command to install and yum search to search.
Anyways back to installation of Ktorrent on Debian.You can do this via VNCserver using terminal program, but using putty/ssh is way faster and easier.
Still logged in as root or su (super user) type and proceed as below.
apt-get -y install subversion libapache2-svn /etc/init.d/apache2 reload
For Debian/ubuntu setup, you will need libraries and other bunch of stuff…. for that execute the following.
apt-get -y install kdelibs-dev libsoqt-dev kdebase-dev libgmp3-dev kdelibs4-dev libgmp3-dev qt3-dev-tools firefox autoconfg automake gcc-4.1 gcc-3.3 gobjc g++ rpm
Now here is how to install Ktorrent after above command has successfully executed.
(This install steps are directly from http://ktorrent.org/index.php?page=faq )
Please make a directory called ktorrent to anywhere you like on /root or in any place like say /home
Simply do cd / to go to root folder and cd /home to go to home folder, and make folder using /mkdir ktorrent to your location, where
you want ktorrent to be installed, for tutorial sake i installed it in /root/softdownloads/ktorrent. Same place where you downloaded the CSF firewall above !!
Now once you are in your ktorrent folder using cd ktorrent/ command. Proceed as below and type :
svn co svn://anonsvn.kde.org/home/kde/branches/extragear/kde3/network/ktorrent cd ktorrent svn co svn://anonsvn.kde.org/home/kde/branches/KDE/3.5/kde-common/admin/ svn cat svn://anonsvn.kde.org/home/kde/branches/extragear/kde3/network/Makefile.cvs > Makefile.cvs ./configure make
At the .configure step if errors pop up google them up , but with the process as define above, i have taken care of all the errors, so you should get 0 errors.
Setup your ktorrent now using vncserver, location of ktorrent executable/shell scrip should be in cd /softsdownloads/ktorrent/apps/ktorrent/ (this for tutorial sake only if you used diffrent folder for making ktorrent folder, go browse to that folder) run this file : ktorrent it should
have an icon with a dos kinda command window (black window) and should read shell script when you hover your mouse over it.
You can if you want copy the file to desktop by right clicking on it and copying it to desktop, do not use move.
And you are all setup Now configure it and its ports and you are good to go. You can save all your downloaded file to w/e folder you want, be it on /home or anywhere you want. If you want files http downloaded, put them to folder where you got apache html files rendered from.
Just a small note, do not kill the session or logout using the logout command from startup menu thingy, just close VNCViewer,and you are all done. Ktorrent will keep running on your server, and you can connect back to it, using vncviewer again as stated above on how to connect using vncviewer.
Also, Usually ports 12123:18000 works for me on the firwall setting in tcp/udp in and out both. So it would look like
# Allow incoming TCP ports
TCP_IN = “20,21,22,25,53,80,110,143,443,5901,465,953,993,995,12123:18000″
and so on, that is port range is defined using portstart:portend
To edit ports type nano /etc/csf/csf.conf while logged into terminal as su or root. And remember to restart csf using csf -r command.
You would also want to setup ipblock (same as peerguardian) if running server for files that are deemed illegal. Or if you just want to prevent gov. ips etc. snooping at your server.
I might publish how to install ipblock guide in a day or 2 if you guys want.
Now you can even browse using built in Kde Explorer, to install flash just go to speedtest.net once and hit the upgrade client link and it will take you to correct, site,download the RPM package and save it to desktop and using ssh or terminal while in Desktop folder type : rpm -i fileudownloaded.rpm . If bunch of errors pop up google them up to get rid of Or i might write up more on setting up firefox properly !!
For centos/fedora use yum instead of apt-get, and use this before installing ktorrent. yum -y install kdelibs-devel.i386 qt-devel kdebase3-devel xorg-x11-devel firefox gmp.i386 libkdebase4-devel kdelibs-devel.i386 libgmp3-dev avhi-qt3-devel