Raspberry Pi - krema2ren/examples GitHub Wiki
- Download image from raspberrypi.org
- Unzip the image.
- Format the SD card.
- Check and note the name of the card (here: disk2s1)
df -h ------------------------------------------------------------------------------- Filesystem Size Used Avail Capacity iused ifree %iused Mounted on /dev/disk1 633Gi 300Gi 333Gi 48% 78639464 87396344 47% / devfs 209Ki 209Ki 0Bi 100% 725 0 100% /dev /dev/disk0s4 65Gi 19Gi 46Gi 30% 115184 48393592 0% /Volumes/BOOTCAMP map -hosts 0Bi 0Bi 0Bi 100% 0 0 100% /net map auto_home 0Bi 0Bi 0Bi 100% 0 0 100% /home /dev/disk2s1 15Gi 1.9Mi 15Gi 1% 0 0 100% /Volumes/RIMFAKSE
- Unmount the disk with
sudo diskutil unmount /dev/disk2s1
- Write the image to the SD card. NOTE: disk2s1 is now referred as rdisk2 as it is unmounted
sudo dd bs=1m if=/Users/dennis/Downloads/2014-01-07-wheezy-raspbian.img of=/dev/rdisk2
- Open your router configuration usually 192.168.0.1 or 10.0.0.1 and find the page with internet sessions.
- Turn on your Raspberry Pi and watch for new entries. Voila, there you have it.
- Connect via SSH to Raspberry Pi. Default user and password for the Raspian image are user:pi and password:raspberry.
- Open configuration manager.
sudo raspi-config
- Unless it has been updated since I wrote this, the image you installed is only set to see about 256MB of RAM. If you have the latest revision Pi, you have 512MB RAM, and there’s no reason to waste half of it. If you run the “top” command and see ~188MB total RAM, you’ll need to update the OS to see all available RAM.
sudo -i
- Enter the following command, which takes about five minutes to complete.
apt-get update
- The final command is just slightly different than the first, so be careful entering it. Also, it takes over an hour to complete, so you’ll need to be patient.
apt-get upgrade
- When the commands finish, reboot your Pi and run the top command again. This time, the total RAM should be close to 512MB.
- Upgrade Raspberry Pi package manager
sudo apt-get update
- Install Java JDK
sudo apt-get install default-jdk
- When a newer version of Java is available then you can uninstall the package by
sudo apt-get remove --purge package sudo apt-get clean
- Here is how to install Java7 from oracle
sudo apt-get install oracle-java7-jdk
- Install tomcat on raspberry Pi
sudo apt-get install tomcat7 sudo apt-get install tomcat7-admin tomcat7-examples tomcat7-docs
- Add user to tomcat-users.xml
sudo nano /etc/tomcat7/tomcat-users.xml ----------------------------------------------------------------------------- <tomcat-users> <user username="pi" password="raspberry" roles="manager-gui,admin-gui"/> </tomcat-users>
- Restart tomcat application server
sudo service tomcat7 restart