2. Requirements
Hardware
Raspberry Pi Model B or B+.
5V 1A power adapter.
Micro USB cable for power.
Ethernet cable.
MicroSD card adapter.
SD Card reader.
3. Requirements
Software
Raspbian image
Download from Raspberry Pi website
Direct download URL
http://downloads.raspberrypi.org/raspbian_latest
Windows
Win32Diskimager
Putty
Network Scanner
Nmap
SoftPerfect Network Scanner.
Linux
Most tools already installed.
Install nmap separately.
4. Let’s get started
Writing the image to an SD card.
Windows
Launch Wind32Diskimager with Administrator privileges.
Right click -> Run as Administrator
Choose the file 2014-06-20-wheezy-raspbian.img
Make sure the SD card drive is selected.
Click write. 1
2
3
5. Let’s get started
Writing the image to an SD card.
Linux
Identify where the SD card is attached
tail –f /var/log/syslog
tail –f /var/log/messages
fdisk –l
Result will be something like /dev/sdX
Make sure you get the right one, otherwise you can
destroy your entire partition.
Begin writing (do the following as root)
dd if=/path/to/raspbian/2014-06-20-wheezy-raspbian.img of=/dev/sdX bs=4M
Make sure /dev/sdX is where the SD card is attached.
To monitor the progress, you can do the following as root
ps ax | grep dd – get the PID of dd
watch –n5 kill –USR1 <pid of dd>
Wait!!!
6. Configuring the Pi
Plug the Pi into the network.
Turn on the power for the Pi.
Wait a minute or so.
Windows
Launch SoftPerfect Network Scanner.
Enter your Network Range.
Press Ctrl+Enter to begin scan.
Linux
Nmap –sP <network range>
Nmap –sP 192.168.1.0/24
If no scanner available, wait another minute and try
arp -a
Identify the IP address of the Raspberry Pi based on the MAC address.
Raspberry Pi MAC address starts with B8:27:EB
7. Configuring the Pi
Headless configuration
Putty
Enter the IP address of the Pi. Default port is 22.
Linux
ssh pi@<ip address>
Default username – pi
Default password – raspberry
9. Configuring the Pi
Expand the filesystem.
Makes Raspbian use all the space on the SD card. Needs
reboot.
Change user password
Change the default password. Don’t forget it.
Enable Boot to Desktop/Scratch
Choose which environment Raspbian boots to. Default is
console.
10. Configuring the Pi
Internationalisation Options
Change Locale
Make sure en_US.UTF-8 is selected.
Choose en_US.UTF-8 as default locale.
11. Configuring the Pi
Internationalisation Options
Change Timezone
Asia->Kuala Lumpur
12. Configuring the Pi
Enable Camera
Choose this if you are going to use the Raspberry Pi camera or
the Raspberry Pi NoIR camera.
Overclock
Choose modest. No overvolting required.
Advanced Options
SSH enabled by default now.
Change hostname to something else.
Change memory split.
I choose 32 for server ONLY without GUI.
Update
Update this tool to the latest version.
13. Post configuration
sudo apt-get update ; sudo apt-get safe-upgrade –y
Update Raspbian to apply any patches or security updates.
Reboot after doing this.
sudo rpi-update
Downloads the latest firmware.
Reboot after doing this.
sudo apt-get install avahi-daemon
Allows you to access your Raspberry Pi using
hostname.local instead of remembering the IP.
Useable on all Linux, OSX and Windows machine with
Bonjour service.
14. Advanced Configuration –
Setting static IP
Servers need static IP.
How?
sudo nano /etc/network/interfaces
Ctrl+X to quit and save. Enter “y” and press ENTER.
sudo nano /etc/resolv.conf
Ctrl+X to quit and save. Enter “y” and press ENTER.
Reboot.
iface eth0 inet static
address <ip address here>
netmask <netmask here>
gateway <gateway IP address here>
nameserver 4.2.2.3
nameserver 128.199.248.105
15. Advanced Configuration –
Configuring Wireless from CLI
Plug your wi-fi dongle to the Raspberry Pi.
Make sure it is detected and recognized.
sudo iwconfig
Make sure there is a wlanX interface listed.
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
Ctrl+X to quit and save. Enter “y” and press ENTER.
Reboot.
network={
ssid=“YOUR_SSID"
psk=“YOUR_PASSWORD"
}
16. Uploading files to Raspberry Pi
Download and install WinSCP
http://portableapps.com/apps/internet/winscp_portable
Launch WinSCP and enter the following information
IP address of the Raspberry Pi.
Port number of SSH (default 22).
Username – pi
Password – raspberry (default)
Click “Login”.