none
[openafs-wiki.git] / TWiki / TWikiInstallationGuide.mdwn
1 # <a name="TWiki Installation Guide"></a><a name=" TWiki Installation Guide"></a> TWiki Installation Guide
2
3 **The following is installation instructions for the TWiki 4.1 production release on an Apache web server on Linux.** Visit TWiki:TWiki.InstallingTWiki for the latest updates to this guide and supplemental information for installing or upgrading TWiki, including notes on installing TWiki on different platforms, environments and web hosting sites.
4
5 If you are upgrading from a previous version of TWiki, you probably want to read [[TWikiUpgradeGuide]] instead (both this document and the TWikiUpgradeGuide are also available in the root of the distribution as HTML files)
6
7 <div>
8   <ul>
9     <li><a href="#Preparing to install TWiki"> Preparing to install TWiki</a></li>
10     <li><a href="#Basic Installation"> Basic Installation</a></li>
11     <li><a href="#Important Server Security Settin"> Important Server Security Settings</a></li>
12     <li><a href="#Next Steps"> Next Steps</a></li>
13     <li><a href="#Enable Authentication of Users"> Enable Authentication of Users</a></li>
14     <li><a href="#Set TWiki Preferences"> Set TWiki Preferences</a></li>
15     <li><a href="#Enable Email Notification"> Enable Email Notification</a></li>
16     <li><a href="#Enable _WebStatistics"> Enable WebStatistics</a></li>
17     <li><a href="#Automate removal of expired sess"> Automate removal of expired sessions and lease files</a></li>
18     <li><a href="#Enable Localisation"> Enable Localisation</a></li>
19     <li><a href="#Tailor New Users Home Topic"> Tailor New Users Home Topic</a></li>
20     <li><a href="#Install Plugins"> Install Plugins</a></li>
21     <li><a href="#Customize your TWiki!"> Customize your TWiki!</a></li>
22     <li><a href="#Troubleshooting"> Troubleshooting</a></li>
23     <li><a href="#Appendixes"> Appendixes</a></li>
24     <li><a href="#TWiki System Requirements"> TWiki System Requirements</a><ul>
25         <li><a href="#Server Requirements"> Server Requirements</a></li>
26         <li><a href="#Required CPAN Modules"> Required CPAN Modules</a></li>
27         <li><a href="#Optional CPAN Modules"> Optional CPAN Modules</a></li>
28         <li><a href="#Client Requirements"> Client Requirements</a></li>
29         <li><a href="#Important note about TWiki Plugi"> Important note about TWiki Plugins</a></li>
30       </ul>
31     </li>
32     <li><a href="#Notes on Installing TWiki on Non"> Notes on Installing TWiki on Non-Root Account</a></li>
33     <li><a href="#Installing Manually Without Conf"> Installing Manually Without Configure</a></li>
34   </ul>
35 </div>
36
37 ## <a name="Preparing to install TWiki"></a> Preparing to install TWiki
38
39 Before attempting to install TWiki, you are encouraged to review the TWiki:TWiki.AdminSkillsAssumptions. This guide assumes the person installing TWiki has, at a minimum, basic knowledge of server administration and cgi script management on the system on which TWiki is to be installed. While it is possible to install TWiki with FTP access alone (for example, on a hosted site), it is tricky and may require additional support from your hosting service (for example, in setting file ownership).
40
41 To help setup a correct Apache configuration, you can use the automatic TWiki:TWiki.ApacheConfigGenerator which generates the contents for an Apache config file for TWiki based on your inputs.
42
43 While this installation guide specifically describes installation on an Apache web server on Linux, TWiki should be fine with any web server and OS that meet the system requirements (see below). For additional notes on installing TWiki on other systems, see TWiki:TWiki.InstallingTWiki#OtherPlatforms.
44
45 If you are installing TWiki without Unix/Linux root (administrator) privileges (for example, on a hosted domain), see "Notes on Installing TWiki on Non-Root Account" below for supplemental instructions to the basic steps presented below.
46
47 If you are upgrading from an earlier major version of TWiki such a Cairo (TWiki 3) you will need the information found in TWiki:TWiki.TWikiUpgradeGuide which includes a description of both an automated and a manual procedure. The manual procedure is probably the safest to follow but takes more time. The upgrade guide describes essential steps needed to avoid problems with locked topics.
48
49 Upgrading from a recent TWiki4 release is much simpler. Upgraders from earlier TWiki4 versions can with advantage follow the steps described in TWiki:TWiki.UpgradingTWiki04x00PatchReleases to ensure a safe upgrade without accidently overwriting customizations.
50
51 If you need help, ask a question in the TWiki:Support web or on TWiki:Codev.TWikiIRC (irc.freenode.net, channel #twiki)
52
53 <a name="StandardInstallation"></a>
54
55 ## <a name="Basic Installation"></a> Basic Installation
56
57 1. **Download** the TWiki distribution from <http://TWiki.org/download.html>.
58 2. **Make a directory** for the installation and **unpack the distribution** in it. In the rest of this document we assume this directory is called `twiki`.
59 3. **Make sure** the user that runs CGI scripts on your system can read and write all files in the distribution. <br /> Detailed instructions on file permissions are beyond the scope of this guide, and the best and safest set of file and directory permissions depend on the actual server environment. For Unix/Linux see TWiki:TWiki.SettingFileAccessRightsLinuxUnix which contains scripts to setup the right file and directory access rights.<br /> The general rules for access rights are:
60   - During installation and configuration, the CGI user needs to be able to read and write _everything_ in the distribution.
61   - Once installation and configuration is complete, the CGI user needs write access to everything under the `data` and `pub` directories and to `twiki/lib/LocalSite.cfg`. _Everything else_ should be read-only.
62   - Everybody else should be denied access to everything, always.
63 4. **Make sure** Perl 5 and the Perl CGI library are installed on your system.<br /> The default location of Perl is `/usr/bin/perl`. **If it's somewhere else**, change the path to Perl in the first line of each script in the `twiki/bin` directory.<br /> %H% Some systems require a special extension on perl scripts (e.g. `.cgi` or `.pl`). If necessary, rename all files in `twiki/bin` (i.e. rename `view` to `view.pl` etc). If you do this, make sure you set the `ScriptSuffix` option in `configure` (Step 6).
64 5. **Create the file** `twiki/bin/LocalLib.cfg`.<br /> There is a template for this file in `twiki/bin/LocalLib.cfg.txt`.<br /> The file `twiki/bin/LocalLib.cfg.txt` must contain a setting for `$twikiLibPath`, which must point to the absolute file path of your `twiki/lib` e.g. `/home/httpd/twiki/lib`.<br /> %H% If you need to install additional [CPAN](http://cpan.perl.org/) modules, but can't update the main Perl installation files on the server, you can set `$CPANBASE` to point to your personal [CPAN](http://cpan.perl.org/) install. Don't forget that the webserver user has to be able to read those files as well.
65 6. **Configure the webserver** so you can execute the `bin/configure` script from your browser. But limit the access to either localhost, an IP address or a specific user using basic Apache authentication. You should never leave the `configure` script open to the public. See TWiki:TWiki.ApacheConfigGenerator which contains a tool that can generate a safe and working config file for TWiki on Apache.
66   - If you are unsure about how to do this on your system, see TWiki:TWiki.InstallingTWiki#OtherPlatforms for links to information about various server setups. There is an example Apache `httpd.conf` file in `twiki_httpd_conf.txt` at the root of the package. This file also contains advice on securing your installation. There's also a script called `tools/rewriteshebang.pl` to help you in fixing up the shebang lines in your CGI scripts.
67 7. **Run the `configure` script** from your browser (i.e. enter `http://yourdomain/twiki/bin/configure` into your browser address bar) and resolve any errors or warnings it tells you about.<br /> %X% When you run `configure` for the first time, you can only edit the section `General Path Settings`. Save these settings, and then return to `configure` to continue configuration.<br /> When you return to configure you now need to setup _Mail and Proxies_. Especially the `{WebMasterEmail}`, and `{SMTP}{MAILHOST}` must be defined to enable TWiki to send registration emails. Many ISPs have introduced authentication when sending emails to fight spam so you may also have to set `{SMTP}{Username}` and `{SMTP}{Password}`.
68
69 You now have a basic, unauthenticated installation running. At this point you can just point your Web browser at `http://yourdomain.com/twiki/bin/view` and start TWiki-ing away!
70
71 ## <a name="Important Server Security Settin"></a> Important Server Security Settings
72
73 Before you continue any further there are some basic and very important security settings you have to make sure are set correctly.
74
75 - You should protect the configure script from general access. The configure script the tool is designed for use by administrators only and should be restricted to invocation by them only, by using the basic Apache authentication. Because of this there has not been put much effort into hardening the script. The configure script cannot save any settings once the password has been saved the first time, but the script could still be vulnerable to specially crafted field values and the script reveals many details about the webserver that you should not display in public.
76 - You absolutely must turn off any kind of PHP, Perl, Python, Server Side Includes etc in the `pub` directory. TWiki has some builtin protection which renames files with dangerous filenames by appending .txt to the filename. But this is a secondary security measure. The essential action that you must take is to turn off any possible execution of any of the attached files.<br /> Most Linux distributions have a default Apache installation which has PHP and server side include (SSI) enabled. The `twiki_httpd_conf.txt` file provided in the root of the twiki directory is an example of an Apache config file which you would normally include from httpd.conf. In many distributions this happens automatically if the file is copied to a specific directory (Example RedHat/Fedora/Centos: /etc/httpd/conf.d) and has suffix `.conf`. This example file shows how to protect the `pub` directory from executing both PHP scripts and server side includes.<br /> If you do not have access to the apache config files you can normally control control access by placing a file called `.htaccess` in the directory you want to protect. The `pub-htaccess.txt` file provided in the root of the twiki directory is an example of an Apache `.htaccess` file which protects against execusion of PHP and SSI scripts.
77 - Make sure that you deny access to all other twiki directories than the `bin` and `pub` directories. When you have access to the Apache config files the `twiki_httpd_conf.txt` file mentioned above also contains protection of these directories.<br /> For those that do not have access to the Apache config files a sample `subdir-htaccess.txt` file can be copied as `.htaccess` to the data, lib, locale, templates and tools directories.
78
79 The TWIki:TWiki.ApacheConfigGenerator will help you address all 3 security elements.
80
81 ## <a name="Next Steps"></a> Next Steps
82
83 Once you have TWiki installed and running, you might consider the following optional steps for setting up and customizing your TWiki site. Many of the references below refer to topics within your TWiki installation. For example, `TWiki.TWikiSkins` refers to the `TWikiSkins` topic in your TWiki web. If not available locally, you can find these topics in the on-line reference copy of [[TWiki Release 4.1|TWiki:TWiki04x01/WebHome]].
84
85 <a name="AuthenticationOfUsers"></a>
86
87 ## <a name="Enable Authentication of Users"></a> Enable Authentication of Users
88
89 This step provides for site access control and user activity tracking on your TWiki site. **_This is particularly important for sites that are publicly accessible on the web._** This guide describes only the most common of several possible authentication setups for TWiki and is suitable for public web sites. For information about other setups, see `TWiki.TWikiUserAuthentication`, and TWiki:TWiki.TWikiUserAuthenticationSupplement.
90
91 These are the steps for enabling "Template Login" which asks for a username and password in a web page, and processes them using the Apache 'htpasswd' password manager. Users can log in and log out.
92
93 1. Under the `Security Settings` pane of `configure` :
94   1. Select `TWiki::Client::TemplateLogin` for `{LoginManager}`.
95   2. Select `TWiki::Users::HtPasswdUser` for `{PasswordManager}`.
96   3. Save your `configure` settings.
97   4. Register yourself using the `TWiki.TWikiRegistration` topic.<br /> %H% Check that the password manager recognizes the new user. Check that a new line with the username and encrypted password is added to the `data/.htpasswd` file. If not, you probably got a path wrong, or the permissions may not allow the webserver user to write to that file.
98 2. Edit a topic (by clicking on the `Edit` link at beginning or end of topic) to check if authentication works.
99 3. Edit the `Main/TWikiAdminGroup` topic to include users with system administrator status. Additional instructions are provided in that topic.<br /> %X% This is a very important step, as users in this group can access all topics, independent of TWiki access controls.
100 4. Clear admin notes: Some pages are meant to be customized after choice of authentication - check and update these topics (remove notice): `Main.TWikiAdminGroup`, `TWiki.ChangePassword`, `TWiki.ResetPassword`, and `TWiki.ChangeEmailAddress`.
101
102 You are strongly encouraged to read `TWiki.TWikiUserAuthentication`, TWiki:TWiki.TWikiUserAuthenticationSupplement, and TWiki:TWiki.SecuringTWikiSite for further information about managing users and security of your TWiki site.
103
104 <a name="SetPreferences"></a>
105
106 ## <a name="Set TWiki Preferences"></a> Set TWiki Preferences
107
108 Preferences for customizing many aspects of TWiki are set simply by editing a special topic with TWiki.
109
110 - Edit `TWiki.TWikiPreferences`. Read through it and set any additional settings you think you might need. (You can click the 'Edit' button near the top to edit the settings in place).
111 - %T% Alternately, you can copy any settings or variables that you want to customize from `TWiki.TWikiPreferences` and paste them into `Main.TWikiPreferences`. This will protect your local customizations from being overwritten in later upgrades. See notes at top of `TWiki.TWikiPreferences` for more information.
112
113 ## <a name="Enable Email Notification"></a> Enable Email Notification
114
115 Each TWiki web has an automatic email notification service that sends you an email with links to all of the topics modified since the last alert. To enable this service:
116
117 1. Confirm the Mail and Proxies settings in the Configure interface.
118 2. Setup a cron job (or equivalent) to call the `bin/mailnotify` script as described in the `TWiki.MailerContrib` topic.
119
120 ## <a name="Enable _WebStatistics"></a> Enable WebStatistics
121
122 You can generate a listing manually, or on an automated schedule, of visits to individual pages, on a per web basis. For information on setting up this feature, see the `TWiki.TWikiSiteTools` topic.
123
124 ## <a name="Automate removal of expired sess"></a> Automate removal of expired sessions and lease files
125
126 Per default TWiki cleans out expired session and lease files each time any topic is viewed. This however cost performance. It is an advantage to define a negative value in `configure` for \{Sessions\}\{ExpireAfter\} and install let cron run the `tools/tick_twiki.pl` script. Read The topic [[TWikiScripts#tick_twiki_pl]] for details how to do this.
127
128 ## <a name="Enable Localisation"></a> Enable Localisation
129
130 TWiki now supports displaying of national (non-ascii) characters and presentation of basic interface elements in different languages. To enable these features, see the `Localisation` section of `configure`. For more information about these features, see [TWiki:TWiki.InternationalizationSupplement](http://twiki.org/cgi-bin/view/TWiki.InternationalizationSupplement 'TWiki.InternationalizationSupplement' on TWiki.org).
131
132 ## <a name="Tailor New Users Home Topic"></a> Tailor New Users Home Topic
133
134 When a new users registers on your TWiki a home topic is created for him based on the `TWiki/NewUserTemplate` template topic. This can be tailored. It contains additional resources you can use to:
135
136 - Localise the user topic.
137 - Add a default ALLOWTOPICCHANGE so only the user can edit his own home topic. We do not encourage this for Intranet sites as it sends a wrong signal to new users, but it can be necessary on a public TWiki to avoid that the user topics get spammed.
138
139 ## <a name="Install Plugins"></a> Install Plugins
140
141 TWiki:Plugins is an extensive library of Plugins for TWiki, that enhance functionality in a huge number of ways. A few plugins are pre-installed in the TWiki distribution. For more information on these, see `TWiki.InstalledPlugins`.
142
143 You activate installed plugin in the _Plugins_ section of `configure`. In this section you also find a _Find More Extensions_ button which opens an application which can install additional plugins from the TWiki.org website. If you are behind a firewall or your server has no access to the Internet it is also possible to install plugins manually. Manual installation instructions for the plugins can be found in the plugin topics on TWiki.org. Additional documenation on TWiki plugins can be found at TWiki:TWiki.TWikiPluginsSupplement.
144
145 Some plugins require that you define their settings in `configure`. You fill find these under the _Extensions_ section of configure.
146
147 ## <a name="Customize your TWiki!"></a> Customize your TWiki!
148
149 The real power of TWiki lies in it's flexibility to be customized to meet your needs. A good place to start for exploring what's possible is [TWiki:TWiki.TWikiAdminCookBook](http://twiki.org/cgi-bin/view/TWiki/TWikiAdminCookBook 'TWiki/TWikiAdminCookBook' on TWiki.org) which offers tips and tricks for customizing your TWiki site. Many of these are appropriate to implement immediately after installing TWiki and before adding content so now's a good time to look at these. If you would like to customize the look of your TWiki, see [TWiki:TWiki.TWikiSkinsSupplement](http://twiki.org/cgi-bin/view/TWiki.TWikiSkinsSupplement 'TWiki.TWikiSkinsSupplement' on TWiki.org).
150
151 ## <a name="Troubleshooting"></a> Troubleshooting
152
153 The first step is to re-run the `configure` script and make sure you have resolved all errors, and are satisfied that you understand any warnings.
154
155 Failing that, please check **[TWiki:TWiki.InstallingTWiki](http://twiki.org/cgi-bin/view/TWiki.InstallingTWiki 'TWiki.InstallingTWiki' on TWiki.org)** on TWiki.org, the supplemental documentation that help you **install TWiki on different platforms, environments and web hosting sites**. For example:
156
157 - For Unix or Linux, check [TWiki:Codev.TWikiOnUnix](http://twiki.org/cgi-bin/view/Codev/TWikiOnUnix 'Codev/TWikiOnUnix' on TWiki.org) and [TWiki:Codev.TWikiOnLinux](http://twiki.org/cgi-bin/view/Codev/TWikiOnLinux 'Codev/TWikiOnLinux' on TWiki.org).
158 - For Windows, check the [TWiki:Codev.WindowsInstallCookbook](http://twiki.org/cgi-bin/view/Codev/WindowsInstallCookbook 'Codev/WindowsInstallCookbook' on TWiki.org).
159 - For MacOS X, check TWiki:Codev.TWikiOnMacOSX.
160
161 It is also advisable to review TWiki:Codev.KnownIssuesOfTWiki04x01.
162
163 If you need help, ask a question in the TWiki:Support web or on TWiki:Codev/TWikiIRC (irc.freenode.net, channel #twiki)
164
165 ## <a name="Appendixes"></a> Appendixes
166
167 <a name="SystemRequirements"></a>
168
169 ## <a name="TWiki System Requirements"></a> TWiki System Requirements
170
171 Low client and server base requirements are core features that keep TWiki widely deployable, particularly across a range of browser platforms and versions.
172
173 ### <a name="Server Requirements"></a> Server Requirements
174
175 TWiki is written in Perl 5, uses a number of shell commands, and requires [RCS (Revision Control System)](http://www.gnu.org/software/rcs/rcs.html), a GNU Free Software package. TWiki is developed in a basic Linux/Apache environment. It also works with Microsoft Windows, and should have no problem on any other platform that meets the requirements.
176
177 <table border="1" cellpadding="0" cellspacing="0">
178   <tr>
179     <th bgcolor="#99CCCC"><strong> Resource </strong></th>
180     <th bgcolor="#99CCCC"><strong> Required Server Environment </strong></th>
181   </tr>
182   <tr>
183     <td> Perl </td>
184     <td> 5.8.4 or higher is recommended </td>
185   </tr>
186   <tr>
187     <td> RCS </td>
188     <td> 5.7 or higher (including GNU <code>diff</code>) <br /> Optional, TWiki includes a pure perl implementation of RCS that can be used instead (although it's slower) </td>
189   </tr>
190   <tr>
191     <td> GNU <code>diff</code></td>
192     <td> GNU <code>diff</code> 2.7 or higher is required when not using the all-Perl [[Main/RcsLite]]. <br /> Install on PATH if not included with RCS (check version with <code>diff -v</code>) <br /> Must be the version used by RCS, to avoid problems with binary attachments - RCS may have hard-coded path to <code>diff</code></td>
193   </tr>
194   <tr>
195     <td> Other external programs </td>
196     <td><code>fgrep, egrep</code></td>
197   </tr>
198   <tr>
199     <td> Cron/scheduler </td>
200     <td> • Unix: <code>cron</code><br />• Windows: <code>cron</code> equivalents </td>
201   </tr>
202   <tr>
203     <td> Web server </td>
204     <td> Apache is well supported; for information on other servers, see <a href="http://twiki.org/cgi-bin/view/TWiki.InstallingTWiki#OtherWebServers" title="'TWiki.InstallingTWiki#OtherWebServers' on TWiki.org">TWiki:TWiki.InstallingTWiki#OtherWebServers</a>. </td>
205   </tr>
206 </table>
207
208 ### <a name="Required CPAN Modules"></a> Required CPAN Modules
209
210 The following Perl [CPAN](http://cpan.perl.org/) modules are used by TWiki:
211
212 <table border="1" cellpadding="0" cellspacing="0">
213   <tr>
214     <th bgcolor="#99CCCC"><strong> Module </strong></th>
215     <th bgcolor="#99CCCC"><strong> Preferred version </strong></th>
216   </tr>
217   <tr>
218     <td> Algorithm::Diff (included) </td>
219     <td>   </td>
220   </tr>
221   <tr>
222     <td> CGI::Carp </td>
223     <td> &gt;=1.26 </td>
224   </tr>
225   <tr>
226     <td> Config </td>
227     <td> &gt;=0 </td>
228   </tr>
229   <tr>
230     <td> Cwd </td>
231     <td> &gt;=3.05 </td>
232   </tr>
233   <tr>
234     <td> Data::Dumper </td>
235     <td> &gt;=2.121 </td>
236   </tr>
237   <tr>
238     <td> Error (included) </td>
239     <td>   </td>
240   </tr>
241   <tr>
242     <td> File::Copy </td>
243     <td> &gt;=2.06 </td>
244   </tr>
245   <tr>
246     <td> File::Find </td>
247     <td> &gt;=1.05 </td>
248   </tr>
249   <tr>
250     <td> File::Spec </td>
251     <td> &gt;=3.05 </td>
252   </tr>
253   <tr>
254     <td>[[Main/FileHandle]]</td>
255     <td> &gt;=2.01 </td>
256   </tr>
257   <tr>
258     <td> IO::File </td>
259     <td> &gt;=1.10 </td>
260   </tr>
261   <tr>
262     <td> Text::Diff (included) </td>
263     <td>   </td>
264   </tr>
265   <tr>
266     <td> Time::Local </td>
267     <td> &gt;=1.11 </td>
268   </tr>
269 </table>
270
271 ### <a name="Optional CPAN Modules"></a> Optional CPAN Modules
272
273 The following Perl modules may be used by TWiki:
274
275 <table border="1" cellpadding="0" cellspacing="0">
276   <tr>
277     <th bgcolor="#99CCCC"><strong> Module </strong></th>
278     <th bgcolor="#99CCCC"><strong> Preferred version </strong></th>
279     <th bgcolor="#99CCCC"><strong> Description </strong></th>
280   </tr>
281   <tr>
282     <td> Archive::Tar </td>
283     <td>   </td>
284     <td> May be required by the Extensions Installer in configure if command line tar or unzip is not available </td>
285   </tr>
286   <tr>
287     <td> CGI::Cookie </td>
288     <td> &gt;=1.24 </td>
289     <td> Used for session support </td>
290   </tr>
291   <tr>
292     <td> CGI::Session </td>
293     <td> &gt;=3.95 </td>
294     <td> Highly recommended! Used for session support </td>
295   </tr>
296   <tr>
297     <td> Digest::base </td>
298     <td>   </td>
299     <td>   </td>
300   </tr>
301   <tr>
302     <td> Digest::SHA1 </td>
303     <td>   </td>
304     <td>   </td>
305   </tr>
306   <tr>
307     <td> Jcode </td>
308     <td>   </td>
309     <td> Used for I18N support with perl 5.6 </td>
310   </tr>
311   <tr>
312     <td> Locale::Maketext::Lexicon </td>
313     <td> &gt;=0 </td>
314     <td> Used for I18N support </td>
315   </tr>
316   <tr>
317     <td> Net::SMTP </td>
318     <td> &gt;=2.29 </td>
319     <td> Used for sending mail </td>
320   </tr>
321   <tr>
322     <td> Unicode::Map </td>
323     <td>   </td>
324     <td> Used for I18N support with perl 5.6 </td>
325   </tr>
326   <tr>
327     <td> Unicode::Map8 </td>
328     <td>   </td>
329     <td> Used for I18N support with perl 5.6 </td>
330   </tr>
331   <tr>
332     <td> Unicode::MapUTF8 </td>
333     <td>   </td>
334     <td> Used for I18N support with perl 5.6 </td>
335   </tr>
336   <tr>
337     <td> Unicode::String </td>
338     <td>   </td>
339     <td> Used for I18N support with perl 5.6 </td>
340   </tr>
341   <tr>
342     <td> URI </td>
343     <td>   </td>
344     <td> Used for configure </td>
345   </tr>
346 </table>
347
348 Most of them will probably already be available in your installation. You can check version numbers with the `configure` script, or if you're still trying to get to that point, check from the command line like this:
349
350     perl -e 'use FileHandle; print $FileHandle::VERSION."\n"'
351
352 <a name="ClientRequirements"></a>
353
354 ### <a name="Client Requirements"></a> Client Requirements
355
356 The TWiki standard installation has relatively low browser requirements:
357
358 - HTML 3.2 compliant
359 - Cookies, if persistent sessions are required
360
361 CSS and Javascript are used in most skins, although there is a low-fat skin (Classic skin) available that minimises these requirements. Some skins will require more recent releases of browsers. The default skin (Pattern) is tested on IE 6, Safari, and Mozilla 5.0 based browsers (such as Firefox).
362
363 You can easily select a balance of browser capability versus look and feel. Try the installed skins at `TWiki/TWikiSkinBrowser` and more at TWiki:Plugins.SkinPackage.
364
365 ### <a name="Important note about TWiki Plugi"></a> Important note about TWiki Plugins
366
367 - Plugins can require just about anything - browser-specific functions, stylesheets (CSS), Java applets, cookies, specific Perl modules,... - check the individual Plugin specs.
368   - **_%T% Note:_** Plugins included in the TWiki distribution do not add requirements, except for the [[CommentPlugin]] which requires Perl 5.6.1.
369
370 <a name="NonRootInstallNotes"></a>
371
372 ## <a name="Notes on Installing TWiki on Non"></a> Notes on Installing TWiki on Non-Root Account
373
374 The following supplemental notes to the [Basic Installation](#StandardInstallation) instructions apply to installing TWiki on a system where you don't have Unix/Linux root (administrator) privileges, for example, on a hosted Web account or an intranet server administered by someone else.
375
376 Referring to the [Basic Installation](#StandardInstallation) steps presented above:
377
378 - **Step 2:** If you cannot unpack the TWiki distribution directly in your installation directory, you can unpack the distribution on your local PC and then manually create the directory structure on your host server and upload the files as follows:
379   - Using the table below, create a directory structure on your host server
380   - Upload the TWiki files by FTP (transfer as text except for the image files in `pub` directory.)
381   - **_Note:_** Don't worry if you are not able to put the twiki/lib directory at the same level as the `twiki/bin` directory (e.g. because CGI bin directories can't be under your home directory and you don't have root access). You can create this directory elsewhere and configure the `twiki/bin/setlib.cfg` file (done in Step 2).
382
383 > <table border="1" cellpadding="0" cellspacing="0">
384 >   <tr>
385 >     <th bgcolor="#99CCCC"><strong> TWiki dir: </strong></th>
386 >     <th bgcolor="#99CCCC"><strong> What it is: </strong></th>
387 >     <th bgcolor="#99CCCC"><strong> Where to copy: </strong></th>
388 >     <th bgcolor="#99CCCC"><strong> Example: </strong></th>
389 >   </tr>
390 >   <tr>
391 >     <td><code>twiki</code></td>
392 >     <td> start-up pages </td>
393 >     <td> root TWiki dir </td>
394 >     <td><code>/home/smith/twiki/</code></td>
395 >   </tr>
396 >   <tr>
397 >     <td><code>twiki/bin</code></td>
398 >     <td> CGI bin </td>
399 >     <td> CGI-enabled dir </td>
400 >     <td><code>/home/smith/twiki/bin</code></td>
401 >   </tr>
402 >   <tr>
403 >     <td><code>twiki/lib</code></td>
404 >     <td> library files </td>
405 >     <td> same level as <code>twiki/bin</code></td>
406 >     <td><code>/home/smith/twiki/lib</code></td>
407 >   </tr>
408 >   <tr>
409 >     <td><code>twiki/locale</code></td>
410 >     <td> language files </td>
411 >     <td> dir secure from public access </td>
412 >     <td><code>/home/smith/twiki/locale</code></td>
413 >   </tr>
414 >   <tr>
415 >     <td><code>twiki/pub</code></td>
416 >     <td> public files </td>
417 >     <td> htdoc enabled dir </td>
418 >     <td><code>/home/smith/twiki/pub</code></td>
419 >   </tr>
420 >   <tr>
421 >     <td><code>twiki/data</code></td>
422 >     <td> topic data </td>
423 >     <td> dir secure from public access </td>
424 >     <td><code>/home/smith/twiki/data</code></td>
425 >   </tr>
426 >   <tr>
427 >     <td><code>twiki/templates</code></td>
428 >     <td> web templates </td>
429 >     <td> dir secure from public access </td>
430 >     <td><code>/home/smith/twiki/templates</code></td>
431 >   </tr>
432 >   <tr>
433 >     <td><code>twiki/tools</code></td>
434 >     <td> TWiki utlilities </td>
435 >     <td> dir secure from public access </td>
436 >     <td><code>/home/smith/twiki/tools</code></td>
437 >   </tr>
438 > </table>
439
440 - **Step 3:** Files in the pub directory must be readable as a url. This means that directory permissions should be set to `755` (or `775` ) and file permissions should be set to `644` (or `664`). If you can run a `chmod` command, you can accomplish this in two quick steps by running these commands from the root direct:
441   - `chmod -R 755 pub`
442   - ``chmod 644 `find pub -type f -print```
443   - In addition, you should create a `.htaccess` file in the pub directory, using the template included in the root level of the distribution entitled `pub-htaccess.txt`.
444   - Note: This setup does not provide for absolute security for TWiki attachments. For more information, see TWiki:Codev.SecuringYourTWiki.
445
446 - **Step 6:** In order to run the configure script, create a file called `.htaccess` in the bin directory that includes the following single line: `SetHandler cgi-script` . This informs the server to treat all the perl scripts in the bin directory as scripts.
447
448 For additional information about installing TWiki on a hosted accounts, see TWiki:TWiki.InstallingTWiki#WebHostingSites
449
450 ## <a name="Installing Manually Without Conf"></a> Installing Manually Without Configure
451
452 It is highly recommended to use run configure from the browser when setting up TWiki. Configure does a lot of the hard work for you.
453
454 But there may be instances where you do not want to use configure or where configure simply won't run because of a missing dependency.
455
456 The manual steps you have to take are:
457
458 - Copy the file `lib/TWiki.spec` to `lib/LocalSite.cfg`
459 - Remove the comment # in front of `$TWiki::cfg{DefaultUrlHost}`, `$TWiki::cfg{ScriptUrlPath}`, `$TWiki::cfg{PubUrlPath}`, `$TWiki::cfg{PubDir}`, `$TWiki::cfg{TemplateDir}`, `$TWiki::cfg{DataDir}`, `$TWiki::cfg{LocalesDir}`, and `$TWiki::cfg{OS}` and make sure these settings have the correct values.
460 - Make sure to define at least these settings: `$TWiki::cfg{LoginManager}`, `$TWiki::cfg{WebMasterEmail}`, `$TWiki::cfg{SMTP}{MAILHOST}`, `$TWiki::cfg{SMTP}{SENDERHOST}`.
461
462 **_Related Topics:_** [[AdminDocumentationCategory]], TWiki:TWiki.InstallingTWiki