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
|
<!--#set var="revision" value="\$Id: install.html,v 1.13.2.3 2006/11/13 03:14:07 ot Exp $"
--><!--#set var="date" value="\$Date: 2006/11/13 03:14:07 $"
--><!--#set var="title" value="Installation Documentation for The W3C Markup Validation Service"
--><!--#set var="relroot" value="../"
--><!--#include virtual="../header.html" -->
<div class="doc">
<h2>Installation information <br />for the W3C Markup Validator</h2>
<h3 id="TableOfContents">Table of Contents</h3>
<div id="toc">
<ul>
<li><a href="#otherguides">This guide, and other guides</a></li>
<li><a href="#install-package">Installing on packaged systems</a></li>
<li><a href="#install-fromsource">Install from source</a> (generic case)
<ul>
<li><a href="#install-download">Download</a></li>
<li><a href="#install-prereq">Prerequisites</a></li>
<li><a href="#install-components">Install components</a></li>
<li><a href="#install-configure">Configure</a></li>
<li><a href="#install-check">Check the installation</a></li>
</ul>
</li>
<li><a href="#install-troubleshoot">Installation troubleshooting</a></li>
<li><a href="#post-install">Post-install options</a></li>
<li><a href="#credits">Credits and Acknowledgments</a></li>
</ul>
</div>
<div id="install" class="stb">
<a name="skip" id="skip"> </a>
<h3 id="otherguides">This guide, and other guides</h3>
<h4>Other installation guides</h4>
<p>The installation guide we provide here is a rather generic set of instructions,
which should work on most systems. To our knowledge, the following platform-specific
guides are also available and can be of interest :</p>
<ul>
<li><a href="http://developer.apple.com/internet/opensource/validator.html">Mac OS X and OS X Server</a>
at the Apple Developer Connection,</li>
<li><a href="http://www.mediaville.net/articles/validator/">Mac OS X and OS X Server</a>
by Stephen Yoch,</li>
<li><a href="install_win.html">Windows</a>, by David Tibbe</li>
<li><a href="http://lists.w3.org/Archives/Public/www-validator/2003Dec/0023.html">Linux (Slackware)</a>
by Nick Talbott</li>
</ul>
<h4>Related documentation</h4>
<p>This installation guides presumes knowledge of the <a href="../source/">Source availability</a> for the
Markup Validator.</p>
<p>We recommend that <a href="devel.html">developers</a> wishing to contribute on the Markup Validator or modify it
go through this installation procedure once, to get familiar with the system.</p>
<h3 id="install-package">Installing on packaged systems</h3>
<p>The easiest way to install released versions of the Markup Validator is to use the packages created
for some platforms by contributors: Debian GNU/Linux and Fedora Core packages are
<a href="../source/">available</a>.</p>
<h3 id="install-fromsource">Installing from source (generic case)</h3>
<p>These instructions are strongly inspired from Nick Talbott's guide for Slackware Linux. Thanks Nick!</p>
<h4><a id="install-download" name="install-download"></a>Download</h4>
<p>Download the <a href="http://validator.w3.org/validator.tar.gz">Validator's Tar Ball</a>
and the <a href="http://validator.w3.org/sgml-lib.tar.gz">DTD library</a> from our site.</p>
<p>Alternatively, if you want to work on the latest development version, you can download
both from our CVS repository, but you should be aware that this version may not work at all.</p>
<p>(<a href="../source/">Read more</a> about retrieving the source)</p>
<h4><a id="install-prereq" name="install-prereq"></a>Prerequisites</h4>
<p>
Apart from a properly configured Web server, the Validator needs a
SGML parser -- that does all the hard work --, Perl (version 5.6.0
or newer) and several Perl modules used by the "check" CGI script.
</p>
<h5>SGML Parser: OpenSP</h5>
<p>
The SGML parser we're currently using is <code>OpenSP 1.5</code>,
which can be found on the
<a href="http://openjade.sourceforge.net/">OpenJade home page</a>.
Do <em>not</em> try to run the Validator with an earlier than 1.5
version of OpenSP. It will not work. If one hacks it to "work"
with such a version, a potential security hole will also open.
Just use OpenSP 1.5 or later.
</p>
<h5>Perl Modules</h5>
<p>
The canonical list of Perl modules we use can be found in the source
for the "check" CGI script. There is a bunch of lines that of the form
"use Foo::Bar" where each "Foo::Bar" represents a module. Most modules
can be found on <a href="http://www.cpan.org/"><acronym
title="Comprehensive Perl Archive Network">CPAN</acronym></a>
(minimum versions in parenthesis after the name). The following
list was complete when CVS spit out:
<code>$Date: 2006/11/13 03:14:07 $</code>. <tt>:-)</tt>
</p>
<p>
One easy - and strongly recommended - way to take care of all these
Perl module dependencies is to install
<a href="http://search.cpan.org/dist/Bundle-W3C-Validator/">Bundle-W3C-Validator</a>
from CPAN. See the <a href="http://search.cpan.org/dist/Bundle-W3C-Validator/lib/Bundle/W3C/Validator.pm">documentation included with it</a>
for more details.
</p>
<h5>List of required Perl module distributions</h5>
<dl>
<dt><a href="http://search.cpan.org/dist/CGI.pm/">CGI.pm</a> >= 2.81</dt>
<dd>
The all-singing, all-dancing,
everything-<em>and</em>-the-kitchen-sink, Perl CGI library. This
takes care of all those niggly little bits of CGI for us and make
options parsing and file upload a breeze.
</dd>
<dt><a href="http://search.cpan.org/dist/Config-General/">Config-General</a> >= 2.19</dt>
<dd>
Configuration file handling.
</dd>
<dt><a href="http://search.cpan.org/dist/HTML-Parser/">HTML-Parser</a> >= 3.25</dt>
<dd>
Minimal HTML parser used for preparse and finding metadata.
</dd>
<dt><a href="http://search.cpan.org/dist/HTML-Template/">HTML-Template</a> >= 2.6</dt>
<dd>
Template system which allows us to separate Validator's logic and
presentation.
</dd>
<dt><a href="http://search.cpan.org/dist/libwww-perl/">libwww-perl</a> >= 5.60</dt>
<dd>
Gisle Aas' most excellent WWW library for Perl. This is where our
support for downloading pages off the net comes from. Version 5.60
or newer is required, however we strongly suggest a (much) newer
version. Validator's support for compressed responses is available
with version 5.802 and later. If you want your Validator to
support <abbr title="Secure Sockets Layer">SSL</abbr>/<abbr
title="Transport Layer Security">TLS</abbr>, see
<a href="http://search.cpan.org/dist/libwww-perl/README.SSL">README.SSL</a>
included in the libwww-perl distribution.
</dd>
<dt><a href="http://search.cpan.org/dist/Net-IP/">Net-IP</a></dt>
<dd>
IP address manipulation.
</dd>
<dt><a href="http://search.cpan.org/dist/Set-IntSpan/">Set-IntSpan</a></dt>
<dd>
Efficient set operations.
</dd>
<dt><a href="http://search.cpan.org/dist/Text-Iconv/">Text-Iconv</a></dt>
<dd>
Perl-native interface to the (g)libc iconv(3) library. Handles
character set conversion issues.
</dd>
<dt><a href="http://search.cpan.org/dist/URI/">URI</a></dt>
<dd>
Library to handle URIs and escaping special characters in them.
</dd>
</dl>
<h4><a id="install-components" name="install-components"></a>Install the various necessary components:</h4>
<ol>
<li><p>The installation guide assumes that you have a working Web server. We suggest
the popular Apache server, which is used for the W3C Markup Validation service.
The validator may work with other Web servers than the popular Apache, but
we can not guarantee that it will. You will also need a working installation
of the Perl language (standard on most Web servers).</p></li>
<li><p>Proceed with the Prerequisites, as detailed above.</p></li>
<li><p>Create a directory for the validator's installation. On Unix-based systems,
the default will be <code>/usr/local/validator</code>. This
directory will be referred to as <code>[validatorpath]</code>
throughout this guide.</p></li>
<li>
<p>
Unpack the archives of the validator and DTD library into a
temporary directory, and copy the directories
<code>htdocs</code>, <code>httpd/cgi-bin</code>, and
<code>share</code> from <code>validator-<em>X.X.X</em></code>
into <code>[validatorpath]</code>.
</p>
<p>
The <code>[validatorpath]</code> directory should now have
subdirectories named <code>cgi-bin</code>, <code>htdocs</code>,
and and <code>share</code>.
</p>
</li>
</ol>
<h4><a id="install-configure" name="install-configure"></a>Configure</h4>
<h5>Configuration files</h5>
<p>
For reference, here is an overview of all the configuration files for
the Markup Validator.
</p>
<p>
The validator uses a number of configuration files -- most of which
are really mapping tables of some form -- to avoid having to check in
a new version of the code every time a new version of HTML comes out.
All configuration files can be found in
<code>htdocs/config/</code>.
</p>
<p>
To really understand what each does you should read the source, but
here is a short description to get you started.
</p>
<dl>
<dt>validator.conf</dt>
<dd>
The validator's <strong>main configuration file</strong>. This will
generally be the only file you need to edit. It sets various parameters, such as:
the address of the maintainer, the URL for the "Home Page", various file paths and locations,
whether the <a href="api.html">API</a> is enabled, etc.
</dd>
<dt>charset.cfg</dt>
<dd>
Maps character sets to conversion parameters for validator's
internal UTF-8 conversion.
</dd>
<dt>eref.cfg</dt>
<dd>
Contains the mappings from element names to a URL path
(relative to a configurable URL) for their definitions. Used
in output when the "Show Parse Tree" option is enabled.
</dd>
<dt>types.conf</dt>
<dd>
Maps MIME/HTTP Content-Types to an internal "document type" which
is used for treating HTML, XML, and XHTML in different ways.
</dd>
</dl>
<h5>Configure the Web server</h5>
<p>The following instructions are for the Apache Web server, and should be adapted
if you plan on using another server.</p>
<ol>
<li>
<p>
Edit the configuration of your Web server to refer to the
specific configuration file for the validator.
</p>
<p>
This can be done by inserting the contents of the
<code>httpd/conf/httpd.conf</code> file (from where you
unpacked the validator's tarball above) in your
<code>httpd.conf</code>, or by copying the file somewhere
and including it like:
</p>
<pre>Include /where/you/copied/it/httpd.conf</pre>
<p>
Then, start editing the validator specific part.
</p>
</li>
<li><p>You may want to set up a "virtual server" for the service. This can be done
by adding something similar to the following :</p>
<pre><VirtualHost 127.0.0.1>
DocumentRoot [validatorpath]/htdocs/
ServerName validator.example.org
</VirtualHost></pre>
<p><strong>AND/OR</strong> you may want to have the service at a specific location
on your Web server, which can be configured as follows :</p>
<pre>Alias /validator/ [validatorpath]/htdocs/</pre>
</li>
<li><p>Finish editing this HTTP server configuration file, adapting
all the directory references to reflect the paths used in your installation.</p></li>
<li><p>Now restart the Web server to activate the updated configuration.</p><p> For Apache
this is done by typing into a shell, as System Administrator:
<code>apachectl graceful</code> (or, for older versions of Apache
<code>apachectl configtest</code> then <code>apachectl restart</code>)</p></li>
</ol>
<h5>Configure the Validator itself</h5>
<ol>
<li>
<p>
Create the directory <code>/etc/w3c</code> and copy a the files
from <code>[validatorpath]/htdocs/config/</code> to it.
</p>
</li>
<li>
<p>
Edit <code>/etc/w3c/validator.conf</code> to reflect where files
are in your installation, and configure other parameters there as
you wish. This file is well commented and modifying it should be
relatively straightforward.
</p>
</li>
</ol>
<h4><a id="install-check" name="install-check"></a>Check the installation</h4>
<ol>
<li><p>Point your browser at the new site.</p></li>
<li><p>Check the error log of the Web server to get clues on what may be wrong
if you get any server errors.</p></li>
</ol>
<p><strong>Help us</strong> improve this installation guide by sending us your feedback
if you install the validator on your local system!</p>
<h3 id="install-troubleshoot">Troubleshooting a new installation</h3>
<p>It is not always easy to troubleshoot an incomplete, or failed, installation of
the Markup Validator. While the instructions given in this page should help most people
install the validator successfully on their system, bad luck, a forgotten step
or a broken component can make things go sour.</p>
<h4>Double check the installation steps</h4>
<p>The first sound thing to do if the installation failed would be to check that you did not forget
any step while installing. properly copying and editing the configuration file is among the common
mistakes, for example.</p>
<h4>Check the logs</h4>
<p>The error logs for your Web server should be a good first place to look for hints on what
is wrong with your installation.</p>
<h4>Check the dependencies</h4>
<p>A common problem with a newly installed validator is a validator that is apparently running
but marking anything as "invalid", without giving any error message as output.</p>
<p>This is somewhat typical of a problem with OpenSP. Cross-check that you actually have a version
above 1.5, by running <kbd>onsgmls --version</kbd>.</p>
<h4>The miracle debug options</h4>
<p>If the validator is misbehaving, you can try forcing various debug options by appending to
the URL the following string: <kbd>&debug=1&errors=1&esis=1&verbose=1</kbd></p>
<p>This can sometimes provide you with error messages that would not have appeared anywhere in
non-debug mode, and can be helpful to diagnose the problem</p>
<h4>If all fails...</h4>
<p>Don't hesitate to contact the public mailing-list www-validator@w3.org with all the details
you can provide on what you did, tried, and what went wrong...</p>
<h3 id="post-install">Post-install options</h3>
<p>if the installation succeeded, you should be able to now use the Markup Validator on your own
system and network. You may want to give the validator a look and feel specific to your Web site.
The easiest way to achieve this is to edit <code>header.html</code> and <code>footer.html</code>
(in the <code>htdocs</code> directory), the header and footer markup snippets used to build all
pages for the validator.</p><p> You may also edit the Style Sheets (in the same directory),
especially <code>base.css</code> You may however want to avoid editing the other CSS files too
heavily, there is a risk you could make the output of the validator unusable.</p>
</div>
<div id="credits" class="stb">
<h3>Credits and Acknowledgments</h3>
<p>The Validator Team wishes to thank Nick Talbott and Stephen Yoch for their help
in creating these installation instructions. Thanks also to all the people who
use and review the guide to make it better and better!</p>
</div>
</div>
<!--#include virtual="../footer.html" -->
</body>
</html>
|