java wiki 系统_xwiki系统

1、下载tomcat

tar -zxvf apache-tomcat-8.0.14.tar.gz

mv apache-tomcat-8.0.14 tomcat-xwiki-8.0

2、下载xwiki的war包

wget http://download.forge.ow2.org/xwiki/xwiki-enterprise-web-8.4.5.war

unzip xwiki-enterprise-web-6.3.war

mv xwiki-enterprise-web-6.3 xwiki

3、创建数据库

create database xwiki

grant all privileges on xwiki.* to xwiki@127.0.0.1 identified by 'xwiki';

4、下载mysql驱动

wget

http://repo1.maven.org/maven2/mysql/mysql-connector-java/5.1.34/mysql-connector-java-5.1.34.jar

mv mysql-connector-java-5.1.34.jar ./tomcat-xwiki-8.0/webapps/xwiki/WEB-INF/lib/

5、修改xwiki配置

cp -p hibernate.cfg.xml hibernate.cfg.xml-bak

vi hibernate.cfg.xml 删除所有多余的配置文件。

[root@fanxh WEB-INF]# cat hibernate.cfg.xml

/p>

"-//Hibernate/Hibernate Configuration DTD//EN"

"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">

jdbc:mysql://localhost/xwiki

xwiki

xwiki

com.mysql.jdbc.Driver

org.hibernate.dialect.MySQL5InnoDBDialect

20

a.XWIKI字符集编码配置

修改 web.xml文件

/data/app_platform/xwiki_tomcat/webapps/xwiki/WEB-INF/xwiki.cfg

#-# The encoding to use when transformin strings to and from byte arrays. This causes the jvm encoding to be ignored,

#-# since we want to be independend of the underlying system.

xwiki.encoding=UTF-8

b.修改hibernate.cfg.xml

hibernate.cfg.xml中添加

true

UTF-8

c.MySQL的配置文件my.cnf

[client]

default-character-set=utf8

[mysqld]

default-character-set=utf8

character-set-server=utf8

collation-server=utf8_bin

d.管理附件(/var/local/xwiki/)

默认情况下,XWIKI使用数据库存储附件,上传的附件最大为30M左右,同时MySQL的配置文件my.cnf中要设置max_allowed_packet为最大值的3倍左右,因为存储历史版本也会耗费空间

使用文件系统存储可以上传更大的附件,XWIKI使用一个临时目录来存储从数据库中调出的图片或附件。

附件的存储目录在xwiki.properties中设定,不可以随意增加或删除这个目录下的内容,因为每个附件在数据库中都有相应的元数据

#-# Note if the system property xwiki.data.dir is set then this property is not used.

#-# If neither the system property nor this configuration value here are set then the Servlet container's temporary

#-# directory is used; This is absolutely not recommended since that directory could be wiped out at any time and you

#-# should specify a value.

environment.permanentDirectory=/var/local/xwiki/

最好在第一次运行XWIKI的时候就设定好附件的存储方式

在xwik.cfg文件中设置

xwiki.store.attachment.hint=file

xwiki.store.attachment.versioning.hint=file

xwiki.store.attachment.recyclebin.hint=file

用管理员登陆的话,需要修改xwiki.cfg,将xwiki.superadminpassword=system 前面#去掉, 用superadmin/system登陆即可。

e、开启管理员管理功能

XWiki默认安装是没开启管理员帐号的,要打开管理员帐号,需要到安装目录“X:PXWiki EnterprisewebappsxwikiWEB-INFxwiki.cfg“文件中,把“xwiki.superadminpassword=system”用帐号superadmin/system登陆了

f、更改语言配置

XWiki默认是英文的,要更改为中文,需要进入管理页面 Wiki Administration->Configuration->General->DEFAULT LANGUAGE,把原有的en改为zh,再保存就自动切换到熟悉的中文界面了。

6、安装相应版本的ui主题

http://maven.xwiki.org/releases/org/xwiki/enterprise/xwiki-enterprise-ui-mainwiki-all/

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值