Foswiki Installation

Since the Foswiki community is larger and more dynamic than the Twiki community, I decided to migrate the existing Twiki installation into a Foswiki installation.

https://foswiki.org/System/InstallationGuide

Steps

Include /etc/apache2/sites-available/foswiki
 [[mailto:root@odin:/etc/init.d][root@odin:/etc/init.d]]# ./apache2 restart
 * Restarting web server apache2
 * We failed to correctly shutdown apache, so we're now killing all running apache processes. This is almost certainly suboptimal, so please make sure your system is working as you'd expect now!
 ... waiting Syntax error on line 24 of /etc/apache2/sites-available/foswiki:
Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
   ...fail!
[[mailto:root@odin:/etc/init.d][root@odin:/etc/init.d]]# ./apache2 restart
 * Restarting web server apache2
Syntax error on line 24 of /etc/apache2/sites-available/foswiki:
Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
   ...fail!
[[mailto:root@odin:/etc/init.d][root@odin:/etc/init.d]]# ./apache2 restart
 * Restarting web server apache2
Syntax error on line 30 of /etc/apache2/sites-available/foswiki:
Invalid command 'RewriteRule', perhaps misspelled or defined by a module not included in the server configuration
   ...fail!
[[mailto:root@odin:/etc/init.d][root@odin:/etc/init.d]]# ./apache2 restart
 * Restarting web server apache2
   ...done.
[[mailto:root@odin:/etc/init.d][root@odin:/etc/init.d]]# 
**** ERROR ****
The following critical dependencies are missing from your installation:
... CGI::Session: Can't locate CGI/Session.pm in @INC 
... Crypt::PasswdMD5: Can't locate Crypt/PasswdMD5.pm in @INC 
... Error: Can't locate Error.pm in @INC 
... JSON: Can't locate JSON.pm in @INC 

Install missing critical dependencies

Add the foswiki/lib directory to the CPAN path:
$foswikiLibPath = '/srv/htdocs/foswiki/lib';

Download the dependencies from: Each time, the Download link is found in the left navigation bar under TOOLS. Install CPAN modules in Ubuntu itself, e.g.:

Change owner and group of foswiki

sudo chown -R www-data:www-data foswiki

Get rid of all exclamation marks in "configure"

 @localPerlLibPath = ( '/usr/bin/perl512/lib/5.12.0', );

Uninstall things you didn't need to install…

Disable TWiki

[Mon Apr 09 08:54:45 2018] [error] Can't locate /srv/htdocs/twiki/tools/mod_perl_startup.pl in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl /etc/apache2) at (eval 2) line 1.
[Mon Apr 09 08:54:45 2018] [error] Can't load Perl file: /srv/htdocs/twiki/tools/mod_perl_startup.pl for server odin.explio.local:0, exiting...
# PerlRequire /srv/htdocs/twiki/tools/mod_perl_startup.pl
# Include /etc/apache2/sites-available/twiki

Optimize your foswiki

see: https://foswiki.org/Support.Question1823