Installing Wview on Ubuntu 9.04
Installing Wview
Standard RTFM disclaimer: Before starting I suggest you at least browse the Wview documentation. While there's a good chance you simply copy and paste the steps below and get a satisfactory result, if you run into trouble you'll almost certainly find the solution there.
I'm not aware of any third party Webmin modules for Wview, probably because it's not necessary since Wview it comes with it's own web based management tool called wviewmgmt. The fit-PC has plenty enough resources to act as a modest LAMP server and all that can be installed with a single command.
$ sudo tasksel install lamp-server
Since wviewmgmt only needs Apache, PHP and SQLite3 I saw no reason to shotgun it. We'll also be building Wview from source so we need to put Ubuntu in the picture.
$ sudo apt-get install build-essential$ sudo apt-get install libcurl4-openssl-dev libgd2-noxpm-dev libsqlite3-dev gawk$ sudo apt-get install apache2 apache2.2-common apache2-utils apache2-mpm-prefork apache2-utils ssl-cert$ sudo apt-get install sqlite3 php5-sqlite
Wview also requires a recent version of radlib which needs to be built separately. You can build your packages wherever you like, I tend to keep them in /usr/src where it's easy to find them later. Don't forget to check the download links so you get the latest version.
$ cd /usr/src$ sudo wget http://downloads.sourceforge.net/radlib/radlib-2.8.2.tar.gz$ sudo tar xvzf radlib-2.8.2.tar.gz$ sudo rm radlib-2.8.2.tar.gz$ cd radlib-2.8.2$ ./configure --enable-sqlite$ make$ sudo make install$ sudo make clean
Now we're ready to build Wview in much the same way. Apache uses the /var/www directory by default and that's fine for me. If your document root is elsewhere or you're using virtual hosts you'll have to adjust the configure line. I'm using a Davis Wireless Weather Envoy with a USB data logger that's equivalent to having the data logger plugged directly into the Vantage Pro 2 console. If you're using something different you'll need to adjust that part of the configure line too.
$ sudo wget http://downloads.sourceforge.net/wview/wview-5.5.0.tar.gz$ sudo tar xvzf wview-5.5.0.tar.gz$ sudo rm wview-5.5.0.tar.gz$ cd wview-5.5.0$ HTTP_DOC_ROOT=/var/www ./configure --enable-station-vpro --enable-http$ make$ sudo make install-env$ sudo make clean
When it finishes it'll also display instructions on how to allow wviewmgmt to start and stop the daemons. Next we need to let Ubuntu know how to start the Wview daemons.
$ sudo cp examples/Debian/wview /etc/init.d$ sudo chmod +x /etc/init.d/wview$ sudo update-rc.d wview defaults 98
Configuring Wview
Finish up by running the basic configuration or browsing to http://[server_url_or_IP]/wviewmgmt/login.php. The first time you run wviewconfig or wviewmgmt I suggest setting the station type to simulator, turn on verbose logging and just the basic features initially. It'll make it easier to check things out step by step and you can fine tune your settings later.
$ sudo wviewconfig
I'll want Wview generate HTML for the site but I'm leaving the default target directory alone so I'll add a symbolic link in the Apache root to tie those two together so I can later go to http://[server_url_or_IP]/wview to view the generated pages.
$ cd /var/www$ sudo ln -s /usr/local/var/wview/img/ wview$ sudo wviewhtmlconfig$ sudo /etc/init.d/apache2 restart
Browse to wviewmgmt, fill in your station details and start the daemons from the site the command line.
$ sudo /etc/init.d/wview start
Troubleshooting
So far it's been fairly straightforward but at this point you may run into some problems. When starting and stopping from the command line the daemons tell you little and wviewmgmt tells you nothing. If you turned on verbose logging, everything you need is in the system log. In a new console open watch the log when you start up. Keep an eye on the log as you enable features one by one and you'll save yourself a lot of time.
$ tail -f /var/log/syslog
This station has a USB data logger and just about every distro uses a different naming convention for USB serial ports. The default suggested by wviewconfig is a guess and if it isn't correct, Wview won't start. If you're not sure, you'll have to do some fishing. For this device the correct value is ttyUSB0.
$ dmesg | grep USB
If you really get stuck and need to verify your port settings manually try Minicom.
$ sudo apt-get install minicom$ minicom -s




