這些說明更適合開發人員,以及想要使用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