In this tutorial I will attempt to explain how to turn your Raspberry Pi in a
media SERVER to stream media to your home network or even remote network.
This setup will allow the following:- -> Stream movies/photo's/music TO your home network and remote network.
-> Stream to any device (PC/laptop/XBMC/WD Live/Popcorn/Android/...)
-> SRT support for movies
-> HD support
-> Using samba share and FTP share methods
You will need:- -> Raspberry Pi with the latest Raspbian image installed http://www.raspberrypi.org/downloads
-> internet connection to your PI
-> External USB HDD with media content (ordered in seperate folders)
-> Another device to stream the content to such as a laptop,media box, ...[/url]
Let's get startedYou can use SSH to acces your terminal on the RPI from another device or use the terminal on the device itself by using a monitor/keyboard with the RPI.
In your terminal type the following:
Update your Repo's
If you are going to use a NTFS based external hard drive (most are) (TIP: ext4 file systems are the fastest)
Now insert your usb hard drive in the RPI and wait untill it gets mounted. If it's mounted type the following
A list of installed hard drives will appear. Write down your external HD's location. Mine was
/dev/sda1. Type the following commands. (You might want to CHMOD your HDD folder permissions if you get permission errors later)
Code: Select all
cd /media
sudo mkdir HDD
sudo nano /etc/fstab
A file will open, on the bottom of the file type the following and then
exit and save the file (ctrl+x, Y, enter, enter). Remember to replace /dev/sda1 with your HDD location. Also replace ntfs-3g with vfat if your have a fat based HDD or ext4 for a ext4 filesystem. Whitespaces are
TABSCode: Select all
/dev/sda1 /media/HDD ntfs-3g defaults,noatime 0 0
Back in terminal, type these commands
Code: Select all
sudo umount /dev/sda1
sudo mount /dev/sda1
Your external Hard drive should now always be mounted in the folder HDD. So far so good, now lets install samba and vsftpd.
Code: Select all
sudo apt-get install samba samba-common-bin
sudo apt-get install vsftpd
sudo apt-get install hdparm
sudo hdparm -S 240 /dev/sda1 ##DO THIS onLY if you want to spindown your external hard drive when it's inactive for 20min,