出于好奇,我试着搭建了twiki,发现不是很麻烦,而且几乎接近绿色(全部文件都在/var/www/twiki中,除了需要安装apache和perl一些模块之外)。
参考:http://twiki.org/cgi-bin/view/TWiki/TWikiInstallationGuide,ldap主要是安装插件,然后配置extension中的属性。
原文在这里,中间如果发现找不到Ldap.pm文件,需要在cpan中安装net:ldap模块,ubuntu中apache用户和组应为www-data。
http://blog.csdn.net/edablog/article/details/12583687
应该是网上第一篇中文写的较详细的介绍,因为在配置过程中未找到相关中文资料。
仅完成账户登录认证功能,其他高级功能未涉及。
准备工作:
1,twiki能够正常访问
2,安装Ldap相关的plugin包,可在extension处直接安装,或者去twiki.org下载zip包
http://twiki.org/cgi-bin/view/Plugins/SearchByTags?tag=ldap
安装ldap plugin
1,这里安装的zip包,LdapContrib.zip, LdapNgPlugin.zip,LdapPlugin.zip,NewUserPlugin.zip,解压在twiki安装路径就好了。
配置
1,Security setup 选择,图表来自网络
Authentication | LoginManager | TWiki::LoginManager::TemplateLogin |
User Mapping | UserMappingManager | TWiki::Users::LdapUserMapping |
Passwords | PasswordManager | TWiki::Users::LdapUser |
Ldap Host | ldap.mydomain.com | ldap的host,用实际的ldap server |
Ldap Post | 389 | Ldap server port number |
Ldap Version | 3 | Ldap version. Should only be changed if an older version of Ldap is used. |
Ldap Base | dc=mydomain,dc=com | ldap的base |
Ldap BindDN | CN=yourname,DC=mydomain,DC=coml | 可以访问ldap server的用户 |
Ldap Bindpassword | password | 对应上面账户的用户密码 |
3,接下来配了这几行
Ldap UserBase | dc=mydomain,dc=com | |
Ldap LoginFilter | objectClass=user | 这个看ldap的配置了,使用相应的名字 |
Ldap LoginAttribute | cn | |
Ldap WikiNameAttribute | name |
4,group没设,
需要删空,不能留个无效的group
5,在终端运行
5 0 * * * cd <twiki-install-path>/bin && ./view refreshldap=on Main/WebHome >/dev/null
8,Done