You are here: Home Web>CnFoswikiInstallGuideOnUnixLinux (03 Oct 2009)
下文编译自:http://foswiki.org/System/InstallationGuide

Installation Guide

This guide describes the steps for manually installing Foswiki, with specific steps for installations on Linux with the Apache web server. If you are using a different web server or operating system, in addition to reviewing this document, check any additional information specific to your platform at Foswiki:Support.SupplementalDocuments. Foswiki:Support.SupplementalDocuments also has information for other scenarios, such as shared web hosting environments.

These installation instructions are also available online at Foswiki:System.InstallationGuide, and are available within your Foswiki installation at System.InstallationGuide (the InstallationGuide topic in the System web).

For information on upgrades, please also refer to Foswiki:System.UpgradeGuide. A static HTML version of this document, UpgradeGuide.html, is included in the root of your Foswiki distribution.

System Requirements

Please see the section "Foswiki system requirements" for the server and client requirements to run Foswiki, including the Perl modules required on the server. If you need to install any Perl libraries from CPAN for use by Foswiki, see Foswiki:Support.HowToInstallCpanModules for more information.

Preparing to install

Before attempting to install Foswiki, you are encouraged to review the Foswiki:System.AdminSkillsAssumptions. This guide assumes the person installing Foswiki has a basic knowledge of server administration on the system on which Foswiki is to be installed. While it is possible to install Foswiki 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 and installing missing perl CPAN libraries).

If you are upgrading from a previous Foswiki version or from a TWiki installation, please refer to Foswiki:System.UpgradeGuide. A static HTML version of this document, UpgradeGuide.html, is included in the root of your Foswiki distribution.

Verify that your server meets the Foswiki system requirements, including having the minimum required Perl version and all required Perl modules installed. If you need to install any Perl libraries from CPAN for use by Foswiki, see Foswiki:Support.HowToInstallCpanModules for more information.

If you need help, feel free to ask a question in the Foswiki:Support web or on Foswiki:Community.InternetRelayChat (irc.freenode.net, channel #foswiki).

Basic installation: getting Foswiki up and running

To install Foswiki, complete the following steps:

  1. Download and unpack the Foswiki distribution.
  2. Set the file and directory permissions for the installation.
  3. Configure the locations of the Perl executable and the Foswiki modules.
  4. Configure the web server.
  5. Configure Foswiki.
  6. Enable authentication of users (if desired).
  7. Define the administrator users.

下载并解压缩Foswiki安装文件

http://foswiki.org/Download 下载安装文件,然后解压缩(unzip 或者 untar)到你希望的目录下。在后面我们假设目录为: /path/to/foswiki.

  • 注意: Foswiki 不支持目录名含有空格的目录(尤其是在windows下,例如c:\program files\), 所以请保证你的目录名不包含空格。
  • If you do not have shell access to your web server host, see the section "Uploading the Foswiki distribution to your web server host".

为目录和文件设置访问权限 ALERT!

Set up access file and directory rights, as well as file ownership, as required by your web server configuration so that the web server user (the user used by the web server to run CGI programs) can read and write within the foswiki directory tree.

Note: for more information on the appropriate permissions to ensure security for your Foswiki data, see Foswiki:Support.SecuringYourSite.

The default file and directory access permissions as set by the distribution define a reasonable security level that will work for many types of installations, including shared hosting. Nonetheless, you should verify that the web server user has read access to all files and directories beneath the foswiki directory, and execute access for all directories. Also verify that the data and pub directories and all the subdirectories and files beneath them allow write access for the web server user.

  • 警告: 不要图方便使用: chmod -R 770 foswiki,把执行权限赋予所有文件会有潜在危险,初次安装foswiki会经常犯这样的错误,然而这一步确是异常重要,关于详细的设置访问权限的方法,请参考 CnSettingFileAccessRightsLinuxUnix
在此基础上,你可以设置更加严格的访问权限……It is possible to define tighter access permissions than the default ones; how tight they should be depends on your web server environment and local needs. Typically you should limit all access from others if the web server machine has login access for users other than root and the web server administrator. For a dedicated web server that just runs Foswiki and has limited login access, the default access permissions have a good safety level.

如果你有 root user权限,那么为了使你的Wiki更安全, you can change the ownership of the foswiki directory tree to the web server user, using the command chown -R user:group /path/to/foswiki. The web server username varies in different installations; here are some sample commands for various Linux distributions:

  • RedHat, Fedora, CentOS, Gentoo, Mandriva : chown -R apache:apache /path/to/foswiki
  • debian/Ubuntu/Kubuntu : chown -R www-data:www-data /path/to/foswiki
  • Suse : chown -R wwwrun:www /path/to/foswiki
如果你修改过某些目录或文件的权限后Foswiki停止工作,请参考CnSettingFileAccessRightsLinuxUnix里的Unix命令来恢复默认权限设置。

设置perl.exe路径和Foswiki lib目录路径

我们需要设置perl.exe的路径以保证Foswiki脚本顺利得以在web服务器上执行。一般情况下,perl.exe的默认路径是/usr/bin/perl(如果你用的是host主机,你需要向技术支持确认这一点),这在Foswiki安装文件中已经是默认值。 但是如果它在其他地方, change the path to Perl in the first line of each script (you may have to give yourself write permission first) in the bin and tools directories. You can use the tools/rewriteshebang.pl script to do this; for example:

   cd /path/to/foswiki/bin
   /path/to/perl ../tools/rewriteshebang.pl
   # At the prompt, enter the full path to the perl executable, including
   # the full filename of the executable. You will be prompted twice for
   # this information in order to confirm it.
   cd /path/to/foswiki/tools
   /path/to/perl rewriteshebang.pl

Perl脚本的扩展名

一些web服务器要求perl脚本含有“.pl”扩展名(This is not normally required with the Apache web server, though some hosted web servers are configured to require it)。向你的空间提供商确认这一点,如果web server确实需要perl脚本以".pl"扩展名结尾,请重命名=bin=目录下的所有perl脚本(比如configure, view等),比如将=bin/view= 重命名为=bin/view.pl=,以此类推,然后当配置Foswiki (see the section "Configure Foswiki")时,设置 ScriptSuffix 项 to the special extension.

Foswiki lib目录路径

在bin目录下创建一个名为“LocalLib.cfg”文件。
  • 在=bin=目录下,复制实例文件 LocalLib.cfg.txt 到 =LocalLib.cfg=,并保证新文件(“”)LocalLib.cfg的ownership 和访问权限同LocalLib.cfg.txt一致;
  • 打开=bin/LocalLib.cfg=,将 $foswikiLibPath 设置为 lib 目录的绝对路径,例如:=/path/to/foswiki/lib=;
  • 如果你需要安装更多的 CPAN modules, but can't update the main Perl installation files on the server, you can set $CPANBASE to point to your personal CPAN install. Don't forget that the web server user has to be able to read those files as well.

配置web服务器

首先你需要选择apache的配置方法: First choose the best configuration method for your web server. With Apache, there are two ways to configure it: a config file included from httpd.conf or .htaccess files.
  • 方法一:Apache config file 推荐用这种方法,但是你需要有root user权限。 With a config file you can put the entire Foswiki configuration in ONE file (typically named foswiki.conf). Performance is much better with a config file, and one file gives the best overview and ensures that you get a safe installation . However to use a config file you need root or sudo access to stop and start Apache. The Foswiki apache config file is included from the main Apache config file http.conf. Most distributions have a directory from which any file that ends with .conf gets included when you restart Apache (Example RedHat/Fedora/Centos: /etc/httpd/conf.d ). If you use a virtual host setup in Apache you should include the foswiki.conf file from inside the desired virtual host config in your Apache configuration. 这种方法的优点是Foswiki可以有更好的性能。
    • 最好的方法就是用 Foswiki:Support.ApacheConfigGenerator 工具生成一个安全工作的config file,该工具会提示你根据你的安装输入不同信息。
    • 如果无法使用上述链接,则可以基于Foswiki根目录下的一个实例文件 foswiki_httpd_conf.txt 来创建config file。
    • 请保证 web access is denied to all Foswiki subdirectories other than bin and pub. The Foswiki:Support.ApacheConfigGenerator tool will generate the appropriate settings; the foswiki_httpd_conf.txt file also has examples of configuring Apache appropriately.
    • Ensure there is either a ScriptAlias directive for the bin subdirectory, or an Alias directive with SetHandler cgi-script and Options ExecCGI directives for the bin subdirectory, so that the bin scripts will be executed by Apache.
    • 注意: 修改过后你必须重启apache才能使这些修改生效。

  • 方法二:.htaccess files 当你没有root或者sudo权限时,你需要用.htaccess文件来配置你的服务器。这种情况经常是当你在使用共享主机环境时,虽然性能会受到影响,但是用.htaccess文件可能是你的唯一选择。
    • 在foswiki 安装文件的根目录,和=bin= 目录下, 你可以找到示例的 .htaccess 文件:
      实例 .htaccess 文件及其位置 创建相应的.htaccess文件
      foswiki/root-htaccess.txt foswiki/.htaccess
      foswiki/bin/.htaccess.txt foswiki/bin/.htaccess
      foswiki/pub-htaccess.txt foswiki/pub/.htaccess
      foswiki/subdir-htaccess.txt 复制到foswiki下剩余所有子目录里并重命名为 .htaccess
    • Ensure that web access is denied to all Foswiki subdirectories other than bin and pub.
    • 保证bin目录下的 foswiki/bin/.htaccess files 含有 SetHandler cgi-script ,从而可以使得apache顺利执行 bin 目录下的foswiki脚本。
    • Turn off 在=pub=目录下所有 PHP, Perl, Python, Server Side Includes, or other software execution mechanisms supported by your web server 。例如,most Linux distributions have a default Apache installation with PHP and server side include (SSI) enabled. This would allow PHP scripts uploaded as attachments to be executed, which is a security risk, so it should be disabled in the Apache configuration with php_admin_flag engine off. (Different script execution mechanisms are disabled in different ways; see your web server configuration and documentation for more details.)

    • 保护好=configure=脚本ALERT!。永远不要将 configure 脚本开放。Limit access to the bin/configure script to either localhost, an IP address or a specific user using basic Apache authentication. The Foswiki:Support.ApacheConfigGenerator lets you setup who has access to the configure script. Also see the foswiki-httpd-conf.txt or bin/.htaccess.txt file for an example of the setting required to protect the configure script.

To limit access to a particular user, set up a .htpasswd file that contains the user name and password that Apache will use to authenticate the user:

  • Change to the foswiki/data directory.
  • Issue the command htpasswd -c .htpasswd <username>, where <username> is the name of the user you will use to access the configure script. Choose the username with care: the username cannot be an existing login name for your Foswiki installation, nor can it be used later on to register in Foswiki. Enter a password when prompted.
The Foswiki:Support.ApacheConfigGenerator tool and the sample config files and .htaccess files show how to configure Apache so that the configure web page will be protected using the user and password held in the data/.htpasswd file. The Apache config file or .htaccess file will have a Require user <username> directive to restrict access to the configure script. Ensure the user specified in the directive matches the <username> you used when creating the .htpasswd file.

Note: In addition to any web server security protection that you have set up, when saving any configuration settings for the first time on the configure web page, you will be prompted to set a configuration password. This password must be entered on all subsequent configuration changes, and is also used to log in via the internal admin link (see the section "Define the administrator user(s)"). Even after a configure password has been set, access to the configure page should still be restricted by the web server, in order to avoid revealing internal information to potential attackers.

For more information, refer to Foswiki:Support.ProtectingYourConfiguration.

配置Foswiki

至此,你可以长舒一口气了!打开浏览器,输入http://yourdomain/foswiki/bin/configure,顺利的话你应该可以看到configure脚本得以顺利执行。
  • 如果你是第一次进入 configure 页面,你只能而且必须更新 General Path Settings. Make any required changes, and save the settings, whether or not you needed to make any changes. You will be prompted to set a password for the configure page: this password must be entered for all subsequent configuration changes, and is also used to log in via the internal admin link (see the section "Define the administrator user(s)"). Note the configuration password is separate from any web server security you have set up for the configure web page (see "Protect the configure script").
  • Continue configuring Foswiki. Resolve any errors or warnings highlighted on the configure page.
  • If your web server can be accessed by more than one domain name make sure to add the additional alternative URLs to {PermittedRedirectHostUrls}
  • Setup the Mail and Proxies section. The {WebMasterEmail} and {SMTP}{MAILHOST} settings must be defined so Foswiki can 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}. If you do not want to enable sending registration emails or want to enable it later you can uncheck {EnableEmail}. If your server is behind a firewall with a proxy, and you wish to install extensions via configure, you may have to set {PROXY}{HOST} and {PROXY}{PORT}.
If there is a problem with your setup that prevents you from accessing the configure page, you can configure Foswiki manually.

Enable authentication of users

By enabling authentication, you can control access to your site and track the activity of your users. This is particularly important for sites that are publicly accessible on the web. You are strongly encouraged to read System.UserAuthentication and Foswiki:Support.UserAuthenticationSupplement for further information about managing users and access controls for your Foswiki site.

The most common authentication methods used for public Foswiki installations are Template Login and Apache Login. They have the following relative advantages:

  • Template Login can be set up without any web server configuration, and users can log off without restarting the browser. As the login page is just a Wiki page, you can customize it to suit your needs.
  • Apache Login allows you to use any Apache-module based authentication scheme, such as mod_auth_ldap or mod_auth_mysql. However, as your browser is caching your login, you must restart the browser to log out.
Note that the password databases for both of these authentication mechanisms are compatible, so you can switch between them at a later date.

To make it easier to follow the instructions in this section, you can view this installation guide using your Foswiki site by entering System.InstallationGuide into the "Jump" text box. By doing this instead of using the INSTALL.html file from the distribution, you will be able to use the embedded hyperlinks to jump directly to the referenced pages.

Template Login authentication

With Template Login enabled, when Foswiki needs to authenticate the user, it will redirect to a login web page. A list of all users is shown in the Main.WikiUsers topic.

To setup Template Login, perform the following steps:

  1. Configure Template Login. Under the Security Settings pane of the configure page:
    1. Select Foswiki::LoginManager::TemplateLogin for {LoginManager}.
    2. Select Foswiki::Users::HtPasswdUser for {PasswordManager}.
    3. Select Foswiki::Users::TopicUserMapping for {UserMappingManager}.
    4. Save your settings.
  2. Verify that registration works. Register yourself using the System.UserRegistration topic in your Foswiki installation. Note if you are viewing this page via the INSTALL.html file, then you can access the user registration page by entering System.UserRegistration into the "Jump" text box at the top right of any Foswiki page in your installation.
    Check that the password manager recognizes the new user by verifying that a new line is added to the foswiki/data/.htpassswd file, with the username and encrypted password. If the user and password information was not added, you probably got a path wrong, or the directory permissions on foswiki/data or foswiki/data/.htpasswd may not be set to allow the web server user to modify the file.
  3. Check that authentication works. Edit a topic by clicking on the Edit link at the top or bottom of a topic. If you have been authenticated, then you will see the edit page; otherwise, you will see an error message.
As Template Login uses a wiki page for its login prompt, there is a great deal of flexibility in customizing the login page for your purposes.

Apache Login authentication

With Apache Login enabled, when Foswiki needs to authenticate the user, the standard HTTP authentication mechanism is used: the browser itself will prompt for a user name and password.

Note: Apache Login is required for Apache-based login methods such as mod_ldap.

To setup Apache Login, perform the following steps:

  1. Configure Apache Login. Under the Security Settings pane of the configure page:
    1. Select Foswiki::LoginManager::ApacheLogin for {LoginManager}.
    2. Select Foswiki::Users::HtPasswdUser for {PasswordManager}.
    3. Select Foswiki::Users::TopicUserMapping for {UserMappingManager}.
    4. Save your settings.
    5. Configure your Apache settings for HTTP authentication. Use the Foswiki:Support.ApacheConfigGenerator tool or the foswiki/bin/.htaccess file to set the following Apache directives on the bin scripts:
            <FilesMatch "(attach|edit|manage|rename|save|upload|mail|logon|rest|.*auth).*">
            require valid-user
            </FilesMatch>
      You can also refer to the sample foswiki_httpd_conf.txt and bin/.htaccess.txt files to see how the appropriate Apache directives are specified.
  2. Verify that registration works. Register yourself using the System.UserRegistration topic in your Foswiki installation. Note if you are viewing this page via the INSTALL.html file, then you can access the user registration page by entering System.UserRegistration into the "Jump" text box at the top right of any Foswiki page in your installation.
    Check that the password manager recognizes the new user by verifying that a new line is added to the foswiki/data/.htpassswd file, with the username and encrypted password. If the user and password information was not added, you probably got a path wrong, or the directory permissions on foswiki/data or foswiki/data/.htpasswd may not be set to allow the web server user to modify the file.
  3. Check that authentication works. Edit a topic by clicking on the Edit link at the top or bottom of a topic. If you have been authenticated, then you will see the edit page; otherwise, you will see an error message.

设置管理员用户

Administrators have read and write access to any topic, regardless of any access controls that have been applied to the topic or its web. After installing Foswiki, you should register a user that you will use to administer Foswiki. To make this user an administrator, add the WikiName for the user to the AdminGroup, defined in the Main.AdminGroup topic in your Foswiki installation.

To make it easier to follow the instructions in this section, you can view this installation guide using your Foswiki site by entering System.InstallationGuide into the "Jump" text box. By doing this instead of using the INSTALL.html file from the distribution, you will be able to use the embedded hyperlinks to jump directly to the referenced pages.

To add an initial administrator to the AdminGroup, perform the following steps:

  • If you are not already logged in with your WikiName, then login.
  • Go to the Main.AdminGroup topic and select the "internal admin login" link. Login using the password you set on the configure page.
  • After logging as the internal admin, edit the Main.AdminGroup topic. Follow the instructions on the page carefully and add your WikiName to the group.
  • Test that you have been added successfully: On the Main.AdminGroup page, select the "Logout link" and logout from being the internal admin. Select the "Edit" link for the Main.AdminGroup page. If you successfully added yourself as an admin user, you should see the edit page.
Once the AdminGroup is no longer empty, then any member of the group can add subsequent members — you do not have to use the internal admin login.

To more easily debug access control issues, you may want to have a regular Foswiki user account for daily use, and a special one that belongs to the AdminGroup that you use only for administering your Foswiki site. See Foswiki:System.AccessControl for more information on access controls and user groups.

恭喜完成!

You now have a basic installation running. At this point you can just point your Web browser at http://yourdomain.com/foswiki/bin/view and start using your Foswiki site.

In order to keep your user, group, and site configuration information separate from the actual content of your site, it is recommended that you create a new web in which your site's pages will reside. See Foswiki:System.ManagingWebs for more information on Wiki webs and how to create one.

Beyond the basic installation

Once you have Foswiki installed and running, you can perform one or more of the following steps to tailor your installation to your needs. Many of the references in this section refer to topics within your Foswiki installation. For example, System.Skins refers to the Skins topic in your System web. To go directly to a topic, enter the full topic name, such as System.Skins, into the "Jump" text box at the top right of any Foswiki page.

To make it easier to follow the instructions in this section, you can view this installation guide using your Foswiki site by entering System.InstallationGuide into the "Jump" text box. By doing this instead of using the INSTALL.html file from the distribution, you will be able to use the embedded hyperlinks to jump directly to the referenced pages.

All of the Foswiki documentation can also be found online in the Foswiki documentation section (the "System" web) of the Foswiki web site.

Note the configure page mentioned in this section is accessed by visiting http://yourdomain/foswiki/bin/configure your web browser.

Site configuration and maintenance

Set Foswiki Preferences

Preferences for customizing many aspects of Foswiki are set by editing Main.SitePreferences. If a given preference is not set in Main.SitePreferences, then a default value is picked up from System.DefaultPreferences, if present, or, for extensions, from the extension topics.

To simplify your upgrades, do not modify System.DefaultPreferences. Instead, copy any settings you want to change from System.DefaultPreferences to Main.SitePreferences.

To see the available preferences that can be set, look through System.DefaultPreferences.

If, for some reason, you wish to pick up default preferences from a different topic, you can set the location in the Miscellaneous settings pane of the configure page, in the {SitePrefsTopicName} setting (visible when Expert mode is enabled). It is recommended that you leave this setting to its default value, DefaultPreferences.

Select the desired security level

Foswiki has a many security features that can be enabled/disabled and adjusted to suit your needs.

In many cases enabling a security feature prevents other features. It is a balance that the administrator has to choose depending on the purpose of the Foswiki installation (confidential vs public knowledge), the type of installation (intranet vs internet), and your type of business.

A new administrator is encouraged to read Foswiki:Support.SecurityFeatures which gives a walkthrough of the different security aspects and how to set the appropriate configuration settings. Note that that some security settings are only visible in configure in "expert mode" which you enter by clicking the "Yes, I've read all the documentation" button at the top of the configure screen.

Enable Email Notification

Each 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:

  1. Confirm the Mail and Proxies settings on the configure page.
  2. Setup a cron job (or equivalent) to call the tools/mailnotify script, as described in the System.MailerContrib topic.

Automate removal of expired sessions and lease files

By default Foswiki cleans out expired session and lease files each time any topic is viewed, but this has a performance cost. Instead you may wish to schedule a cron job (or equivalent) to run the tools/tick_foswiki.pl script, and set a negative value on the configure page for {Sessions}{ExpireAfter}. For more details, read System.CommandAndCGIScripts#tick_foswiki_pl.

Enable WebStatistics

You can manually or automatically generate a listing of the most popular pages for each web, based on number of visits. For information on setting up this feature, see the System.SiteTools topic.

Enable Localisation

Foswiki supports displaying national (non-ASCII) characters, and using different languages for its basic interface elements. To configure localisation, modify the Localisation section of the configure page. For more information, see Foswiki:Support.InternationalizationSupplement.

Customizing your site

Customize pages for managing personal information

If you are not using Foswiki to manage your users' passwords or email addresses, or would just like to enhance the default pages, then modify the following topics accordingly with information appropriate for your site:

Customize the user topic for new users

When a new user registers on your Foswiki site, a topic with a name corresponding to the user's WikiName is created in the Main web: this topic is the user's user topic. The user topic is based on the Main.NewUserTemplate? topic; if it is not present, then System.NewUserTemplate (and its associated System.UserForm) is used as a default. If you want to customize the user topic for your users, copy System.NewUserTemplate to Main.NewUserTemplate?, and System.UserForm to Main.UserForm?, and make your changes to Main.NewUserTemplate? and Main.UserForm?. (See Foswiki:System.ManagingTopics#CopyTopic for instructions on copying a topic.)

You can edit these topics to suit your needs, such as the following:

  • Customize the user topic for your site.
  • Add an ALLOWTOPICCHANGE preference setting to Main.NewUserTemplate? so only the user can edit their own user topic. In particular, on a public Foswiki site, restricting edit access will avoid vandalism and spam.
  • Add and remove fields defined in the Main.UserForm?.
If you added or removed fields from the user form you may also need to tailor Main.UserRegistration? to match (copy over the contents from System.UserRegistration to Main.UserRegistration when creating it).

Customize the appearance of your Foswiki site

The real power of Foswiki lies in its flexibility to be customized to meet your needs. To change the look of the default skin, PatternSkin, please refer to System.PatternSkin and System.PatternSkinCustomization.

At the Foswiki website you can find more resources. A good place to start exploring is the Foswiki:Support.AdministratorsCookBook which offers tips and tricks for customizing your Foswiki site. Many of these are best done before any content has been added to your site, so immediately after installation is a good time to consider the possibilities.

Left, Top and Bottom Bars with PatternSkin

The top bar and bottom bar are common across all webs.

To customize the top bar, copy System.WebTopBarExample to System.WebTopBar?, and make your desired changes to System.WebTopBar.

To customize the bottom bar, copy System.WebBottomBarExample to System.WebBottomBar?, and make your desired changes to System.WebBottomBar.

The side bar can be customized on a per web basis. To customize the side bar, copy the WebLeftBarExample topic in the given web to WebLeftBar, and make your desired changes to WebLeftBar. If you would like to move the side bar to the right of the page, see System.PatternSkin for more details.

Copyright, License and Classification Statements

At the bottom of each topic, there is a copyright statement that is set in the WEBCOPYRIGHT preference. Its default is the following: Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.

If your Foswiki site is used in an environment without public access you should replace this with your normal copyright notice. You should also consider adding a security classification (e.g., For Internal Use Only) so people do not have to add this manually to every new topic.

If your Foswiki site is publicly accessible, you need to decide which copyright and license you wish to apply to all contributions. For open source applications, licenses such as the GNU Free Documentation License, FreeBSD Documentation License, and one of the various Creative Commons licenses are possible licenses to consider. Remember that once people have started contributing, you cannot retroactively change the license (unless it has a provision for this).

To change the copyright statement, perform the following steps:

  • Copy the WEBCOPYRIGHT preference setting from System.DefaultPreferences to Main.SitePreferences. Change the value to your desired text. This value will be your new default across all webs.
  • You can create a unique message for a specific web by setting the WEBCOPYRIGHT preference in the WebPreferences topic for the given web. For example, you could add a confidential classification to a web that has restricted access.
  • The WEBCOPYRIGHT preference setting in System.WebPreferences covers the documentation that comes with Foswiki, and should not be changed.

WYSIWYG vs Raw Edit

In Foswiki, the WYSIWYG editor is used by default in edit mode. An Edit Raw link is available for those who prefer to edit the raw topic text.

If you prefer to use the raw text editor by default and have a separate WYSIWYG button, as in TWiki 4.1, then you can modify the templates that define the edit screen as described in Foswiki:Support.FaqHowToMakeRawEditDefault.

Installing extensions

Foswiki:Extensions is an extensive library of plugins? for Foswiki that enhance functionality in a huge number of ways. A few plugins are pre-installed in the Foswiki distribution.

In the Extensions section of the configure page, you can select the Find More Extensions button to download and install additional plugins from the foswiki.org website. If you are behind a firewall or your server has no access to the Internet, you can also install plugins manually. Installation instructions for each plugin are located in its corresponding topic on http://foswiki.org/. Additional documentation on Foswiki plugins can be found at Foswiki:Support.PluginsSupplement.

Plugins are activated in the Plugins section of the configure page. In addition, some plugins are also configured in this section.

TWiki Compatibility

Foswiki is 100% backwards compatible with TWiki® markup up to and including TWiki 4.2.4. Existing TWiki webs, topics and attachments can be used with Foswiki without requiring any changes.

To support a seamless upgrade from TWiki, Foswiki ships with a plugin called TWikiCompatibilityPlugin. This plugin enables most TWiki extensions to work with Foswiki, without modifications. It also maps requests for legacy TWiki web topics to their Foswiki equivalents, as defined in Foswiki:Development.TopicNameMappingTable. The TWIKIWEB and MAINWEB TWiki variables are also mapped to the new Foswiki macros SYSTEMWEB and USERSWEB.

If you are not upgrading an existing TWiki installation and do not plan to install plugins from the TWiki web site, it is recommended that you disable the TWikiCompatibilityPlugin in the Plugins Section on the configure page.

If a plugin exists both in a TWiki version and a Foswiki version, it is strongly recommended that you use the Foswiki version, as this is coded to work optimally with Foswiki. As part of the Foswiki project, the Foswiki community is evaluating all of the extensions that are available for TWiki, and porting them over to the Foswiki name space. Many of them are being enhanced through the removal of bugs and security vulnerabilities, resulting in better, more functional extensions for Foswiki.

Troubleshooting

Re-run the configure script and make sure you have resolved all errors and are satisfied that you understand any warnings.

Failing that, consult the topics at Foswiki:Support.SupplementalDocuments and Foswiki:Support.AskedQuestions.

If you need help, ask a question in the Foswiki:Support web or on Foswiki:Community.InternetRelayChat (irc.freenode.net, channel #foswiki).

Foswiki system requirements

Foswiki is capable of running on a variety of operating systems and supporting a wide range of browsers, due to its minimal client and server requirements.

Server requirements

Foswiki is written in Perl 5, which is supported on Microsoft Windows as well as Unix and Unix-like systems (including Linux and OSX), on which it uses a number of shell commands and RCS (Revision Control System), a GNU Free Software package. It should be able to run on any server platform that meets the following requirements.

Resource Required Server Environment
Perl 5.8.4 or higher is recommended. Foswiki will run in perl 5.6.1 but only with Wysiwyg editor disabled. Wysiwyg requires Unicode support which is provided by perl 5.8.1 onwards.
RCS 5.7 or higher (including GNU diff)
Optional. Foswiki includes a pure perl implementation of RCS (RcsLite) that can be used instead, at the cost of performance
GNU diff GNU diff 2.7 or higher is required when not using the all-Perl RcsLite.
Install within the PATH if not included with RCS (check version with diff -v)
Must be the version used by RCS, to avoid problems with binary attachments - RCS may have hard-coded path to diff
Other external programs fgrep, egrep
Cron/scheduler • Unix: cron
• Windows: cron equivalents
Web server Apache is well supported; for information on other servers, see Foswiki:Support.InstallingOnSpecificPlatforms.

Required CPAN modules

Most of the CPAN libraries listed below are part of a standard Perl installation. See Foswiki:Support.HowToInstallCpanModules for detailed information on how to install any CPAN libraries not present in your installation.

The following Perl CPAN modules are used by Foswiki:

Module Preferred version
Algorithm::Diff (included with Foswiki)  
CGI Versions 2.89 and 3.37 must be avoided. Most version from 3.15 and onwards should work.
CGI::Carp >=1.26
CGI::Session >=4.30 (included with Foswiki) Versions 4.20 and before have Foswikibug:1306
Config >=0
Cwd >=3.05
Data::Dumper >=2.121
Error (included)  
File::Copy >=2.06
File::Find >=1.05
File::Spec >=3.05
FileHandle >=2.01
IO::File >=1.10
Text::Diff (included with Foswiki)  
Time::Local >=1.11

You can check version numbers from the command line (replace "ModuleName" with the name of the module):

perl -le 'use ModuleName; print "ModuleName"->VERSION' 

Optional CPAN modules

The following Perl modules may be used by Foswiki. See Foswiki:Support.HowToInstallCpanModules for detailed information on how to install CPAN libraries.

Module Preferred version Description
Archive::Tar   May be required by the Extensions Installer in configure if command line tar or unzip is not available
CGI::Cookie >=1.24 Used for session support
Digest::base    
Digest::SHA1    
Jcode   Used for I18N support with perl 5.6
Locale::Maketext::Lexicon >=0 Used for I18N support
Net::SMTP >=2.29 Used for sending mail
Unicode::Map   Used for I18N support with perl 5.6
Unicode::Map8   Used for I18N support with perl 5.6
Unicode::MapUTF8   Used for I18N support with perl 5.6
Unicode::String   Used for I18N support with perl 5.6
URI   Used for configure

Most of these modules will probably already be present 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 (replace "ModuleName" with the name of the module):

perl -e 'use ModuleName; print $ModuleName::VERSION."\n"' 

Client requirements

Browser clients must support the following capabilities:

  • HTML 3.2
  • Cookie support enabled, if persistent sessions are required
Most skins also require CSS and Javascript support. There is a low-fat skin (Classic) that minimises these requirements. Some skins require newer browser version. The default skin (Pattern) is tested on IE 6, Safari, and Mozilla 5.0 based browsers (such as Firefox).

You can easily select a balance of browser capability versus look and feel. Try the installed skins in the skin browser? and more at Foswiki:Extensions.SkinPackage.

Uploading the Foswiki distribution to your web server host

If you cannot unpack the Foswiki distribution directly in your installation directory, you can unpack the distribution on your local computer, manually create the directory structure on your host server and upload the files as follows:

  • Using the table below, create a directory structure on your host server
  • Upload the Foswiki files by FTP (transfer as text except for the image files in pub directory.)
  • Note: Don't worry if you are not able to put the lib directory at the same level as the bin directory. You can create this directory elsewhere and configure the bin/setlib.cfg file.
    Foswiki dir: What it is: Where to copy: Example:
    foswiki start-up pages root Foswiki dir /home/smith/public_html/foswiki/
    foswiki/bin CGI bin CGI-enabled dir /home/smith/public_html/foswiki/bin
    foswiki/lib library files same level as bin /home/smith/public_html/foswiki/lib
    foswiki/locale language files dir secure from public access /home/smith/public_html/foswiki/locale
    foswiki/pub public files htdoc enabled dir /home/smith/public_html/foswiki/pub
    foswiki/data topic data dir secure from public access /home/smith/public_html/foswiki/data
    foswiki/templates web templates dir secure from public access /home/smith/public_html/foswiki/templates
    foswiki/tools Foswiki utlilities dir secure from public access /home/smith/public_html/foswiki/tools
    foswiki/working Temporary and internal files dir secure from public access /home/smith/public_html/foswiki/working

Configuring Foswiki manually (without using the configure page)

It is highly recommended that you configure Foswiki by using your browser to access the configure page. However, if you are unable to get the configure page to display (for example, if a dependency is missing), or for some reason you do not wish to use the configure page, then you can configure Foswiki manually

Perform the following steps to manually configure Foswiki:

  • Copy the file lib/Foswiki.spec to lib/LocalSite.cfg
  • Remove the # in front of the following settings, and ensure that they are set to the correct values:
       $Foswiki::cfg{DefaultUrlHost}
       $Foswiki::cfg{ScriptUrlPath}
       $Foswiki::cfg{PubUrlPath}
       $Foswiki::cfg{PubDir}
       $Foswiki::cfg{TemplateDir}
       $Foswiki::cfg{DataDir}
       $Foswiki::cfg{LocalesDir}
       $Foswiki::cfg{OS}
  • Make sure the following settings are defined:
       $Foswiki::cfg{LoginManager}
       $Foswiki::cfg{WebMasterEmail}
       $Foswiki::cfg{SMTP}{MAILHOST}
       $Foswiki::cfg{SMTP}{SENDERHOST}


Related Topics: AdminDocumentationCategory, Foswiki:Support.SupplementalDocuments

TWiki is a registered trademark of Peter Thoeny.

Topic revision: r2 - 03 Oct 2009 - 17:31:55 - CoriaXu007
 
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback