User Tools

Site Tools


kb:embedded:raspberrypi:install

02 Installation

Online - Internet connection necessary

1. Operating System

On Mac

Download OS

Raspbian Lite (~ 300 MB): \\  https://www.raspberrypi.org/downloads/raspbian/

Install Image

Mount SD card with an adapter to Macbook

https://www.raspberrypi.org/documentation/installation/installing-images/mac.md

  diskutil list
  diskutil unmountDisk force /dev/disk<disk# from diskutil>
  sudo dd bs=1m if=<image.img> of=/dev/rdisk<disk# from diskutil>

Send a SIGINFO signal (press Ctrl+T) to view progress

On Pi

Place SD card in the Pi and start the Pi (pi:raspberry)

Use memory

Expand file system to entire memory card

  sudo raspi-config --expand-rootfs

Configure OS

Basic Settings
  sudo raspi-config
Network Settings
  sudo nano /etc/dhcpcd.conf
dhcpcd.conf
interface eth0
static ip_address=10.21.30.50/24
static routers=10.21.30.10
static domain_name_servers=10.21.30.21
Hostname
  sudo nano /etc/hostname
hostname
rp3b-jh
Hosts
  sudo nano /etc/hosts
hosts
127.0.0.1	localhost
::1		localhost ip6-localhost ip6-loopback
ff02::1		ip6-allnodes
ff02::2		ip6-allrouters

127.0.1.1	rp3b-jh

Update OS

  sudo apt-get -q update
  sudo apt-get -qy upgrade 
  sudo apt-get -q --purge autoremove
  sudo apt-get -q clean

Todo

  • remove user pi, create project-specific user
  • close ports etc.

2. Samba

  sudo apt-get install samba samba-common smbclient
  sudo service smbd status
  sudo service nmbd status

3. Git

  sudo apt-get install git

4. nginx

  sudo apt-get install nginx

5. node.js

Set up NodeJS package repo

  curl -sL https://deb.nodesource.com/setup_4.x | sudo bash -

Install Node.js

  apt-get install -y nodejs
  

Further dependencies (modules) of node.js (node_modules) see for example webic dependencies

6. pm2

  npm install -g pm2
kb/embedded/raspberrypi/install.txt · Last modified: 2022/08/16 13:10 by joerg.hampel