forked from jgoerzen/wview
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUPGRADE
executable file
·377 lines (312 loc) · 19.8 KB
/
UPGRADE
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
wview Upgrade Directions
------------------------
1) Extract new wview source tree to standard location (the name includes
the version number for uniqueness - your old source tree will not be
copied over or disturbed)
2) Read ChangeLog for any new configuration or environment requirements
3) Stop any running wview daemons (/etc/init.d/wview stop)
4) Copy any user-specific source (such as .../htmlgenerator/images-user.c)
into the new source tree
5) cd to the wview-X.Y.Z root source directory
6) ./configure (see the User Manual for configuration options)
7) make && make install (install requires root priveleges)
8) Find the version you are upgrading from in the list below and proceed from
there through all versions to the end
9) Execute wviewconfig then wviewhtmlconfig - should always be run after upgrades
10) Start wview daemons (/etc/init.d/wview start)
11) Check /var/log/messages (tail -n 100 -f /var/log/messages) for proper
operation (htmls generated, wview daemon downloading archive pages,
history timer adding samples every archive interval minutes, etc.)
12) If all is good, store the distro tarball in a safe place, delete the
old source tree, you're done!
Version Specific Directions
---------------------------
0.8.1 or Older: (backup your /usr/local/wview directory first):
---------------
(Mandatory)
a) mv /usr/local/wview/html /etc/wview/html
b) mv /usr/local/wview/*.conf /etc/wview
c) mv /usr/local/wview/archive /var/wview/archive
d) mv /usr/local/wview/img /var/wview/img
e) mv /usr/local/wview/noaa.dat /var/wview/noaa/noaa.dat
f) Edit your start script (/etc/init.d/wview or /etc/rc.d/wview)
and change the path to the binaries from /usr/local/wview to
/usr/local/bin, change run path from /usr/local/wview to /var/wview
then change the executable name for ftpd to wviewftpd (see the
new wview start scripts in examples/* for examples of these
changes).
0.9.1 or Older:
---------------
(Optional) - If you want to utilize the new combo-charts for
temp/dewpoint and heat index/wind chill, do the following:
a) Using examples/conf/images.conf as a guide, edit your site-specific
/etc/wview/images.conf to add Temp/Dew Point and Heat Index/Wind Chill
multi-plot charts. Don't forget to comment out the old single chart
entries for TempDay, DewDay, HeatDay, ChillDay, TempMonth, DewMonth,
HeatMonth and ChillMonth (see examples/conf/images.conf).
b) Using the files Current_Vantage_Pro.htx, Daily_Vantage_Pro.htx and
Monthly_Vantage_Pro.htx in the bin/html directory as a guide, modify
your site-specific versions of these files in /etc/wview/html. Look
for references to the filenames you commented out in images.conf -
a bit of rearranging is necessary but is illustrated in the distro
examples in bin/html. According to your site, you may be able to just
copy and paste the image blocks from the examples.
2.0.0 or Older:
---------------
(Optional) - From version 3.0.0 forward, the HTML template files with
references to "Vantage Pro" have changed as have the
references to them in the home page templates. New navigation
buttons were also added at the top of each template. If you
want to stay up to date on template files, you should upgrade
your template files based on the distro examples then upgrade
your html-templates.conf to the newest format using the new
file names and update your home page template(s) to refer to
these new file names.
Current_Vantage_Pro.htx => Current.htx
Current_Vantage_Pro_Plus.htx => Current_Plus.htx
Daily_Vantage_Pro.htx => Daily.htx
Daily_Vantage_Pro_Plus.htx => Daily_Plus.htx
Monthly_Vantage_Pro.htx => Monthly.htx
Monthly_Vantage_Pro_Plus.htx => Monthly_Plus.htx
Yearly_Vantage_Pro.htx => Yearly.htx
Yearly_Vantage_Pro_Plus.htx => Yearly_Plus.htx
(Optional) - Udgrade your almanac.htx file from the distro examples so
you will have the new solar rise/set times, the new Storm
Start Date entry, etc. If you have extended sensors, add the
new almanac_Plus.htx to your template directory.
3.1.4 or Older:
---------------
(Optional) - Udgrade all of your *.htx template files from the distro
examples so you will have the new Weekly page and references
to it on the other pages. Upgrade your images(-metric(-mm)).conf
file to generate the new weekly chart images. Upgrade your
html-templates.conf to include the new Weekly.htx page. As
always, refer to the examples in the distro for changes/usage.
3.2.0 or Older:
---------------
(Optional) - Udgrade your index.htx template file (or index-day.htx and
index-night.htx if doing day/night themes) from the distro
examples so you may take advantage of the new radar and
forecast HTML tags. Be sure to always run wviewconfig after
an upgrade. As always, refer to the examples in the distro
for changes/usage.
3.2.1 or Older:
---------------
If you have user-defined images in ../htmlgenerator/images-user.c which include a
date and time stamp, (i.e. all non-dial images), add an extra parameter,
img->mgrWork->dateFormat
as the final parameter to the function call which produces the image. See the
version of images-user.c from the distro for an example.
3.3.0 or Older:
---------------
(Mandatory) - (re)copy the wview start script for your OS distribution from
the examples directory of the distribution so the process
monitor will be started.
(Mandatory) - copy the new wvpmond config file:
> sudo cp examples/conf/processes.conf /etc/wview
It shouldn't require editing.
(Mandatory) - if you were generating data to wunderground, the new configure
option to enable it is "--enable-http" - the renamed http
daemon can submit data to wunderground and/or weatherforyou.
The config file for the http daemon is http.conf and replaces
wvwunderd.conf.
(wviewconfig will create the new http.conf config file for
you)
(Optional) - copy the new html templates from examples/html/classic to
your /etc/wview/html directory to take advantage of the new
template macro inclusion capability. Customize the include
templates and html templates for your site.
(Optional) - Submit your site template to the wview google group so it can
be included in future wview releases as
"examples/html/<your_template>".
3.4.1 or Older:
---------------
(Mandatory) - If you use wviewftpd to transfer files to a remote web server
you will need to copy the new example wviewftp.conf-no-ftp to
/etc/wview/wviewftp.conf. If you need to modify the FTP
binary used or the arguments passed to it you can now do so
in the new config file.
(Mandatory) - You should now start using the new html template configuration
script "wviewhtmlconfig" to setup your HTML templates. Run it
immediately after "make install-env"/"wviewconfig" then
customize as you wish.
3.5.0 or Older:
---------------
(Mandatory) - The location of generated NOAA and ARC files has been changed
to "img/NOAA" and "img/Archive" respectively. The new "install-env"
make target creates these directories but if you have existing
NOAA and ARC files in the img directory (both on your wview
server and your web site), you will want to create these new
subdirectories and move the files. The new index*.htx files
have been updated to support these locations (but your old ones
will not).
3.6.0 or Older:
---------------
(Mandatory) - The location of the wview configuration and data trees has
moved as of version 3.7.0. To allow installation and
execution from a chroot jail and/or allow package management
systems to specify an install/run root prefix, the configure
script "--prefix" argument now controls not only where binaries
are installed but also where "/etc/wview" and "/var/wview" are
located. The default for configure if no "--prefix" argument
is given is "--prefix=/usr/local". So the new default locations
are: "/usr/local/etc/wview" and "/usr/local/var/wview".
Executing "sudo make install-env" for 3.7.0 will create these
directories for you, then you will need to move anything
pertinent from the old "/etc/wview" and "/var/wview" locations
to the new "prefix" locations. Obvious choices are:
"/var/wview/archive"
"/var/wview/alarms" - if applicable
"/etc/wview/alarms" - if applicable
"/etc/wview/*.conf <contents>" - not advisable to move directly
"/etc/wview/html customizations"
Alternatively, if you just refuse to be compliant ;) and *must*
keep your config and data trees on the root prefix, you can
specify "--prefix=/ --exec-prefix=/usr/local". But this means
you must remember this every time you upgrade wview and I am
not going to keep reminding you...
The really good news in all this is that the example start
scripts are now configured for paths based on the "--prefix"
argument too (during the build step), so there should be much
less customization of those required in the future.
3.7.3 or Older:
---------------
(Optional) - Support for a new config file "calibrate.conf" has been added.
If you want to calibrate basic sensor readings, copy the
example version .../wview-x.y.z/examples/conf/calibrate.conf
to $prefix/etc/wview and edit for your calibration requirements.
See the example config file or the User Manual for calibration
details.
3.9.0 or Older:
---------------
(Mandatory) - If you use wviewftpd to transfer files to your web/ISP server,
you will need to modify your wviewftp.conf file to remove the
preceding "img" from all file transfer rules. Also, destination
paths will no longer have a trailing "img" directory tacked on
so if you want to retain this in your destination path, you
will need to add "img" to the end of your "directory" parameter
in wviewftp.conf.
5.0.0 or Older:
---------------
(Mandatory) - Prior to building and installing wview 5.0.0, you need to do
the following:
1) Install gawk, libreadline5-dev
2) Install sqlite3 and libsqlite3-dev (if not already installed).
3) Install radlib 2.8.2 or newer.
Given the changes to the configuration location and html template
changes, it is imperative you use the "install-env" make target
when upgrading to 5.0.0:
>./configure [your configure options]
>sudo make install-env
>sudo wviewconfig
>sudo wviewhtmlconfig
The vast majority of wview configuration has been moved from
individual config files to an SQLite3 database:
$prefix/etc/wview/wview-conf.sdb. The wviewconfig script has
been updated to support the sqlite3 database. There are also
several GUI and web tools for configuring wview including a
Web Forms Inteface: $distro/ConfigForms. See the User
Manual for complete details. At a minimum, running wviewconfig
after upgrading will suffice.
wview archive data has been moved to an SQLite3 database from
the rusty old WLK files we have formerly been shackled with.
A new conversion utility "wlk2sqlite" has been added to the
wview distribution to import existing WLK archive data to the
new SQLite3 database. A default empty archive database file
will be installed when you use "make install-env" and is
located in a familiar place: $prefix/var/wview/archive. The
database filename is "wview-archive.sdb". Entering "sudo wlk2sqlite"
with no parameters at a shell prompt will display usage details.
wlk2sqlite may require adding "/usr/local/lib" to the
"LD_LIBRARY_PATH" environment variable:
>export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
The User Manual has more details on this process.
5.1.1 or Older:
---------------
(Mandatory) - 5.1.0 introduces a new HILOW database which will be populated
with your archive data for historical purposes and with LOOP
data for better resolution once 5.1.0+ is running. It is necessary
to create and populate the wview-hilow.sdb database prior
to running 5.1.0+ or else wview will do this automatically the
first time it is run. The down side to this automatic creation
is that it can be very slow on some platforms such as the NSLU2.
Stations other than the Vantage Pro which do not archive data
in console memory will NOT have archive records generated during
this automatic conversion. The alternative for these stations is
the hilowcreate utility, included with versions 5.1.1+.
The procedure is:
1) Leave your old version running, so long as it is 5.0.0+
(i.e., creating archives in wview-archive.sdb).
2) Build and install wview 5.1.1+.
3) Copy your $prefix/var/wview/archive/wview-archive.sdb database
to a working directory.
4) Execute the utility:
> hilowcreate [working_directory]
5) When it completes, copy the resulting wview-hilow.sdb database
to $prefix/var/wview/archive.
6) Stop old wview.
7) Start new wview, it will pick up archive records for HILOW
that were generated during the execution of hilowcreate.
5.2.0 or Older:
---------------
(Mandatory) - 5.2.0 introduces a new method for starting the wviewd daemon
which relies on the newly generated file $prefix/etc/wview/wview-binary.
The make install-env process will populate this file based on
your station choice during the configure step of wview install.
All station binaries are now built and if the station type is
changed when running wviewconfig or using the new wviewmgmt
web interface, the $prefix/etc/wview/wview-binary file will
be updated. To support this you must (in addition to normal steps):
1) Execute the "install-env" target when building:
> make install-env
2) Copy the new wview start script for your platform from the distro:
> sudo cp $distro/examples/[your_platform]/wview /etc/init.d
(or similar, use the appropriate path for your distro)
(Mandatory) - 5.2.0 introduces email alerts. This required several new config
parameters so you must upgrade your wview-conf.sdb file.
The simple way (but it requires you to reconfigure everything)
is to copy the new distro database:
> sudo cp $distro/examples/conf/wview-conf.sdb $prefix/etc/wview
> sudo wviewconfig (or use the web interface)
> sudo /etc/init.d/wview restart
The simpler way is to add the three new records to your existing
wview-conf.sdb:
> sudo sqlite3 $prefix/etc/wview/wview-conf.sdb
sqlite> INSERT INTO "config" VALUES('EMAIL_ADDRESS','address@server.com','Destination for email alerts:',NULL);
sqlite> INSERT INTO "config" VALUES('ENABLE_EMAIL_ALERTS','no','Send system alert emails?',NULL);
sqlite> INSERT INTO "config" VALUES('SEND_TEST_EMAIL','no','Send a test email?',NULL);
sqlite> .quit
(Optional) - If you want to be able to Start/Stop wview remotely via the new
wviewmgmt web interface, you will need to do the following:
1) The $distro/wviewmgmt directory should be copied to the HTTP
server's document root:
> sudo cp -R $distro/wviewmgmt $documentRoot
2) Make $prefix/etc/wview (the directory) and $prefix/etc/wview/wview-conf.sdb
read-write for the http server account (the new install-env build target
does this for you):
> sudo chmod 777 $prefix/etc/wview
> sudo chmod 777 $prefix/etc/wview/wview-conf.sdb
(This is brute force, you can play with group memberships for the http server
account to avoid 777)
3) Be sure PHP support is included with the http server:
For apache2, I have /etc/apache2/mods-enabled/php5.conf and
/etc/apache2/mods-enabled/php5.load.
4) Be sure the SQLite3 module for php is installed (php5-sqlite or similar).
5) Add the http user to the sudo group:
> sudo adduser www-data sudo
6) Make sure the sudo group has no password required privileges in /etc/sudoers:
> sudo visudo
(Make sure the line "%sudo ALL=NOPASSWD: ALL" is at the bottom of the
/etc/sudoers file)
7) Point your browser to:
http://[wview_URL_or_IP_address]/wviewmgmt/wview-form.php
5.4.0 or Older:
---------------
(Mandatory) - 5.5.0 removes the wviewsqld daemon. If you were exporting to an SQL
database you will need to consult the User Manual on how to use the
new SQL export scripts.
5.7.1 or Older:
---------------
(Optional) - 5.8.0 adds debian package installation capability. See the User Manual
for step-by-step instructions to transition from source installs to
debian APT install.