Skip to content

Commit cf5ac5d

Browse files
author
Matthew Wall
committed
the install section of usersguide is now links to separate pages. added generic 'installing.htm' instructions that are not specific to any os. added javascript tabbing in linux.htm for platform-specific instructions.
1 parent bba298c commit cf5ac5d

10 files changed

+467
-371
lines changed

docs/copyright.htm

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ <h1 class="title">weewx Copyright</h1>
5454
</p>
5555

5656
<p class='copyright'>
57-
&copy; <a href='copyright.htm'>Copyright</a> Tom Keffer and others
57+
&copy; <a href='copyright.htm'>Copyright</a> Tom Keffer
5858
</p>
5959

6060
</body>

docs/customizing.htm

+4-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020
<body>
2121

2222
<h1 class="title">Customizing weewx<br />
23+
<span style="font-size:70%">
2324
Version: 2.2
25+
</span>
2426
</h1>
2527
<h1>Table of contents</h1>
2628
<div id="technical_content">
@@ -1461,7 +1463,7 @@ <h3>General</h3>
14611463
</tr>
14621464
<tr>
14631465
<td class="code">html_entities</td>
1464-
<td>Non 7-bit characters will be represented as HTML entities (<em>e.g.</em>
1466+
<td>Non 7-bit characters will be represented as HTML entities (<em>e.g.</em>,
14651467
the degree sign will be represented as <span class="code">&amp;#176;</span>)</td>
14661468
</tr>
14671469
<tr>
@@ -3601,7 +3603,7 @@ <h1 id="Packet_types">Appendix D: Packet types</h1>
36013603
</table>
36023604

36033605
<p class='copyright'>
3604-
&copy; <a href='copyright.htm'>Copyright</a> Tom Keffer and others
3606+
&copy; <a href='copyright.htm'>Copyright</a> Tom Keffer
36053607
</p>
36063608

36073609
</div>

docs/debian.htm

+25-24
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,12 @@
1111
<link href="weewx_docs.css" rel="stylesheet" />
1212
<!-- JavaScript -->
1313
<style type="text/css">
14+
tr {
15+
vertical-align: middle;
16+
}
1417
.os-icons {
1518
float: right;
19+
margin-left: 100px;
1620
}
1721
img {
1822
width: 60px;
@@ -30,29 +34,26 @@ <h1 class="title">weewx: Quick Start Guide for Debian Linux</h1>
3034
<img src='logo-mint.png'/>
3135
</p>
3236
<p>
33-
This is a guide to install weewx from DEB package on systems such as Debian, Ubuntu or Mint.
34-
</p>
35-
<p>
36-
Installing from package will result in the following:
37-
<table class='locations'>
38-
<tr>
39-
<td align='right'>configuration file: </td>
40-
<td class='tty'>/etc/weewx/weewx.conf</td>
41-
</tr>
42-
<tr>
43-
<td align='right'>skins and templates: </td>
44-
<td class='tty'>/etc/weewx/skins</td>
45-
</tr>
46-
<tr>
47-
<td align='right'>sqlite databases: </td>
48-
<td class='tty'>/var/lib/weewx/</td>
49-
</tr>
50-
<tr>
51-
<td align='right'>web pages and images: </td>
52-
<td class='tty'>/var/lib/weewx/html</td>
53-
</tr>
54-
</table>
55-
</p>
37+
This is a guide to install weewx from DEB package on systems such as Debian, Ubuntu or Mint. The installation will result in the following layout:
38+
</p>
39+
<table class='locations'>
40+
<tr>
41+
<td align='right'>configuration file: </td>
42+
<td class='tty'>/etc/weewx/weewx.conf</td>
43+
</tr>
44+
<tr>
45+
<td align='right'>skins and templates: </td>
46+
<td class='tty'>/etc/weewx/skins</td>
47+
</tr>
48+
<tr>
49+
<td align='right'>sqlite databases: </td>
50+
<td class='tty'>/var/lib/weewx/</td>
51+
</tr>
52+
<tr>
53+
<td align='right'>web pages and images: </td>
54+
<td class='tty'>/var/lib/weewx/html</td>
55+
</tr>
56+
</table>
5657
<p>
5758
Installation must be done with root privileges.
5859
</p>
@@ -129,7 +130,7 @@ <h3>Uninstall</h3>
129130
</p>
130131

131132
<p class='copyright'>
132-
&copy; <a href='copyright.htm'>Copyright</a> Tom Keffer and others
133+
&copy; <a href='copyright.htm'>Copyright</a> Tom Keffer
133134
</p>
134135

135136
</body>

docs/installing.htm

+196
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,196 @@
1+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2+
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:v="urn:schemas-microsoft-com:vml">
3+
<!-- $Revision: 897 $ -->
4+
<!-- $Author: mwall $ -->
5+
<!-- $Date: 2013-02-01 09:20:18 -0500 (Fri, 01 Feb 2013) $ -->
6+
<head>
7+
<meta content="en-us" http-equiv="Content-Language" />
8+
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
9+
<title>weewx: Installing from Scratch</title>
10+
<link href="weewx_docs.css" rel="stylesheet" />
11+
<style type="text/css">
12+
.os-icons {
13+
float: right;
14+
}
15+
img {
16+
width: 60px;
17+
}
18+
.locations {
19+
margin-left: 20px;
20+
}
21+
</style>
22+
</head>
23+
<body>
24+
<h1 class="title">weewx: Installing from Scratch</h1>
25+
<p>
26+
These are generic instructions for installing
27+
<span class='code'>weewx</span>.
28+
</p>
29+
30+
<h1 id="Prerequisites">Prerequisites</h1>
31+
32+
<h2>Python</h2>
33+
<p>Python V2.5, V2.6, or V2.7 is required. Python V3.0 will not work. </p>
34+
35+
<h2>Python Packages</h2>
36+
<p>
37+
Some python packages are required for the main weewx engine, and may be
38+
required for specific hardware configuration.
39+
</p>
40+
<p>The weewx engine requires:</p>
41+
<ul>
42+
<li><a href="http://pypi.python.org/pypi/configobj/">configobj</a>
43+
(Version 4.5 or greater) Manages the configuration file
44+
<span class="code">weewx.conf</span>.</li>
45+
<li><a href="http://www.cheetahtemplate.org">Cheetah</a> (Version 2.0 or
46+
greater) The templating engine. </li>
47+
<li><a href="http://pypi.python.org/pypi/PIL">Python Imaging Library</a>
48+
(Version 1.1.6 or greater) Also known as PIL, this is included in many
49+
Python distributions.</li>
50+
</ul>
51+
<p>
52+
To use MySQL as the database (instead of the default <span class="code">sqlite</span>), you will also need (in addition to a MySQL server, of course):
53+
</p>
54+
<ul>
55+
<li><a href="https://sourceforge.net/projects/mysql-python/">MySQLdb for
56+
Python</a> (Version 1.2.3 or greater). This is the Python DBAPI2 adapter
57+
for MySQL.</li>
58+
</ul>
59+
<p>There is one optional package:</p>
60+
<ul>
61+
<li><a href="http://pypi.python.org/pypi/pyephem/">pyephem</a> (Version
62+
V3.7.3 or greater). For extended almanac information. If not installed,
63+
fallback information will be used. </li>
64+
</ul>
65+
<p>Some stations require a serial and/or USB package:</p>
66+
<ul>
67+
<li><a href="https://sourceforge.net/projects/pyusb/">pyusb</a> (Version 0.4 or greater). Driver for USB.</li>
68+
<li><a href="http://pypi.python.org/pypi/pyserial">pyserial</a> (Version 2.3 or greater) Driver for a serial connection.</li>
69+
</ul>
70+
71+
<h2>Time</h2>
72+
<p>The time on the VantagePro is automatically synchronized with the
73+
<span class="code">weewx</span> server nominally every four hours (changeable
74+
by the user). You should run a <a href="http://www.ntp.org/">NTP</a> daemon
75+
on your server to insure that it is synchronized with the correct time. Doing
76+
so will greatly reduce errors, especially if you send data to services such
77+
as the Weather Underground. </p>
78+
79+
<h2>System requirements</h2>
80+
<p>I run <span class="code">weewx</span> on a 500MHz system with an AMD
81+
Geode processor and 512 MB of memory. Configured this way, it
82+
consumes about 5% of the CPU and about 50MB of total memory. </p>
83+
84+
<h1>Downloading</h1>
85+
<p>The <span class='code'>weewx</span> software can be downloaded from
86+
SourceForge at <a href="http://sourceforge.net/projects/weewx/files">http://sourceforge.net/projects/weewx/files</a>
87+
</p>
88+
89+
<h1>Installing</h1>
90+
<p><span class="code">weewx</span> is &quot;Pure Python&quot;,
91+
which means that is 100% Python with no modules to compile.
92+
It uses the standard Python
93+
<a href="http://docs.python.org/install/index.html">distutils</a>
94+
install method, which is very easy and flexible.</p>
95+
96+
<h2>Unpacking</h2>
97+
<p>Start by unpacking the archive (substitute your version for X.Y.Z) into
98+
any convenient directory where you have write permission </p>
99+
<p class="tty">tar xvf weewx-X.Y.Z.tar.gz</p>
100+
<p>Then change directory into it: </p>
101+
<p class="tty">cd weewx-X.Y.Z </p>
102+
103+
<h2>Choosing where to install</h2>
104+
<p>The next step is to figure out where you want to install <span class="code">weewx</span>.
105+
<span class="code"><em>$WEEWX_INSTALL</em></span> represents the location
106+
where the root <span class="code">weewx</span> directory will be
107+
installed. By default, this location is
108+
<span class="code">/home/weewx</span>. However, it can be changed by
109+
editing the file <span class="code">setup.cfg</span> and changing the
110+
following line
111+
</p>
112+
<pre class="tty">home = /home/weewx</pre>
113+
<p>The nominal directory layout will be: </p>
114+
<table class="center" style="width: 60%" summary="Summarizing the nominal weewx directory layout">
115+
<tr>
116+
<td><span class="code"><em>$WEEWX_INSTALL</em>/bin</span></td>
117+
<td>Python packages and scripts</td>
118+
</tr>
119+
<tr>
120+
<td><span class="code"><em>$WEEWX_INSTALL</em>/weewx.conf</span></td>
121+
<td>Configuration file</td>
122+
</tr>
123+
<tr>
124+
<td><span class="code"><em>$WEEWX_INSTALL</em>/skins</span></td>
125+
<td style="height: 33px">Template skins and their configuration files</td>
126+
</tr>
127+
<tr>
128+
<td><span class="code"><em>$WEEWX_INSTALL</em>/archive</span></td>
129+
<td>sqlite3 archive and statistical databases</td>
130+
</tr>
131+
<tr>
132+
<td><span class="code"><em>$WEEWX_INSTALL</em>/public_html</span></td>
133+
<td>Generated HTML and .PNG images</td>
134+
</tr>
135+
</table>
136+
137+
<h2>Build and Install</h2>
138+
<p>Build the distribution </p>
139+
<pre class="tty">./setup.py build </pre>
140+
<p>Because <span class="code">weewx</span> is pure Python this doesn&#39;t
141+
compile anything, but it does arrange files for the final installation
142+
</p>
143+
<p>Then install it. If you have write permission in the directory where
144+
<span class="code">weewx</span> will go, then type </p>
145+
<p class="tty">./setup.py install </p>
146+
<p>Otherwise, if you do not have write permission, you will have to use
147+
<span class="code">sudo</span>:
148+
</p>
149+
<p class="tty">sudo ./setup.py install </p>
150+
151+
<h2>Permissions</h2>
152+
<p>Strictly speaking it is not necessary to install or run
153+
<span class="code">weewx</span> with root privileges. You only need
154+
read/write access to the serial port for your hardware. For example,
155+
if your hardware has a USB interface
156+
<span class='code'>/dev/ttyUSB0</span></p>
157+
<p class="tty">sudo chmod a+rw /dev/ttyUSB0 </p>
158+
<p>If you install into a directory where you have write permissions, you
159+
can install and run <span class="code">weewx</span> without root
160+
privileges. </p>
161+
162+
<h1>Upgrading</h1>
163+
<p>Before upgrading from a previous version of <span class="code">weewx</span>,
164+
check the <a href="upgrading.htm">Upgrade Guide</a>
165+
to see if there any specific actions required. </p>
166+
<p>Then follow the 'Build and Install' procedure above. </p>
167+
<p class='warning'><strong>Warning!</strong><br/>
168+
Before starting an upgrade, be sure to set <span class="code">home</span>
169+
in the file <span class="code">setup.cfg</span>.
170+
</p>
171+
<p>The build and install process will do the following for you: </p>
172+
<ul>
173+
<li>Save the old <span class="code">bin</span> directory as
174+
<span class="code"><em>$WEEWX_INSTALL</em>/bin.YYYYMMDDHHMMSS</span>
175+
where YYYYMMDDHHMMSS is a timestamp</li>
176+
<li>Install the new version in the <span class="code">bin</span>
177+
directory, while preserving any user extensions in the
178+
<span class="code">bin/user</span> directory</li>
179+
<li>Save a copy of the old <span class="code">weewx.conf</span> as
180+
<span class="code"><em>$WEEWX_INSTALL</em>/weewx.conf.YYYYMMDDHHMMSS</span>
181+
</li>
182+
<li>Merge any changes made to the old configuration file
183+
<span class="code">weewx.conf</span> into the new configuration file,
184+
then install the merged copy. This effectively causes any changes
185+
to override the values in the new version of <span class="code">weewx.conf</span>
186+
</li>
187+
<li>Install a <span class="code">skins</span> directory if
188+
one does not already exist. </li>
189+
</ul>
190+
191+
<p class='copyright'>
192+
&copy; <a href='copyright.htm'>Copyright</a> Tom Keffer
193+
</p>
194+
195+
</body>
196+
</html>

0 commit comments

Comments
 (0)