VSIDO Community

VSIDO Support => Scripts and How To's => How To's => Topic started by: dizzie on March 10, 2016, 04:02:13 PM

Title: HOWTO Setup a file/media/torrent- server
Post by: dizzie on March 10, 2016, 04:02:13 PM

How to setup that old ancient/obsolete computer of yours, into a powerful and fully fledged
fileserver, media server, torrent downloader in less than 20min (ish)

1. Check the hardware, to actually see if the hardware still works (a live cd will do)
2. Install VSIDO or Debian, or whatever really, NO! Not Wintendo please :)

I'll go along using my own hardware/experience in this guide

Inxi spam below

Code: [Select]
Machine:   Mobo: ASRock model: C70M1 Bios: American Megatrends v: P1.30 date: 05/16/2014
CPU:       Dual core AMD C-70 APU with Radeon HD Graphics (-MCP-) cache: 1024 KB
           clock speeds: max: 1000 MHz 1: 1000 MHz 2: 800 MHz
Network:   Card: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller driver: r8169
           IF: eth0 state: up speed: 1000 Mbps duplex: full mac: <filter>
Drives:    HDD Total Size: 2320.5GB (84.9% used)
ID-1: /dev/sda model: ST31000528AS size: 1000.2GB
ID-2: /dev/sdb model: ST1000DM003 size: 1000.2GB
ID-3: /dev/sdc model: ST9320325AS size: 320.1GB
This mainboard is so low power, so it's not even funny. On full load (CPU 100%) it uses 7 watt :)

Use what drives you have, and since it's mainly a fileserver, i used JBOD/LVM to create one single partition:

/dev/mapper/nas-share  2.1T  1.8T  184G  91% /

Secure? Not much. Reliable? Pretty much

7:03AM  up 307 days, 15:45,  1 user,  load average: 0.00, 0.01, 0.05
Ok, enough showing off, let's get cracking!

1. Install, reboot, apt-get update, etc etc (you know the drill?)

2. NFS
   1. # apt-get install nfs-kernel-server nfs-common rpcbind
   2. Create a dir to share (/share is a good option)
   3. Edit /etc/exports:
Code: [Select]
/share          *(rw,sync,no_subtree_check)   4. Save the file (^X)
   5. type as root "exportfs -a"
      Check on your desktop if it is working: "showmount -e <ip of server>"
      *** If not, rpcbind can be a bit of a b***, so a reboot might be needed (was in my case)
   6. fstab time!
      Edit your fstab on your desktop : This is what mine looks like (change to match yours)
Code: [Select]       /mnt/share      nfs4        rsize=8192,wsize=8192,timeo=14,_netdev      0   0   7. Save/exit
   8. type as root (mount -a) to test if it works (df -h)
   9 If it does, great :)

3. Samba
   1. # apt-get install samba samba-client
   2. I use the same share as with NFS, why? Cause I can, and cause it works for me :)
   Do something like this in your smb.conf in /etc
Code: [Select]
path = /share
browseable = yes
available = yes
public = yes
writable = yes
force user = <user>
create mask = 0644
directory mask = 0755
   3. Save and exit
   4. # smbpassword -a <user>
   5. restart samba
   6. check on Wintendo machine if the share shows up (it should!)

4. Plexmedia server
   1. # echo "deb http://shell.ninthgate.se/packages/debian wheezy main" >> /etc/apt/sources.list
   2. # curl http://shell.ninthgate.se/packages/shell-ninthgate-se-keyring.key | sudo apt-key add -
   3. # apt-get update
   4. # apt-get install plexmediaserver
   5. Plex can then be found at http://<ip>:32400/web
   ** Refer to plex doc for setting it up ( https://support.plex.tv/hc/en-us/articles/200264746-Quick-Start-Step-by-Step )
5. Torrent downloader
   1. I use the deluge webinterface
   2. Install deluge-web
   3. Run 'deluge-web' in a screen (I am lazy! Bite me lol)
   4. Open http://<ip>:8112/
      password is : deluge

6. What else? Really up to you, an ftp server maybe (I prefer ssh/sshfs/sftp)

!!NB: This is a rough and simple guide/howto, If you need a more through and through guide, i'll be happy to help with that. Just wanted to share what i've been using for almost a year by now.

And the obligatory screen-shot-or-it-didn't-happen below :)

(http://s23.postimg.org/dahesg0br/server.jpg) (http://postimg.org/image/dahesg0br/)

This is about a 1ft tall ITX case, and 99% silent. Can only hear it if I sorta stick my head all the way down there. :)

Title: Re: HOWTO Setup a file/media/torrent- server
Post by: PackRat on March 10, 2016, 06:06:35 PM
Nice write up; I have an old desktop and been procrastinating doing this.

One question -

Code: [Select]       /mnt/share      nfs4        rsize=8192,wsize=8192,timeo=14,_netdev      0   0
That ip address for real, or an example? If real, you have this server on it's own router/subnet or something like that?
Title: Re: HOWTO Setup a file/media/torrent- server
Post by: dizzie on March 10, 2016, 06:23:07 PM
Yes it's real :) 10.0.0.* is faster to type than 192.168.* :D