Skip to content

Instantly share code, notes, and snippets.

@bitkevin
Last active August 7, 2020 12:50
Show Gist options
  • Save bitkevin/f5c68279916117c402b01eb4e5a83a10 to your computer and use it in GitHub Desktop.
Save bitkevin/f5c68279916117c402b01eb4e5a83a10 to your computer and use it in GitHub Desktop.
apt-get update
apt-get -y install apache2 rcs diffutils zip cron make gcc g++ pkg-config libssl-dev

# http://twiki.org/cgi-bin/view/TWiki/HowToInstallCpanModules
$ perl -MCPAN -e shell

cpan> install Bundle::CPAN
cpan> reload cpan
cpan> install Algorithm::Diff CGI CGI::Carp Config Cwd Data::Dumper Encode Error File::Copy File::Find File::Spec File::Temp FileHandle HTML::Parser HTML::Entities IO::File LWP Net::SMTP Text::Diff Time::Local 
cpan> install Archive::Tar Authen::SASL CGI::Cookie CGI::Session Crypt::SMIME Digest::base Digest::SHA1 JSON Locale::Maketext::Lexicon Net::SMTP URI
mkdir /work
cd /work

wget http://jaist.dl.sourceforge.net/project/twiki/TWiki%20for%20all%20Platforms/TWiki-6.0.2/TWiki-6.0.2.tgz
tar xfz TWiki-6.0.2.tgz

cd ./twiki
cp bin/LocalLib.cfg.txt bin/LocalLib.cfg

vim bin/LocalLib.cfg

$twikiLibPath = "/work/twiki/lib";
chown -R www-data:www-data /work/twiki

Support Chinese

# twiki/lib/LocalSite.cfg
$TWiki::cfg{UseLocale} = 1; 
$TWiki::cfg{Site}{Locale}   = 'zh-CN.UTF-8'; 
$TWiki::cfg{Site}{CharSet}  = 'UTF-8'; 
$TWiki::cfg{Site}{Lang}     = 'zh-CN'; 
$TWiki::cfg{Site}{FullLang} = 'zh-CN';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment