背景介绍
xwiki是一款企业团队协作和知识管理的开源软件,该软件的功能比较强大,使用起来比较便捷。官方网址为http://www.xwiki.org/xwiki/bin/view/Main/WebHome#
傻瓜包安装方法较为简单,直接下载standalone版本,然后修改start_xwiki.sh中的XWIKI_OPTS值,或直接运行即可,此方法致命的缺点在于性能问题。
开启superadmin用户的方法
修改$XWIKI_HOME/webapps/xwiki/WEB-INF/xwiki.cfg文件:
#-# Enable to allow superadmin. It is disabled by default as this could be a #-# security breach if it were set and you forgot about it. Should only be enabled #-# for recovering the Wiki when the rights are completely messed. xwiki.superadminpassword=system
使用独立的Mysql数据库服务器
通过修改数据库配置文件$XWIKI_HOME/webapps/xwiki/WEB-INF/hibernate.cfg.xml文件;
注释原有的数据库连接方式,开启mysql数据库连接;
<!-- Configuration for the default database. Comment out this section and uncomment other sections below if you want to use another database. Note that the database tables will be created automatically if they don't already exist. <property name="connection.url">jdbc:hsqldb:file:${environment.permanentDirectory}/database/xwiki_db;shutdown=true</property> <property name="connection.username">sa</property> <property name="connection.password"></property> <property name="connection.driver_class">org.hsqldb.jdbcDriver</property> <property name="dialect">org.hibernate.dialect.HSQLDialect</property> <mapping resource="xwiki.hbm.xml"/> <mapping resource="feeds.hbm.xml"/> <mapping resource="activitystream.hbm.xml"/> <mapping resource="instance.hbm.xml"/> --> <!-- MySQL configuration. Uncomment if you want to use MySQL and comment out other database configurations. --> <property name="connection.url">jdbc:mysql://localhost/xwiki</property> <property name="connection.username">root</property> <property name="connection.password">xwiki</property> <property name="connection.driver_class">com.mysql.jdbc.Driver</property> <property name="dialect">org.hibernate.dialect.MySQL5InnoDBDialect</property> <property name="dbcp.ps.maxActive">20</property> <mapping resource="xwiki.hbm.xml"/> <mapping resource="feeds.hbm.xml"/> <mapping resource="activitystream.hbm.xml"/> <mapping resource="instance.hbm.xml”/>
mysql数据库配置
需要在mysql中建立数据库xwiki,且授予相关的权限:
create database xwiki default character set utf8; grant all privileges on xwiki.* to xwiki@localhost identified by ‘xwiki’;
使用独立的tomcat和独立的mysql数据库服务器
下载xwiki对应的war包;
启动tomcat;
待war包全部解压完成后关闭tomcat并删除war包;
修改xwiki.cfg,开启superadmin;
修改hibernate.hbm.xml,启动mysql数据库连接;
启动tomcat,并访问localhost:8080/xwiki;
按照安装向导一步步的完成安装;
拷贝xwiki文件夹的内容到ROOT文件夹下,并再次重启tomcat;
中文乱码的解决
$TOMCAT_HOME/conf/server.xml该文件下Connector节中增加URIEncoding=“UTF8"
<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" URIEncoding="UTF8”/>
下一步计划
平台搭建比较简单,关键的问题在于如何利用好该平台,提升团队竞争力和工作效率是一个值得思考的问题。
References
【1】xwiki中文解决方案http://liaoyixun.iteye.com/blog/157174
【2】修改mysql密码的几种方案http://www.xiaojb.com/archives/it/mysqlroot.shtml
【3】windows下基于tomcat和mysql的xwiki解决方案http://wenku.baidu.com/link?url=-AUR42L_7B4ywrmUF7mZo6J16b-0jbQ6qyZPBKzn4hbYfJfTVf2jXOjS2Zl07DSe-bcEQZLPV02v5-A5QeLWYm71SkewNXMNH8UWPK5cUOi;
【4】xwiki示例系统http://183.129.173.169:808/xwiki/bin/view/Main/WebHome;
【5】SkinExtentionsTutorial http://platform.xwiki.org/xwiki/bin/view/DevGuide/SkinExtensionsTutorial;
【6】Documents Macro http://extensions.xwiki.org/xwiki/bin/view/Extension/Documents+Macro;