domingo, 16 de setembro de 2012

RaspberryPi & wview (2012-08-16-wheezy-raspbian.img)


wview setup on
RaspberryPi (armhf)
http://www.raspberrypi.org         http://www.wviewweather.com




this takes about 50 to 60 m

STEP 0 - download Raspbian (armhf)
Download this torrent or use the direct download and write it on your sdcard (2Gb or more)


STEP 1 - set repositories
$ sudo nano /etc/apt/sources.list
deb http://archive.raspbian.org/raspbian wheezy main contrib non-free rpi
deb-src http://archive.raspbian.org/raspbian wheezy main contrib non-free rpi


$ wget http://archive.raspbian.org/raspbian.public.key -O - | sudo apt-key add -
$ sudo apt-get update

STEP 2 - installation
Now you can do an “script” instalation or an “manual” instalation
THE SCRIPT MODE
$ wget http://goo.gl/yiaz0 -O wview-install-raspbian.sh
$ chmod +x wview-install-raspbian.sh ; ./wview-install-raspbian.sh

THE MANUAL MODE
$ sudo apt-get install --yes build-essential zlib1g-dev libpng12-dev libreadline-dev gawk libsqlite3-dev sqlite3 libgd2-xpm libgd2-xpm-dev libssl-dev sendmail sendemail libcurl4-openssl-dev libusb-1.0-0 libusb-1.0-0-dev apache2 php5 php5-sqlite libapache2-mod-php5 ntp tnftp wget
$ wget http://downloads.sourceforge.net/radlib/radlib-2.12.0.tar.gz
$ tar zxvf radlib-2.12.0.tar.gz
$ cd radlib-2.12.0
$ ./configure --enable-sqlite --prefix=/ --bindir=/usr/bin --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib
$ sudo make install
$ cd ..

$ wget http://downloads.sourceforge.net/wview/wview-5.20.2.tar.gz
$ tar zxvf wview-5.20.2.tar.gz
$ cd wview-5.20.2
$ ./configure --prefix=/ --bindir=/usr/bin --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib
$ sudo make install
$ cd ..

$ sudo wget http://goo.gl/H13iS -O /etc/init.d/wview
$ sudo chmod +x /etc/init.d/wview
$ sudo update-rc.d wview defaults 99
$ sudo ln -s /var/lib/wview/img/ /var/www/weather
$ sudo ln -s /var/lib/wviewmgmt/ /var/www/wviewmgmt


If all was well …
$ wviewconfig
or
http://your_raspi_ip/wviewmgmt

$ wviewhtmlconfig *1

$ sudo /etc/init.d/wview start

*1: first you must change “File Generation” Target Path (to /var/lib/wview/img) and Template Source Path (to /etc/wview/html); change “File Generation” / “Archive Browser Days To Keep:” to “0”

before going live
$ sudo wviewcleardata

STEP 3 - cleanup
$ sudo rm -r radlib* ; sudo rm -r wview*
$ sudo apt-get clean


STEP 4 - tunning up:
If you want start/stop control of wview from the Management Web Site (and you are comfortable giving the http server user account sudo privileges): Add the http user to the sudo group:
$ sudo adduser www-data sudo

Update /etc/sudoers to allow start/stop control:
$ sudo visudo (Add the following lines to the bottom of the file):
Cmnd_Alias WVIEW = /etc/init.d/wview
www-data ALL= NOPASSWD: WVIEW


If you want the customized Raspi wview icon
$ sudo wget https://dl.dropbox.com/u/2427470/raspberry/wview/wview-100x100.png -O /var/lib/wviewmgmt/wview-100x100.png






TOO MUCH CODE?


Try downloading this pie already cooked here.






1 comentário:

  1. for more help, try the wview google group:
    https://groups.google.com/forum/?fromgroups#!forum/wview

    ResponderEliminar