[su_button url=”https://trendblog.net/install-raspbian-sd-card-os-x-windows/” style=”flat” background=”#00aeef” size=”5″ center=”no” radius=”0″]<– PART 2[/su_button] [su_button url=”https://trendblog.net/how-to-mount-your-media-server-or-nas-drive-to-a-raspberry-pi/” style=”flat” background=”#00aeef” size=”5″ center=”no” radius=”0″]PART 4 –>[/su_button]

In the third part of our series “Automatically download TV show episodes as soon as they are available” we’ll guide you through the basic setup of a Raspberry Pi. Please make sure that you installed an operating system on an microSD card.

If you’re using an ethernet cable and not a USB WiFi adapter on your Raspberry Pi, then skip the first step.

1. Setting up WiFi

Put your SD card with the installed operating system in your computer’s card reader. Open up your terminal and enter the following line:

sudo nano /path/to/sd/card/etc/network/interfaces

Make sure to type in the correct path to your SD card. An example could look like the following:

sudo nano /Volumes/sd-card-name/etc/network/interfaces

This command opens up the interfaces file inside your terminal using the nano text editor. Now make sure that its content looks like the following (replace the bold parts with your WiFi details):

auto lo

iface lo inet loopback
iface eth0 inet dhcp

auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-ssid "your-network-name"
wpa-psk "password-here"

Save the file by pressing “CTRL + X”, hitting “y” and pressing enter. Now you can put your microSD card into your Raspberry Pi’s card slot.

2. Hardware setup

This is an easy one. Make sure your microSD card is plugged into your RPi. Now either plug in a USB WiFi adapter or an ehternet cable connected to your router. Last thing to do is to plug in the power source to turn on your RPi.

3. SSH into your Raspberry Pi

In your terminal window, enter the following:

ssh [email protected]RPiIPaddress (example: ssh [email protected])

Replace ‘RPiIPaddress’ with your Raspberry Pi’s IP address. You can easily find its IP address in your router’s browser interface, for example.

The default password is “raspberry”.

raspberry-pi-ipaddress

4. Set user password and timezone

Enter and run

sudo raspi-config

Select ‘expand filesystem’, change the user password and select your timezone in internationalisation options.

5. Update your RPi

Run

sudo apt-get update && sudo apt-get upgrade

Now it’s the time to get a coffee as the update will take a while.

6. Set up automatic restart with Watchdog

Since your Raspberry Pi will be running most of the time, you should have an app that reboots it in case it becomes unresponsive. That’s what Watchdog is for.

Run the following to install Watchdog

sudo apt-get install watchdog

Then run

sudo modprobe bcm2708_wdog

Open up modules

sudo nano /etc/modules

and paste the following line to the end

bcm2708_wdog

Press CTRL + X, then “y” and enter to save and close the file.

Run the following line to add Watchdog to the startup programs

sudo update-rc.d watchdog defaults

Now open up the config file and uncomment two lines of text

sudo nano /etc/watchdog.conf
remove the # from the following lines:
max-load-1
watchdog-device

Close the text editor the same way as already mentioned above.

Start the program with

sudo service watchdog start

That’s it! Your Raspberry Pi is now ready for the next steps. As already mentioned, this is a basic setup. You can do much more like setting up a firewall and other security measures. But for this guide, this is optional and not necessary.

In the next part, we’ll show you how to mount an external hard drive or NAS media server to your Raspberry Pi and how to install the usenet downloader NZBGet.

[su_button url=”https://trendblog.net/how-to-mount-your-media-server-or-nas-drive-to-a-raspberry-pi/” style=”flat” background=”#00aeef” size=”5″ center=”yes” radius=”0″]GO TO PART 4[/su_button]