Difference between revisions of "XXX: Load Hivetool on the Pi"

From HiveTool
Jump to: navigation, search
(Boot Pi, expand file system, set TZ and hostname)
Line 1: Line 1:
 +
==Get latest version of operating system==
 +
We are using Raspbian.  Latest image is: 2013-12-20-wheezy-raspbian.zip
 +
http://www.raspberrypi.org/downloads
 
==Make SD card==
 
==Make SD card==
 
#: dd bs=4M if=2013-05-25-wheezy-raspbian.img of=/dev/mmcblk0
 
#: dd bs=4M if=2013-05-25-wheezy-raspbian.img of=/dev/mmcblk0

Revision as of 19:59, 28 December 2013

Get latest version of operating system

We are using Raspbian. Latest image is: 2013-12-20-wheezy-raspbian.zip http://www.raspberrypi.org/downloads

Make SD card

  1. dd bs=4M if=2013-05-25-wheezy-raspbian.img of=/dev/mmcblk0

Boot Pi, expand file system, set TZ and hostname

  1. Boot Pi and login
  2. Expand file system, set TZ and hostname
    sudo raspi-config
    (need details of menu options)

Install required packages

  1. Update before trying to add packages
    sudo apt-get update
  2. Get gawk, bc for shell scripts, apache for webserver, and libusb to read TEMPerHUMs.
    sudo apt-get install gawk bc apache2
    apt-get libusb-dev
  3. Get the graphics library
    sudo apt-get -y install libgd2-xpm-dev build-essential
  4. Now get Graphics for perl. Force the install.
    sudo cpan -f GD
    sudo cpan GD::Text GD::Graph Date::Format
  5. Copy the patched pm
    sudo scp -P8022 paul@192.168.254.31:/usr/local/share/perl/5.14.2/GD/Graph/axestype.pm /usr/local/share/perl/5.14.2/GD/Graph/axestype.pm
  6. Make hivetool and htdocs directories.
    sudo mkdir /home/hivetool
    sudo mkdir /var/www/htdocs
  7. Copy the hivetool files"
    scp -P8022 pi@192.168.254.31:/home/hivetool/* /home/hivetool
    sudo scp -P8022 pi@192.168.254.31:/var/www/htdocs/* /var/www/htdocs

Done installing hivetool files

Set the ethernet parameters and DNS servers

  1. set static ip for port forwarding
    sudo vi /etc/network/interfaces:
    iface eth0 inet dhcp
    iface eth0 inet static
    address 192.168.254.31
    netmask 255.255.255.0
    gateway 192.168.254.254
  2. Set the dns Servers
    /etc/network/interfaces
    /etc/dhcp/dhclient.conf


Configure apache

  1. set up apache
    sudo vi /etc/apache2/ports.conf
  2. Listen 8080
  3. add .pl to AddHandler cgi-script
  4. sudo vi /etc/apache2/mods-enabled/mime.conf
  5. AddHandler cgi-script .cgi .pl
  6. add Includes to Options:
  7. sudo vi /etc/apache2/sites-enabled/000-default
  8. Add index.shtml:
  9. sudo vi /etc/apache2/mods-enabled/dir.conf
  10. sudo cp /etc/apache2/mods-available/include.load /etc/apache2/mods-enabled/

Misc

  1. Set the local host name
    sudo vi /etc/hostname
  2. and edit the local host name here, too:
    sudo vi /etc/hosts