这些说明更适合开发人员,以及想要使用Foswiki“出血边缘”的管理员。我们建议使用包装分布。查看我们的下载页面
您只需将Apache指向它即可从此克隆中运行Foswiki实例。请参阅Apacheconfiggenerator
注意:配置已在主分支上完全重写。 Foswiki现在能够在没有配置的情况下“引导”本身。假装默认扩展名进行假装安装后,将浏览器指向Apacheconfiggenerator中配置的新站点的默认URL。 (例如http: http://yoursite.com : http://yoursite.com/foswiki或http://yoursite.com/foswiki/bin/view ,取决于Apache配置)
要在结帐区域中“安装”扩展名,您应该使用pseudo-install.pl脚本安装它们。在Unix/Linux上,此脚本会生成从核心树到扩展名的软链接,因此您可以原位处理代码,并查看更改对实时Foswiki的影响,而无需执行安装步骤。 Windows不支持软链接,因此脚本也可以以-copy模式(Windows上的默认值)运行,但是在这种情况下,每次更改扩展程序时,您都必须重新运行它。使用:
pseudo-install.pl default以安装默认贡献和插件(例如extensions.twistycontrib,它依赖于Extensions.patternskin)pseudo-install.pl developer安装其他开发人员扩展。开发人员选项还安装了所有默认扩展名。有关选项和更多信息,请参见pseudo-install.pl脚本(结帐的核心目录)的标题评论。请注意, pseudo-install.pl仅适用于具有清单文件的扩展名,如Extensions.buildContrib所要求。下面的脚本示例是bash Shell。
典型的情况是,您想从“主”分支机构运行一个伪安装的Foswiki。而且,如果开发插件,则希望能够在此安装中激活插件。这是从Git检查主分支并进行伪安装的整个序列。我们假设您想在/var/www/foswiki中运行基于git的安装
以下命令查看绝对最小的foswiki(仅核心 +默认用户映射)。这是将运行的最小结帐。步骤是:
git clone https://github.com/foswiki/distro.git foswikicd core && ./pseudo-install.pl default cd /var/www
mkdir foswiki
git clone https://github.com/foswiki/distro.git foswiki
Cloning into 'foswiki'...
remote: Counting objects: 134190, done.
remote: Compressing objects: 100% (37847/37847), done.
remote: Total 134190 (delta 87343), reused 132136 (delta 85289)
Receiving objects: 100% (134190/134190), 66.86 MiB | 1.63 MiB/s, done.
Resolving deltas: 100% (87343/87343), done.
Checking connectivity... done.
# By default this will leave you in the "master" branch, where leading edge development happens
# If you want to use the current release branch, change to the Release01x01 branch
# Skip this step if you want to remain on the experimental master branch.
cd foswiki
git checkout Release01x01
Branch Release01x01 set up to track remote branch Release01x01 from origin.
Switched to a new branch 'Release01x01'
# The extensions have all been checked out one level up from the "core" directory
# the next step is to link / copy them into the installation. This is done with pseudo-install.
cd core
perl -T pseudo-install.pl default
Installing extensions: PatchFoswikiContrib, AutoViewTemplatePlugin, CompareRevisionsAddOn, CommentPlugin, EditTablePlugin, EmptyPlugin, FamFamFamContrib, HistoryPlugin, InterwikiPlugin, JSCalendarContrib, JQueryPlugin, MailerContrib, TablePlugin, TwistyPlugin, PatternSkin, PreferencesPlugin, RenderListPlugin, SlideShowPlugin, SmiliesPlugin, SpreadSheetPlugin, TipsContrib, WysiwygPlugin, TinyMCEPlugin, TopicUserMappingContrib, TWikiCompatibilityPlugin, core
Processing AutoViewTemplatePlugin
Linked data/System/AutoViewTemplatePlugin.txt
mkdir /var/www/fw/core/lib/Foswiki/Plugins
...
#...
#... A large amount of output is generated.
#... Errors about dependencies on foswiki extensions can generally be ignored.
#... The extensions are not installed in the order that would resolve all dependencies.
#...
# If necessary, change ownership of all files to the webserver user.
# In this case that is 'apache:apache', though it may also be 'www-data:www-data'
# e.g. on Debian and Ubuntu systems, or something else entirely. Check first.
chown -R apache:apache foswiki
# Now configure Apache to use the Foswiki in /var/www/foswiki/core
core/../foswiki.httpd.conffoswiki.httpd.conf httpd.conf或/etc/apache2/sites_enabled或/etc/apache2/vhosts.d或/etc/apache2/Include ...检查您本地分发的说明。Include /path/to/foswiki.httpd.confSymbolic link not allowed or link target not accessible类型消息,则您可能需要在+FollowSymLinks Configuration中的/var/www/foswiki/dev/core/pub foctsymlink中Options 。在这一点上,如果您将浏览器指向Foswiki URL,则应“工作”,但会在配置的顶部显示自举警告。要完全配置Foswiki,请访问bin/configure URL,解决任何警告和错误,然后保存配置。注意:保存配置后,除非您已经注册并授予自己“ adimin”权威,否则您将无法再次使用配置。您可以控制谁可以通过设置Security and Authentication - > Access Control {ConfigureFilter}来使用配置。设置该选项后,它替换了管理权限的支票,并允许包括客人用户在内的任何用户使用配置。所以请注意!。
时不时地,您将需要与Foswiki Git存储库中的最新版本保持安装。伪安装脚本不够聪明,无法应对表现的更改,因此这是更新的白痴证明方式。它首先删除所有链接(或复制的文件),Git提取。最后进行了一个新的伪安装。
cd /var/www/foswiki/core
./pseudo-install.pl -uninstall all
git pull
./pseudo-install.pl default
chown -R apache:apache ..
通常,除非有人删除文件(即使这样,您通常也可以忽略它)。
如果您pseudo-install.pl开发developer
cd /var/www/foswiki/core
./pseudo-install.pl developer
这还将安装BuildContrib和许多对开发人员有用的其他组件。
单元测试启用了断言,但实时Web环境没有进行。为了启用断言,请编辑bin/LocalLib.cfg (如果不存在,请通过复制bin/LocalLib.cfg.txt来创建它),并解开以下行
$ENV{FOSWIKI_ASSERTS} = 1;
这实现了会影响性能的其他验证测试,但会发现一些在正常网络使用过程中可能会错过的问题。
Foswiki 1.2不再使用CPAN模块船。现在建议使用系统的软件包管理器或CPAN安装依赖项。请参阅http://foswiki.org/system/systemsrequirentess。如果您无法安装CPAN依赖关系,请在CpanconTrib安装伪造以获取1.x style foswiki特定依赖项。 (Cpancontrib尚未发布)。为了测试这些模块,应在bin/locallib.cfg中启用CPAN lib预先计算,通过删除以下行:
$CPANBASE = ''; # Uncommented: Default path prepended
。有关更多详细信息,请参见bin/LocalLib.cfg.txt中的评论。
最好使用平台模块以及已发货的模块进行测试。
上面的示例命令描述了如何安装简约的foswiki。伪安装脚本知道与非默认扩展程序一起使用的其他技巧。如果您使用当前尚未签出的扩展名进行置换,则伪安装将使用https://github.com/foswiki/ExtensionName.git自动从GitHub克隆扩展
注意:尽管我们在Foswiki Core Distribution(“ distro”)中使用发布托管分支(Master,Release01x00,Release01x01),但非默认扩展程序通常只有“主”分支。
以下是使用AntiwikisPamplugin作为一个例子安装非默认扩展名的方法:
cd foswiki/core
./pseudo-install.pl AntiWikiSpamPlugin
Useless use of E at ./pseudo-install.pl line 1553.
Useless use of E at ./pseudo-install.pl line 1553.
Installing extensions: AntiWikiSpamPlugin
Processing AntiWikiSpamPlugin
Trying clone from git://github.com/foswiki/AntiWikiSpamPlugin.git...
Cloning into 'AntiWikiSpamPlugin'...
remote: Counting objects: 489, done.
remote: Total 489 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (489/489), 86.42 KiB | 0 bytes/s, done.
Resolving deltas: 100% (185/185), done.
Checking connectivity... done.
Cloned AntiWikiSpamPlugin OK
Linked data/Main/AntiWikiSpamBypassGroup.txt
Linked data/System/AntiWikiSpamLocalList.txt
Linked data/System/AntiWikiSpamRegistrationWhiteList.txt
Linked data/System/AntiWikiSpamRegistrationBlackList.txt
Linked data/Sandbox/AntiWikiSpamTestTopic.txt
Linked data/System/AntiWikiSpamPlugin.txt
Linked lib/Foswiki/Plugins/AntiWikiSpamPlugin.pm
Linked lib/Foswiki/Plugins/AntiWikiSpamPlugin
Linked test/unit/AntiWikiSpamPlugin
Linked /var/www/fw/core/tools/develop/githooks/commit-msg as /var/www/fw/AntiWikiSpamPlugin/.git/hooks/commit-msg
Linked /var/www/fw/core/tools/develop/githooks/pre-commit as /var/www/fw/AntiWikiSpamPlugin/.git/hooks/pre-commit
Linked /var/www/fw/core/tools/develop/githooks/commit-msg as /var/www/fw/AntiWikiSpamPlugin/../.git/hooks/commit-msg
Linked /var/www/fw/core/tools/develop/githooks/pre-commit as /var/www/fw/AntiWikiSpamPlugin/../.git/hooks/pre-commit
AntiWikiSpamPlugin installed
Linked /var/www/fw/core/tools/develop/githooks/commit-msg as /var/www/fw/core/.git/hooks/commit-msg
Linked /var/www/fw/core/tools/develop/githooks/pre-commit as /var/www/fw/core/.git/hooks/pre-commit
Linked /var/www/fw/core/tools/develop/githooks/commit-msg as /var/www/fw/core/../.git/hooks/commit-msg
Linked /var/www/fw/core/tools/develop/githooks/pre-commit as /var/www/fw/core/../.git/hooks/pre-commit
如果您更改了很多清单或手动链接到任何文件,并且想要删除任何破裂的软链接,这很方便。假设您的中继结帐处在/var/www/foswiki 。在Release01x01和主分支之间切换时,您还需要执行此操作。
find -L /var/www/foswiki/core -type l -exec rm {} ;
您可以使用create_new_extension.pl脚本快速,轻松地创建一个新的扩展名,该脚本在您安装extensions.buildcontrib时安装在core中。
如果您正在开发新代码,则需要设置开发和测试环境。为此,您需要伪造!buildContrib,!UnitTestContrib和!testFixTurePlugin。
./pseudo-install.pl developer
然后:
cd test/unit
export FOSWIKI_LIBS`/var/www/foswiki/core/lib
perl ../bin/TestRunner.pl FoswikiSuite
(或在Windows上等效)
有关完整的详细信息,请参见http://foswiki.org/development/unittests#settingtingupatestenverments