xwiki项目部署,配置文件配置

环境搭建博客:http://blog.csdn.net/lzwjavaphp/article/details/40185585

http://blog.csdn.net/qw517ll/article/details/39082363.

性能优化:

http://www.xwikichina.com/xwiki/bin/view/AdminGuide/%E7%AE%A1%E7%90%86%E5%91%98%E6%8C%87%E5%8D%97

1   背景介绍

国内xwiki安装使用资料较少,根据自己使用xwiki经验,总结出来,供参考,同时希望感兴趣的朋友能够一起讨论,XWiki是一个强大的Java开源的Wiki引擎。

它支持一些受欢迎的特性如:(内容管理(浏览/编辑/预览/保存),支持附件,版本控制,全文本搜索,权限管理使用Hibernate进行数据存储,RSS输出与显示外部的RSS feeds,多语言支持,提供XML/RPC的API,WYSIWYGHTML编辑器,导出为PDFGroovy脚本支持等等)。

2   安装包

Mysql

apache-tomcat-7.0.42-windows-x64.zip

xwiki-enterprise-web-7.4-milestone-2.war
xwiki-enterprise-ui-mainwiki-all-6.2.2.xar

xwiki下载地址 http://enterprise.xwiki.org/xwiki/bin/view/Main/Download

3   操作流程

3.1    使用tomcat和sql数据库

把xwiki-enterprise-web-7.4-milestone-2.war 放到 在tomcat文件/webapps 下,启动tomcat,待war包全部解压完成后关闭tomcat,并删除war包。同时把xwiki-enterprise-web-7.4-milestone-2文件名改为xwiki。

3.2    修改配置

3.2.1    修改XWIKI.cfg,开启superadmin。

在xwiki-enterprise-web-7.4-milestone-2文件夹下的xwiki.cfg.去掉#.

#-# Enable toallow superadmin. It is disabled by default as this could be a

#-# securitybreach if it were set and you forgot about it. Should only be enabled

#-# for recoveringthe Wiki when the rights are completely messed.

xwiki.superadminpassword=system

3.2.2    修改hibernate.hbm.xml,启动mysql数据库连接.

<!--Configuration for the default database.

         Comment out this section and uncommentother sections below if you want to use another database.

         Note that the database tables will becreated automatically if they don't already exist.

 

         If you want the main wiki database tobe different than "xwiki" (or the default schema for schema basedengines)

         you will also have to set the propertyxwiki.db in xwiki.cfg file

    -->

    <!--

    <propertyname="connection.url">jdbc:hsqldb:file:${environment.permanentDirectory}/database/xwiki_db;shutdown=true</property>

    <propertyname="connection.username">sa</property>

    <propertyname="connection.password"></property>

    <propertyname="connection.driver_class">org.hsqldb.jdbcDriver</property>

    <propertyname="dialect">org.hibernate.dialect.HSQLDialect</property>

 

    <mappingresource="xwiki.hbm.xml"/>

    <mappingresource="feeds.hbm.xml"/>

    <mappingresource="activitystream.hbm.xml"/>

    <mappingresource="instance.hbm.xml"/>

    <mappingresource="mailsender.hbm.xml"/>

    -->

    <!-- MySQL configuration.

         Uncomment if you want to use MySQL andcomment out other database configurations.

         Notes:

           - if you want the main wiki databaseto be different than "xwiki"

             you will also have to set theproperty xwiki.db in xwiki.cfg file

    -->

   <property name="connection.url">jdbc:mysql://自己数据库的地址/xwiki</property>

   <propertyname="connection.username">数据库的名称</property>

<propertyname="connection.password">数据库的密码</property>

  <propertyname="connection.driver_class">com.mysql.jdbc.Driver</property>

    <propertyname="dialect">org.hibernate.dialect.MySQL5InnoDBDialect</property>

<propertyname="dbcp.poolPreparedStatements">true</property>

<propertyname="connection.useUnicode">true</property><!-- 控制编码问题-->

    <propertyname="connection.characterEncoding">utf-8</property

    <propertyname="dbcp.maxOpenPreparedStatements">20</property>

    <mappingresource="xwiki.hbm.xml"/>

    <mappingresource="feeds.hbm.xml"/>

    <mapping resource="activitystream.hbm.xml"/>

    <mappingresource="instance.hbm.xml"/>

<mappingresource="mailsender.hbm.xml"/>

3.2.3    建立数据库

create database xwiki default character setutf8; 


3.2.4    导入sql连接包

mysql-connector-java-5.1.12.jar 到 webapps/xwiki/WEB-INF/lib/ 下。然后启动tomcat.

3.2.5    修改tomcat内存(出现错误的情况下)

3.2.5.1catalina.sh

要添加在tomcat 的bin 下catalina.sh 里,位置cygwin=false前 。注意引号要带上,红色的为新添加的.# OS specific support. $var _must_be set to either true or false.
JAVA_OPTS="-Xms256m -Xmx512m -Xss1024K -XX:PermSize=128m-XX:MaxPermSize=256m"
cygwin=false

 

JAVA_OPTS=-Xms800m -Xmx1480m -XX:PermSize=256m-XX:MaxPermSize=768m -Djava.awt.headless=true

3.2.5.2catalina.bat

java.lang.OutOfMemoryError(在$TOMCAT_HOME/bin/catalina.bat中增加) 183行前

增加:

set JAVA_OPTS=-Xms800m -Xmx1480m-XX:PermSize=256m -XX:MaxPermSize=768m -Djava.awt.headless=true

3.3    启动tomact

3.4    访问地址

访问XWIKI的地址,http://自己服务器的地址和端口号/xwiki/bin/view/Main/,成功。XWIKI进入第一次初始化过程。过程比较慢。

 

3.5    解决编码问题

参考文档:http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Encoding

http://www.blogjava.net/daning/archive/2007/03/23/105980.html.

3.6    配置多组用户

WEB-INF/xwiki.properties文件设置url.standard.multiwiki.isPathBased=false以及在WEB-INF/xwiki.cfg文件设置xwiki.virtual.usepath=0。

重新启动xwiki

如果您已经创建基于path-based方式的subwikis,你想通过Wiki Index查找所有wiki,那么要确保它们都有唯一别名。

3.7    性能优化配置

http://www.xwikichina.com/xwiki/bin/view/AdminGuide/Performance

3.8    更改密码

http://www.xwikichina.com/xwiki/bin/view/AdminGuide/%E7%94%A8%E6%88%B7%E7%AE%A1%E7%90%86

 

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值