Raspberry Pi2 Raspbian

From Davical
Jump to navigationJump to search

UNDER CONSTRUCTION

This guide is intended to people who want a lightweight calendar server at home, behind an internet box, up 24h/24h, with very low consumption, and chose a cheap Raspberry Pi. This guide has been written according to Raspberry Pi 2 model B but shall be working also with others versions. This guide explains how to install DaviCal calendar server and optionally InfCloud CalDAV/CardDAV web clients. It assume an other linux computer is available on the LAN with an Internet connexion.

Hardware tested:

  • 2015-11-07: Raspberry Pi 2 model B

System tested:

  • 2015-11-07: Raspbian jessie released on 2015-09-24

Software versions tested:

  • 2015-11-07: TBD DAViCal xxx, PostgreSql xxx, InfCloud xxx

HW and network installation guide

Before starting, what you need

  • a Raspberry with RJ45 LAN connector (Pi 2 model B for example)
  • a Raspberry Pi Case (optional, but advised)
  • a 8 Go micro-SD card
  • a Raspberry Pi universal power supply (or equivalent)
  • an internet box with a free RJ45 connexion
  • an Ethernet cable (RJ45)
  • an other computer with an internet connexion and a micro-SD card adapter

See distributors on Raspberry shop page: https://www.raspberrypi.org/products/

What you don't need but can be useful

  • an USB keyboard
  • an USB mouse
  • an HDMI display

Preparing Raspberry Pi micro-SD card from a linux computer

wget https://downloads.raspberrypi.org/raspbian_latest
unzip 2015-09-24-raspbian-jessie.zip
md5sum 2015-09-24-raspbian-jessie.img
# a24eed8b6338940013cdcd5a74a3935d  2015-09-24-raspbian-jessie.img
  • flash your micro-SD card (carefully identify micro-SD card device letter and replace sdX with correct drive!)
# before micro-SD card connexion, have a look to your computer drives (to preserve)
ls -l /dev/sd?
# after micro-SD card connexion, have a look to the new micro-SD card drive (to write to)
ls -l /dev/sd?
dd bs=2M if=2015-09-24-raspbian-jessie.img of=/dev/sdX
sync
# if root required, you probably need to prefix dd and gparted commands with sudo
  • expand your raspberry / partition to full micro-SD card
gparted
# select micro-SD drive
# right click on / partition and expand it to full size
# click on apply
# remove micro-SD card from linux computer

Connecting Raspberry Pi to LAN and boot

Okay, you need a RJ45 cable between Raspberry and your box, insert micro-SD card into your Raspberry and plug on power supply. You can check:

  • near micro-SD card, red light ON
  • green light blinking few seconds and then OFF
  • near RJ45 connector yellow and red lights ON

If red and green lights are ON near micro-SD card, you may have a problem with your SD-card (missing, wrongly inserted, badly flashed, ...).

Now, you just have to guess your Raspberry Pi IP address! What you can try:

  • have a look to your box administration page
  • get your linux computer IP address
ifconfig
# inet addr: 192.168.x.y
  • try addresses 192.168.x.2 to 192.168.x.254 around y
  • connect to your Raspberry Pi
ssh -Y pi@192.168.x.z
# password: raspberry

If you fail guessing your Raspberry IP address:

  • connect USB mouse and Keyboard + HDMI display
  • launch a terminal

Then, you should write down a paper your Raspberry Mac address:

ifconfig
# HWaddr aa:bb:cc:dd:ee:ff

And configure your box router to assign a static local IP address to your Raspberry. Static DHCP reservation assigns a local IP address to a Mac HWaddr. Some boxes need a reboot to make static DHCP reservations active.

SW installation guide

To be continued...