After contructing the hardware, the next step is to install Operating System.
There are quite a lot of choices of Operating Systems for Raspberry Pi. As we can see in the official download page:
- NOOBS: Raspian and possible to net-install other OS
- OPENELEC: Media Center
- OSMC: Media Center
- Raspbmc: another media center
And other personal/3rd party distribution:
- dietRaspbian: minimized
- OpenWrt: a router OS
There are some simple critiera help me to select an image:
- Popular distribution: can find useful tutorial, helpful information
- Docker ready: easy to deploy an application
- As lite as possible, no GUI: as served as cluster no GUI required
- Newest linux kernel
In this case, I took full advantage of HypriotOS which has docker pre-built-in and some friendly modification as: support for network hotplugging, bash completion for Docker commands, image works for Pi 1 & 2.
These steps are suitable for Mac OS X only.
Terminal application, or in my case iTerm2.
Then begin of
# to find the right disk
Or use a GUI tool.
For linux/windows installation, please check this.
Next plugin all MicroSD cards in the Raspberry Slot.
Now ready to go!
Finding the IP address is not an easy task, at least without the right tool. Download fing, don’t worry, it’s free for searching all equipements within the network. And it’s very obvious to find all the raspberry.
Once having the IP, login with
ssh username@ip-addr command.
e.g. for an ip
192.168.0.2 and an user
For HypriotOS, here is the username and password:
Once logged-in the first thing is to expand the partition to all space of SD card. This can be done by typing
Select the first item and
enter. The system is ready to take full space of SD card.
df -h to check if success.
Then the next thing is to
sudo apt-get update
The current stable
debian release is
Wheezy which offers only a compile-ready R in version
2.15.1. For a better compatibility and performance I need a
3.x.x R. The testing release
Jessie should be fine, and by the way it will be table release on april 25, 2015.
Here is the steps (source):
# Update apt sources list
result should be:
deb http://mirrordirector.raspbian.org/raspbian jessie main firmware contrib non-free
Once you start the actual upgrade you will be given a choice to manually restart any currently running services. Manually restart services is recommended as this give you an option to restart services selectively eg. SSH etc. Furthermore, if you are performing the update via SSH and have no physical access to your Raspberry PI make sure not to disable SSH root access.
# Hit the new list
While doing sudo apt-get upgrade or install, I always get these warning message:
perl: warning: Setting locale failed.
The solution via here:
This will do the trick.
If the system can’t find
dpkg-reconfigure, try to install
sudo apt-get install debconf. If it said it is installed, then it is located in
/usr/sbin/dpkg-reconfigure, the reason is that the directory is not in the
Sometimes passwordless SSH simplifies the life and furthermore the cluster requires passwordless SSH.
Here are the steps:
- Generate rsa Key in client side.
- Create a directory
~/.sshin server side
- Transfer your public key from client to server
- Test login
# 1. Generate rsa Key