comparison docs/INSTALL.html @ 137:cfbecd3400d3

make install-docs, intermap, underlay, ... imported from: moin--main--1.5--patch-139
author Thomas Waldmann <tw@waldmann-edv.de>
date Sun, 23 Oct 2005 20:36:07 +0000
parents 77665d8e2254
children 6ddcb13c0f4e
comparison
equal deleted inserted replaced
136:3fd64124fc36 137:cfbecd3400d3
105 </ul> 105 </ul>
106 106
107 <h2 id="head-2fa431ad9c9bff5badd07c5ee676b19852ed28e3">Check if Python is working</h2> 107 <h2 id="head-2fa431ad9c9bff5badd07c5ee676b19852ed28e3">Check if Python is working</h2>
108 108
109 <p>MoinMoin needs Python to run, so the first step is to check if an usable version of Python is installed and correctly set-up. If this is not the case, you will have to fix that before you can proceed. </p> 109 <p>MoinMoin needs Python to run, so the first step is to check if an usable version of Python is installed and correctly set-up. If this is not the case, you will have to fix that before you can proceed. </p>
110 <p>The <tt>CHANGES</tt> file in the MoinMoin archive mentions what versions are supported. Python 2.2.2 is the minimum requirement for MoinMoin 1.3, but we suggest you use the latest Python 2.3.x version because Python 2.2.x has annoying known bugs. You can use Python 2.4.x if you want, it works well too. </p> 110 <p>The <tt>CHANGES</tt> file in the MoinMoin archive mentions what versions are supported. Python 2.3 is the minimum requirement for MoinMoin 1.5, but we suggest you use the latest Python release version. </p>
111 <p>You can download Python at <a class="external" href="http://www.python.org/download/"><img src="wiki/htdocs/modern/img/moin-www.png" alt="[WWW]" height="11" width="11"> http://www.python.org/download/</a>. </p> 111 <p>You can download Python at <a class="external" href="http://www.python.org/download/"><img src="wiki/htdocs/modern/img/moin-www.png" alt="[WWW]" height="11" width="11"> http://www.python.org/download/</a>. </p>
112 <p>If you are pretty sure an acceptable version of Python is installed but the commands below do not work, this may be because your Python files are not in the <em>search path</em>. Correctly setting the search path is outside the scope of this document; please ask for help on your favorite Python, Linux, or Windows discussion board. </p> 112 <p>If you are pretty sure an acceptable version of Python is installed but the commands below do not work, this may be because your Python files are not in the <em>search path</em>. Correctly setting the search path is outside the scope of this document; please ask for help on your favorite Python, Linux, or Windows discussion board. </p>
113 <p>If you have shell access, checking if Python is working is very simple. Just type the following command, and look at the result: 113 <p>If you have shell access, checking if Python is working is very simple. Just type the following command, and look at the result:
114 </p> 114 </p>
115 <pre> 115 <pre>
125 echo "Your web server is running as:" 125 echo "Your web server is running as:"
126 id 126 id
127 echo "CGI scripts work" 127 echo "CGI scripts work"
128 echo "Now we try to invoke Python interpreters and get their versions:" 128 echo "Now we try to invoke Python interpreters and get their versions:"
129 python -V 2&gt;&amp;1 129 python -V 2&gt;&amp;1
130 python2 -V 2&gt;&amp;1
131 python2.0 -V 2&gt;&amp;1
132 python2.1 -V 2&gt;&amp;1
133 python2.2 -V 2&gt;&amp;1
134 python2.3 -V 2&gt;&amp;1 130 python2.3 -V 2&gt;&amp;1
135 python2.4 -V 2&gt;&amp;1 131 python2.4 -V 2&gt;&amp;1
136 echo "Finished." 132 echo "Finished."
137 </pre> 133 </pre>
138 <p>If it doesn't display "CGI scripts work", well, then CGI scripts don't work. If it doesn't show one or more Python version numbers, then Python is not correctly installed. In both cases, before you can proceed, you will have to get in touch with the administrator of the server so that the problems get corrected. </p> 134 <p>If it doesn't display "CGI scripts work", well, then CGI scripts don't work. If it doesn't show one or more Python version numbers, then Python is not correctly installed. In both cases, before you can proceed, you will have to get in touch with the administrator of the server so that the problems get corrected. </p>
139 <p>Also be sure to read <a href="http://moinmaster.wikiwikiweb.de/HelpOnInstalling/ApacheOnLinuxFtp">../ApacheOnLinuxFtp</a> after you've completed the <a href="http://moinmaster.wikiwikiweb.de/HelpOnInstalling/BasicInstallation">../BasicInstallation</a> illustrated here. </p> 135 <p>Also be sure to read <a href="http://moinmaster.wikiwikiweb.de/HelpOnInstalling/ApacheOnLinuxFtp">../ApacheOnLinuxFtp</a> after you've completed the <a href="http://moinmaster.wikiwikiweb.de/HelpOnInstalling/BasicInstallation">../BasicInstallation</a> illustrated here. </p>
140 136
141 <h2 id="head-119b1acf8110bb618e4f366c3d1f8a35ad625f75">Download MoinMoin</h2> 137 <h2 id="head-119b1acf8110bb618e4f366c3d1f8a35ad625f75">Download MoinMoin</h2>
142 138
143 <p>To download the distribution archive, go to the <a class="external" href="http://sourceforge.net/project/showfiles.php?group_id=8482"><img src="wiki/htdocs/modern/img/moin-www.png" alt="[WWW]" height="11" width="11"> download area</a> and fetch the lastest archive. </p> 139 <p>To download the distribution archive, go to the <a class="external" href="http://sourceforge.net/project/showfiles.php?group_id=8482"><img src="wiki/htdocs/modern/img/moin-www.png" alt="[WWW]" height="11" width="11"> download area</a> and fetch the latest archive. </p>
144 <p>The next step is to unpack the distribution archive (which you have done already if you are reading this text from your hard drive). If you read this on the web, the distribution comes in a versioned <tt>.tar.gz</tt> archive, which you can unpack as shown below. </p> 140 <p>The next step is to unpack the distribution archive (which you have done already if you are reading this text from your hard drive). If you read this on the web, the distribution comes in a versioned <tt>.tar.gz</tt> archive, which you can unpack as shown below. </p>
145 <ul> 141 <ul>
146 <li><p> On Windows </p> 142 <li><p> On Windows </p>
147 <ul> 143 <ul>
148 <li><p> You can use recent versions of programs like WinZip, WinRar, and WinAce, which handle .tar.gz kind of archives. </p> 144 <li><p> You can use recent versions of programs like WinZip, WinRar, and WinAce, which handle .tar.gz kind of archives. </p>
158 <li><p> At any shell prompt, you can use the <tt>tar</tt> command. </p> 154 <li><p> At any shell prompt, you can use the <tt>tar</tt> command. </p>
159 </li> 155 </li>
160 </ul> 156 </ul>
161 </li> 157 </li>
162 </ul> 158 </ul>
163 <p>The distribution archive will always unpack into a directory named <tt>moin-&lt;version&gt;</tt>, for example <tt>moin-1.3</tt>. </p> 159 <p>The distribution archive will always unpack into a directory named <tt>moin-&lt;version&gt;</tt>, for example <tt>moin-1.5</tt>. </p>
164 <p>Here is how you would unpack the archive (using GNU tar) and enter the directory with the MoinMoin files: 160 <p>Here is how you would unpack the archive (using GNU tar) and enter the directory with the MoinMoin files:
165 </p> 161 </p>
166 <pre> 162 <pre>
167 &gt; tar xzf moin-1.3.1.tar.gz 163 &gt; tar xzf moin-1.5.0.tar.gz
168 &gt; cd moin-1.3.1 164 &gt; cd moin-1.5.0
169 </pre> 165 </pre>
170 166
171 <h2 id="head-a84e58c8b4256bd645b9c47b5a900219a356259f">Install MoinMoin</h2> 167 <h2 id="head-a84e58c8b4256bd645b9c47b5a900219a356259f">Install MoinMoin</h2>
172 168
173 <p>You can install MoinMoin to either: </p> 169 <p>You can install MoinMoin to either: </p>
884 </p> 880 </p>
885 <pre> 881 <pre>
886 data_dir = '/var/www/moin/mywiki/data/' 882 data_dir = '/var/www/moin/mywiki/data/'
887 data_underlay_dir = '/var/www/moin/mywiki/underlay/' 883 data_underlay_dir = '/var/www/moin/mywiki/underlay/'
888 </pre> 884 </pre>
885 <p>If you do not want to use absolute paths, you can use Python's os module to construct the relative paths: </p>
886 <pre>
887 import os
888 data_dir = os.path.join(os.path.dirname(__file__), 'data/')
889 data_underlay_dir = os.path.join(os.path.dirname(__file__), 'underlay/')
890 </pre>
889 <p>Test that the wiki works after this change. </p> 891 <p>Test that the wiki works after this change. </p>
890 <ul> 892 <ul>
891 <li style="list-style-type:none"><p><img src="wiki/htdocs/modern/img/idea.png" alt="(!)" height="15" width="15"> In 1.2 and earlyer, the configuration file is called <tt>moin_config.py</tt>. </p> 893 <li style="list-style-type:none"><p><img src="wiki/htdocs/modern/img/idea.png" alt="(!)" height="15" width="15"> In 1.2 and earlyer, the configuration file is called <tt>moin_config.py</tt>. </p>
892 </li> 894 </li>
893 </ul> 895 </ul>
894 896
895 <h3 id="head-b628477f88ab294636a22af4ee665656a8897b3a">Changes to Apache `httpd.conf`</h3> 897 <h3 id="head-b628477f88ab294636a22af4ee665656a8897b3a">Changes to Apache `httpd.conf`</h3>
896 898
897 <p>After you wiki is running as cgi script, conver it to run with mod_python. </p> 899 <p>After your wiki is running as cgi script, convert it to run with mod_python. </p>
898 <p>If you run your wiki as cgi as we recommended before, remove or comment the <a class="nonexistent" href="http://moinmaster.wikiwikiweb.de/ScriptAlias">ScriptAlias</a> directive: 900 <p>If you run your wiki as cgi as we recommended before, remove or comment the <a class="nonexistent" href="http://moinmaster.wikiwikiweb.de/ScriptAlias">ScriptAlias</a> directive:
899 </p> 901 </p>
900 <pre> 902 <pre>
901 #ScriptAlias /mywiki "/var/www/moin/mywiki/moin.cgi" 903 #ScriptAlias /mywiki "/var/www/moin/mywiki/moin.cgi"
902 </pre> 904 </pre>
908 # Add the path of your wiki directory 910 # Add the path of your wiki directory
909 PythonPath "['/var/www/moin/mywiki'] + sys.path" 911 PythonPath "['/var/www/moin/mywiki'] + sys.path"
910 PythonHandler MoinMoin.request::RequestModPy.run 912 PythonHandler MoinMoin.request::RequestModPy.run
911 &lt;/Location&gt; 913 &lt;/Location&gt;
912 </pre> 914 </pre>
913 <p>If you have multiple <a href="http://moinmaster.wikiwikiweb.de/MoinMoin">MoinMoin</a> instances then add one location directive for each one (changing the paths as appropriate). </p> 915 <p>If you have multiple <a href="http://moinmaster.wikiwikiweb.de/MoinMoin">MoinMoin</a> instances then add one location directive for each one (changing the paths as appropriate) and add a line with the directive <tt>PythonInterpreter&nbsp;mywiki</tt> to each Location section. With this directive different subinterpreters with completely separate namespaces will be used for each wiki (see <a class="external" href="http://modpython.org/live/current/doc-html/pyapi-interps.html"><img src="wiki/htdocs/modern/img/moin-www.png" alt="[WWW]" height="11" width="11"> here</a> for details). </p>
914 <p>If you did not install <a href="http://moinmaster.wikiwikiweb.de/MoinMoin">MoinMoin</a> in the default location, you will have to add the path to <a href="http://moinmaster.wikiwikiweb.de/MoinMoin">MoinMoin</a> to the system path: 916 <p>If you did not install <a href="http://moinmaster.wikiwikiweb.de/MoinMoin">MoinMoin</a> in the default location, you will have to add the path to <a href="http://moinmaster.wikiwikiweb.de/MoinMoin">MoinMoin</a> to the system path:
915 </p> 917 </p>
916 <pre> 918 <pre>
917 PythonPath "['/var/www/moin/mywiki', '/prefix/lib/python2.x/site-packages'] + sys.path" 919 PythonPath "['/var/www/moin/mywiki', '/prefix/lib/python2.x/site-packages'] + sys.path"
918 </pre> 920 </pre>
1682 <p>C:\My Documents\Moin</p> 1684 <p>C:\My Documents\Moin</p>
1683 </td> 1685 </td>
1684 </tr> 1686 </tr>
1685 </table> 1687 </table>
1686 </div> 1688 </div>
1687 <p>This installation procedure was tested with Apache 1.3.26 and Apache 2.0.44 for Windows running on Windows ME, and using Python 2.2.2 and 2.3. </p> 1689 <p>This installation procedure was tested with Apache 1.3.26 and Apache 2.0.44 for Windows running on Windows ME, and using Python 2.3. </p>
1688 1690
1689 <h3 id="head-18c7f9f6c7f20cad8a2598f80aba6a6b36bae585">Preparation</h3> 1691 <h3 id="head-18c7f9f6c7f20cad8a2598f80aba6a6b36bae585">Preparation</h3>
1690 1692
1691 1693
1692 <h4 id="head-ce3f1899eb42247cc89c79893ca80eb5da56d2d4">MSI Installer</h4> 1694 <h4 id="head-ce3f1899eb42247cc89c79893ca80eb5da56d2d4">MSI Installer</h4>
1712 1714
1713 <h4 id="head-55b68c00864e2a0be48f87115a45f6a17a76bcc0">Installing Python</h4> 1715 <h4 id="head-55b68c00864e2a0be48f87115a45f6a17a76bcc0">Installing Python</h4>
1714 1716
1715 <p>There are currently two different distributions of Python available for Windows. The normal Python distribution is available from <a href="http://www.python.org"><img src="wiki/htdocs/modern/img/moin-www.png" alt="[WWW]" height="11" width="11"> http://www.python.org</a>. This is distributed as a windows executable (.exe) file. </p> 1717 <p>There are currently two different distributions of Python available for Windows. The normal Python distribution is available from <a href="http://www.python.org"><img src="wiki/htdocs/modern/img/moin-www.png" alt="[WWW]" height="11" width="11"> http://www.python.org</a>. This is distributed as a windows executable (.exe) file. </p>
1716 <p>An alternative distribution called <strong>ActivePython</strong> is available from <a href="http://www.activestate.com/"><img src="wiki/htdocs/modern/img/moin-www.png" alt="[WWW]" height="11" width="11"> http://www.activestate.com/</a>. This distribution uses the MSI Installer and contains some tools specific to the Windows operating system and a popular Windows IDE called Pythonwin. ActivePython is available for free; an email address is requested (but not required) before downloading. </p> 1718 <p>An alternative distribution called <strong>ActivePython</strong> is available from <a href="http://www.activestate.com/"><img src="wiki/htdocs/modern/img/moin-www.png" alt="[WWW]" height="11" width="11"> http://www.activestate.com/</a>. This distribution uses the MSI Installer and contains some tools specific to the Windows operating system and a popular Windows IDE called Pythonwin. ActivePython is available for free; an email address is requested (but not required) before downloading. </p>
1717 <p>MoinMoin will work with either distribution, but requires Python release 2.2.2 or later. Download and install the distribution of your choice. Questions and problems dealing with the Python installation process should be resolved through the use of resources provided by Python.org or ActiveState. Be sure your Python installation is correct before proceeding. </p> 1719 <p>MoinMoin will work with either distribution, but requires Python release 2.3 or later. Download and install the distribution of your choice. Questions and problems dealing with the Python installation process should be resolved through the use of resources provided by Python.org or ActiveState. Be sure your Python installation is correct before proceeding. </p>
1718 1720
1719 <h3 id="head-c76f9a659995f587c02878baf3877ab5bd08a5bd">Installing MoinMoin</h3> 1721 <h3 id="head-c76f9a659995f587c02878baf3877ab5bd08a5bd">Installing MoinMoin</h3>
1720 1722
1721 <p>Download the current version of MoinMoin from <a href="http://moinmoin.wikiwikiweb.de/"><img src="wiki/htdocs/modern/img/moin-www.png" alt="[WWW]" height="11" width="11"> http://moinmoin.wikiwikiweb.de/</a> into <tt>C:\TEMP</tt> or an alternative location. To extract the <em>.tar.gz</em>-format archive, you may use WinZip. </p> 1723 <p>Download the current version of MoinMoin from <a href="http://moinmoin.wikiwikiweb.de/"><img src="wiki/htdocs/modern/img/moin-www.png" alt="[WWW]" height="11" width="11"> http://moinmoin.wikiwikiweb.de/</a> into <tt>C:\TEMP</tt> or an alternative location. To extract the <em>.tar.gz</em>-format archive, you may use WinZip. </p>
1722 <p>You should then have a folder such as <tt>C:\TEMP\moin-x.x</tt> where "x.x" is the current release number. This folder will contain a <tt>setup.py</tt> file in addition to several other files and subfolders. </p> 1724 <p>You should then have a folder such as <tt>C:\TEMP\moin-x.x</tt> where "x.x" is the current release number. This folder will contain a <tt>setup.py</tt> file in addition to several other files and subfolders. </p>
1725 <pre> 1727 <pre>
1726 C: 1728 C:
1727 cd \TEMP\moin-x.x 1729 cd \TEMP\moin-x.x
1728 C:\Python\python setup.py install --record=install.log 1730 C:\Python\python setup.py install --record=install.log
1729 </pre> 1731 </pre>
1730 <p>The above commands will add MoinMoin to your <tt>C:\Python</tt> installation and create an <tt>install.log</tt> file in <tt>C:\temp\moin-x.x</tt> listing all the copied files. You may use Windows Explorer to examine the newly created folders within <tt>C:\Python</tt>. You should find a <tt>C:\Python\share\moin</tt> folder. With Python 2.2 and later you will also find a <tt>C:\Python\Lib\site-packages\MoinMoin</tt> folder. The <tt>MoinMoin</tt> folder contains many Python scripts and several subfolders. </p> 1732 <p>The above commands will add MoinMoin to your <tt>C:\Python</tt> installation and create an <tt>install.log</tt> file in <tt>C:\temp\moin-x.x</tt> listing all the copied files. You may use Windows Explorer to examine the newly created folders within <tt>C:\Python</tt>. You should find a <tt>C:\Python\share\moin</tt> folder. With Python 2.3 and later you will also find a <tt>C:\Python\Lib\site-packages\MoinMoin</tt> folder. The <tt>MoinMoin</tt> folder contains many Python scripts and several subfolders. </p>
1731 <p>You are now ready to create a wiki instance. </p> 1733 <p>You are now ready to create a wiki instance. </p>
1732 1734
1733 <h3 id="head-ba9ed0d8dd27b7bc62472aa0d24e8102dd103deb">Creating a Wiki Instance</h3> 1735 <h3 id="head-ba9ed0d8dd27b7bc62472aa0d24e8102dd103deb">Creating a Wiki Instance</h3>
1734 1736
1735 <p>It is a good practice to try to keep all of your personal or site specific data under a few root folders. This way you can easily backup your important data on a regular basis without having to waste time either backing up static files or picking out dozens of important folders scattered throughout your folder structure. You should avoid placing your wiki data under the <tt>C:\Python</tt> folder so that you can later upgrade Python or MoinMoin without accidentally overwriting or deleting your wiki data. For the same reason, you probably don't want to place your wiki data within the <tt>C:\Apache</tt> folder. The default personal folder under many Windows versions is called <tt>C:\My&nbsp;Documents</tt>. </p> 1737 <p>It is a good practice to try to keep all of your personal or site specific data under a few root folders. This way you can easily backup your important data on a regular basis without having to waste time either backing up static files or picking out dozens of important folders scattered throughout your folder structure. You should avoid placing your wiki data under the <tt>C:\Python</tt> folder so that you can later upgrade Python or MoinMoin without accidentally overwriting or deleting your wiki data. For the same reason, you probably don't want to place your wiki data within the <tt>C:\Apache</tt> folder. The default personal folder under many Windows versions is called <tt>C:\My&nbsp;Documents</tt>. </p>
1894 </ol> 1896 </ol>
1895 </p> 1897 </p>
1896 1898
1897 <h3 id="head-060b14babb0736cc50274d972342cb03248902b9">Requirements</h3> 1899 <h3 id="head-060b14babb0736cc50274d972342cb03248902b9">Requirements</h3>
1898 1900
1899 <p>Before you install <a class="interwiki" title="MoinMoin" href="http://moinmoin.wikiwikiweb.de/MoinMoin"><img src="wiki/htdocs/modern/img/moin-inter.png" alt="[MoinMoin]" height="16" width="16">MoinMoin</a>, make sure you have the necessary infra-structure in place, namely the <em>Internet Information Services</em> webserver (any version should be OK), and a <em>Python</em> installation (version 2.2.2 is required, 2.3 or higher is recommended). </p> 1901 <p>Before you install <a class="interwiki" title="MoinMoin" href="http://moinmoin.wikiwikiweb.de/MoinMoin"><img src="wiki/htdocs/modern/img/moin-inter.png" alt="[MoinMoin]" height="16" width="16">MoinMoin</a>, make sure you have the necessary infra-structure in place, namely the <em>Internet Information Services</em> webserver (any version should be OK), and a <em>Python</em> installation (version 2.3 is required, the latest python release is recommended). </p>
1900 <p>In the following description, we assume that you have installed or will install things to these locations: </p> 1902 <p>In the following description, we assume that you have installed or will install things to these locations: </p>
1901 <ul> 1903 <ul>
1902 <li><p> IIS to its default location </p> 1904 <li><p> IIS to its default location </p>
1903 </li> 1905 </li>
1904 <li><p> <tt>C:\Python</tt> - the Python interpreter </p> 1906 <li><p> <tt>C:\Python</tt> - the Python interpreter </p>
2133 echo "Your web server is running as:" 2135 echo "Your web server is running as:"
2134 id 2136 id
2135 echo "CGI scripts work" 2137 echo "CGI scripts work"
2136 echo "Now we try to invoke Python interpreters and get their versions:" 2138 echo "Now we try to invoke Python interpreters and get their versions:"
2137 python -V 2&gt;&amp;1 2139 python -V 2&gt;&amp;1
2138 python2 -V 2&gt;&amp;1
2139 python2.0 -V 2&gt;&amp;1
2140 python2.1 -V 2&gt;&amp;1
2141 python2.2 -V 2&gt;&amp;1
2142 python2.3 -V 2&gt;&amp;1 2140 python2.3 -V 2&gt;&amp;1
2143 python2.4 -V 2&gt;&amp;1 2141 python2.4 -V 2&gt;&amp;1
2144 echo "Finished." 2142 echo "Finished."
2145 </pre> 2143 </pre>
2146 <p>to see if you can get it to announce that cgi works. Then you will also know which versions of python are usable. This is especially handy for users with no root access. </p> 2144 <p>to see if you can get it to announce that cgi works. Then you will also know which versions of python are usable. This is especially handy for users with no root access. </p>