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

From HiveTool
Jump to: navigation, search
(Created page with "Make SD card: dd bs=4M if=2013-05-25-wheezy-raspbian.img of=/dev/mmcblk0 # Boot Pi # Expand file system, set TZ and hostname sudo raspi-config # ### Script starts here echo ...")
 
Line 1: Line 1:
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
  
Line 6: Line 6:
 
sudo raspi-config
 
sudo raspi-config
  
# ### Script starts here
+
# Update before trying to add packages
echo "Update before trying to add packages"
 
 
sudo apt-get update
 
sudo apt-get update
echo "Get gawk, bc for shell scripts, apache and libusb."
+
 
 +
#Get gawk, bc for shell scripts, apache and libusb.
 
sudo apt-get install gawk bc apache2 apt-get libusb-dev
 
sudo apt-get install gawk bc apache2 apt-get libusb-dev
echo "Get the graphics library"
+
 
 +
#Get the graphics library
 
sudo apt-get -y install libgd2-xpm-dev build-essential
 
sudo apt-get -y install libgd2-xpm-dev build-essential
echo "Now get Graphics for perl.  Force the install."
+
 
 +
# Now get Graphics for perl.  Force the install.
 
sudo cpan -f GD
 
sudo cpan -f GD
 
sudo cpan GD::Text GD::Graph Date::Format
 
sudo cpan GD::Text GD::Graph Date::Format
 
echo "Copy the patched pm"
 
echo "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
 
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
echo "Make hivetool and htdocs directories."
+
 
 +
# Make hivetool and htdocs directories.
 
sudo mkdir /home/hivetool
 
sudo mkdir /home/hivetool
 
sudo mkdir /var/www/htdocs
 
sudo mkdir /var/www/htdocs
echo "Copy the hivetool files"
+
 
 +
#Copy the hivetool files"
 
sudo scp -P8022 pi@192.168.254.31:/home/hivetool/* /home/hivetool
 
sudo 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
 
sudo scp -P8022 pi@192.168.254.31:/var/www/htdocs/* /var/www/htdocs
echo "Done installing hivetool files - now configure apache"
+
 
 +
# Done installing hivetool files - now configure apache
  
  
  
== set static ip for port forwarding ========
+
#set static ip for port forwarding
 
sudo vi /etc/network/interfaces:
 
sudo vi /etc/network/interfaces:
  
#iface eth0 inet dhcp
+
iface eth0 inet dhcp
  
 
iface eth0 inet static
 
iface eth0 inet static
Line 45: Line 51:
  
  
== set up apache ============================
+
# set up apache
 
sudo vi /etc/apache2/ports.conf
 
sudo vi /etc/apache2/ports.conf
 
Listen 8080
 
Listen 8080
  
add .pl to AddHandler cgi-script
+
##add .pl to AddHandler cgi-script
 
sudo vi /etc/apache2/mods-enabled/mime.conf
 
sudo vi /etc/apache2/mods-enabled/mime.conf
 
AddHandler cgi-script .cgi .pl
 
AddHandler cgi-script .cgi .pl
  
add Includes to Options:
+
##add Includes to Options:
 
sudo vi /etc/apache2/sites-enabled/000-default
 
sudo vi /etc/apache2/sites-enabled/000-default
  
Add index.shtml:
+
##Add index.shtml:
 
sudo vi /etc/apache2/mods-enabled/dir.conf  
 
sudo vi /etc/apache2/mods-enabled/dir.conf  
  
sudo cp /etc/apache2/mods-available/include.load /etc/apache2/mods-enabled/
+
##sudo cp /etc/apache2/mods-available/include.load /etc/apache2/mods-enabled/
  
== misc =====================================
+
# misc
change hostname
 
 
sudo vi /etc/hostname
 
sudo vi /etc/hostname
  
and edit the local host name here, too:
+
##and edit the local host name here, too:
 
sudo vi /etc/hosts
 
sudo vi /etc/hosts

Revision as of 19:21, 28 December 2013

  1. Make SD card:

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

  1. Boot Pi
  2. Expand file system, set TZ and hostname

sudo raspi-config

  1. Update before trying to add packages

sudo apt-get update

  1. Get gawk, bc for shell scripts, apache and libusb.

sudo apt-get install gawk bc apache2 apt-get libusb-dev

  1. Get the graphics library

sudo apt-get -y install libgd2-xpm-dev build-essential

  1. Now get Graphics for perl. Force the install.

sudo cpan -f GD sudo cpan GD::Text GD::Graph Date::Format echo "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

  1. Make hivetool and htdocs directories.

sudo mkdir /home/hivetool sudo mkdir /var/www/htdocs

  1. Copy the hivetool files"

sudo 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

  1. Done installing hivetool files - now configure apache


  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


WHERE TO SET DNS SERVERS? /etc/network/interfaces /etc/dhcp/dhclient.conf


  1. set up apache

sudo vi /etc/apache2/ports.conf Listen 8080

    1. add .pl to AddHandler cgi-script

sudo vi /etc/apache2/mods-enabled/mime.conf AddHandler cgi-script .cgi .pl

    1. add Includes to Options:

sudo vi /etc/apache2/sites-enabled/000-default

    1. Add index.shtml:

sudo vi /etc/apache2/mods-enabled/dir.conf

    1. sudo cp /etc/apache2/mods-available/include.load /etc/apache2/mods-enabled/
  1. misc

sudo vi /etc/hostname

    1. and edit the local host name here, too:

sudo vi /etc/hosts