参考了多个xwiki安装资料以及xwiki官网资料,总算配置成功了,这里用的是war包解压的方式
1.安装jdk8(默认路径or自定义路径+配置环境变量,具体自行百度)
2.安装tomcat8,配置其工作的jdk为8(xwiki 8.x只能用tomcat8或其以上版本解压成功)
【\tomcat8\bin\setclasspath.bat】
set JAVA_HOME=C:\Program Files\Java\jdk1.8.0_144
set JRE_HOME=C:\Program Files\Java\jre1.8.0_144
3.安装并配置oracle(如果是mysql需新建数据库,oracle建立新用户即可)
可参考 http://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Installation/InstallationWAR/InstallationOracle/
【在plsql developer中执行语句】
drop user xwiki cascade;
create user xwiki identified by xwiki;
grant all privileges to xwiki;
4.在【\tomcat8\webapps】中放置war包并启动tomcat解压,war包如需重命名在解压前进行
5.设置编码:
a.【\tomcat8\webapps\xwiki\WEB-INF\web.xml】中
<filter>
<filter-name>Set Character Encoding</filter-name>
<filter-class>org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>
b.【\tomcat8\webapps\xwiki\WEB-INF\xwiki.cfg】中
xwiki.encoding = UTF-8
c.***【\tomcat8\conf\server.xml】中
<Connector port="8080" maxHttpHeaderSize="8192" maxThreads="150"
minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100" URIEncoding="UTF-8"/>
6.【\tomcat8\webapps\xwiki\WEB-INF\hibernate.cfg】中注销掉默认的hsqldb数据库,放开并根据自己的实际情况配置Oracle数据库
<property name="connection.url">jdbc:oracle:thin:@192.168.1.101:1521:orcl</property>
7.【\tomcat8\webapps\xwiki\WEB-INF\xwiki.cfg】中,放开xwiki.superadminpassword=system
#-# 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(这里去掉了前面的#-#)
8.将ojdbc6.jar粘贴到【\tomcat8\webapps\xwiki\WEB-INF\lib】中,双击startup.bat运行tomcat8
9.登录localhost:8080/xwiki,进入首页,按步骤依次点击continue,在有网的情况下下载并自动配置UI
10.用superadmin/system登录