2015年5月

一、安装必备的软件包

sudo locale-gen zh_CN
sudo locale-gen zh_CN.UTF-8
sudo dpkg-reconfigure locales
sudo perl -MCPAN -e 'install HTML::Template'
sudo apt-get install nginx fcgiwrap rcs

二、配置Nginx站点

server {

    listen       80;
    server_name  wiki.anrip.com;

    root /srv/webroot/wiki/;
    index index.html;

    rewrite ^/$          /bin/view;
    rewrite ^/([A-Z].*)  /bin/view/$1;
    rewrite ^/edit/(.*)  /bin/edit/$1;

    location / {
        deny all;
    }

    location ~ ^/pub/ {
        allow all;
    }

    location ~ ^/bin/ {
        allow all;
        fastcgi_pass   unix:/var/run/fcgiwrap.socket;
        fastcgi_split_path_info  ^(/bin/[^/]+)(/.*)$;
        include        fastcgi_params;
        fastcgi_param  PATH_INFO        $fastcgi_path_info;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
    }

}

三、配置TWiki站点

http://wiki.anrip.com/bin/configure
此处比较重要,可能会提示一些缺少的软件包等,务必要解决;
另外,语言等也是在此处设置,无需像网上所讲的需要从源代码修改配置。