wview Quick Start Guide for Macintosh
February 5, 2006
Purpose
This guide will provide the basic procedure for a "standard" wview install.
Detailed description of the steps, advanced configuration of features and
troubleshooting tips are found in the
wview User Manual. Also, please see
the wview homepage for a detailed description of wview, the latest news
on releases, the wview User's Forum and other interesting links.
Mac OSX Requirements
-
xcode - development tools including gcc required to build
source packages - see
http://developer.apple.com/tools/xcode/ to download the dmg installer
-
DarwinPorts - Darwin package management system - used to install
the library prerequisites listed below - see
http://darwinports.opendarwin.org/getdp/ to download the dmg installer -
once installed, add /opt/local/bin to your path by adding the following line to
your ~/.profile file: "export PATH=$PATH:/opt/local/bin" - then execute the following:
sudo port -d selfupdate (this may take a while)
sudo port install gd2 (this should install the zlib and libpng prerequisites automagically)
Note: All wview binaries and scripts will be found at /opt/local/bin instead of
/usr/local/bin, so all instructions in the User Manual should have "/usr/local"
replaced with "/opt/local" for Mac installs
-
radlib - rapid application development library - must be installed -
http://www.radlib.teel.ws
Note: Mac OSX installs will use a configure prefix of "/opt/local" for radlib and wview -
use the "--prefix=/opt/local" argument to the configure script for both radlib and
wview
-
libcurl - "C" URL HTTP library - optional, required for Weather Underground -
http://curl.haxx.se/libcurl/
DarwinPorts Install: sudo port install curl
System Requirements
-
Sufficient Kernel Share Memory - check the following line in the
/etc/rc file, making sure the two sizes (shmmax and shmall) are similar in magnitude
to this line:
sysctl -w kern.sysv.shmmax=536870912 kern.sysv.shmmin=1 kern.sysv.shmmni=32 kern.sysv.shmseg=8 kern.sysv.shmall=131072
-
ntp/xntp - Network Time Protocol - a configured and functional NTP
daemon should be enabled on the host system to keep system and weather
station time accurate
-
apache - in order to serve your weather site to the world,
an http server is required - other http servers will work too. If you are
going to export your site to another server or to your ISP account site,
then an http server is not required on the wview server
-
Serial/Ethernet/USB port - an available interface port
is required to connect to the weather station
Weather Station - one of the following:
-
Vantage Pro or Vantage Pro2 Weather Station with Console
-
--enable-station-vpro
-
WeatherLink for Vantage Pro or Pro2, Macintosh Version -
the java software is not required, but this is the only way to obtain the
USB-to-Serial convertor, driver and serial data logger
Optionally, you can use the windows version with the serial data logger if
you obtain separately a USB-to-Serial convertor with a MacOSX compatible
driver - the Prolific chipset PL-2303 and
driver
have been confirmed to work with wview on a Mac Mini - Note: USB data
loggers are NOT supported by MacOSX
(in particular, there is no CP2101 driver for Darwin/FreeBSD) - unless you
have a serial port on your Mac, you must use a USB-to-Serial adapter connected
to a Weatherlink serial data logger (or just use the adapter provided with the
Macintosh version of Weatherlink)
-
Vaisala WXT-510
-
Station Simulator (for demos and testing)
Install Procedure
Note: execute these commands in a terminal session while logged into an account
with administration privileges - the sudo command requires you to enter your
password before it will execute the command following it.
1) Extract the radlib distribution:
tar zxvf radlib-x.y.z.tar.gz
2) Configure the distribution:
cd radlib-x.y.z
./configure --prefix=/opt/local
3) Build/install radlib:
sudo make install
4) Extract the wview distribution:
tar zxvf wview-x.y.z.tar.gz
5) Configure the distribution:
cd wview-x.y.z
./configure --prefix=/opt/local --enable-station-[type]
6) Build/install wview:
sudo make install
7) If a first time wview install, copy the default run environment:
sudo make install-env
8) If a new Vantage Pro station, use the on-screen console configuration
wizard
9) Configure wview:
sudo /opt/local/bin/wviewconfig
Note: If you are using the USB-to-Serial convertor and driver supplied
with the Weatherlink for Mac package, your Physical Interface is
"serial". This is what you should specify for the first question, not
the actual device name (/dev/tty.SLAB_USBtoUART) - this should be
given in the second question after specifying "serial" for the first.
10) If a first time wview install, copy the example startup directory for
wview to /Library/StartupItems:
sudo cp -R ./examples/MacOSX/wview /Library/StartupItems
sudo chmod -R 755 /Library/StartupItems/wview
sudo chmod -x /Library/StartupItems/wview/StartupParameters.plist
sudo chown -R root:wheel /Library/StartupItems/wview
Now wview should be started when you boot your Mac.
11) Run wview:
sudo /sbin/SystemStarter start "wview"
Note: You can stop or restart wview as follows:
sudo /sbin/SystemStarter stop "wview"
sudo /sbin/SystemStarter restart "wview"
12) See wview startup and run logs:
sudo tail -n 100 -f /var/log/system.log
Note: Unless you configured wview to include ftp, ssh, alarms or CWOP
support, these daemons will start up, complain about not finding
their config files, then exit. This is normal behavior. wviewconfig
disables these options by naming the config files to something
other than what the daemons are expecting so they will exit when
they try to initialize. Don't let this bother you.
13) Confirm proper operation:
sudo ps aux | grep wv
(you should see at least "wviewd" - maybe others if you enabled them)
sudo ps aux | grep htmlgend
(you should see "htmlgend")
You should see the log message "doing initial html generation now..."
at the end of the wview initialization log messages.
ls -al /var/wview/img/index.html
(you should see the file listed)
Open /var/wview/img/index.html with your favorite browser - this is your
new wview homepage.