xwiki 10.11.9 war包方式安装

2019-12-04  本文已影响0人  Gavin_c980

安装文件列表

序号 文件名称
01 zulu8.42.0.23-ca-jdk8.0.232-linux_x64.tar.gz
02 apache-tomcat-9.0.27.tar.gz
03 xwiki-platform-distribution-war-10.11.9.war
04 mysql-connector-java-5.1.48.tar.gz
05 xwiki-platform-distribution-flavor-xip-10.11.9.xip
06 mysql-5.7.28-1.el7.x86_64.rpm-bundle.tar
07 createrepo-0.9.9-28.el7.noarch.rpm

系统配置

配置JDK

测试Java

配置本地yum源

创建MySQL库

安装MySQL 检查MySQL字符集

安装Tomcat

<property name="connection.url">jdbc:mysql://192.168.100.167/xwiki?useSSL=false</property>
<property name="connection.username">xwiki</property>
<property name="connection.password">Xwiki123!</property>
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="dialect">org.hibernate.dialect.MySQL5InnoDBDialect</property>
<property name="dbcp.poolPreparedStatements">true</property>
<property name="dbcp.maxOpenPreparedStatements">20</property>

<property name="hibernate.connection.charSet">UTF-8</property>
<property name="hibernate.connection.useUnicode">true</property>
<property name="hibernate.connection.characterEncoding">utf8</property>

<mapping resource="xwiki.hbm.xml"/>
<mapping resource="feeds.hbm.xml"/>
<mapping resource="activitystream.hbm.xml"/>
<mapping resource="instance.hbm.xml"/>
<mapping resource="notification-filter-preferences.hbm.xml"/>
<mapping resource="mailsender.hbm.xml"/>

安装XWiki UI

点击Continue

配置admin用户,密码:admin,然后点击Register and login

点击Continue

选择XWiki Standard Flavor 10.11.9,点击Install this flavor

点击Install进行安装

点击Continue

image.png

点击Continue继续

image.png

点击Continue


进入到首页


备份

备份部分

备份数据库

mysqldump --add-drop-database --databases xwiki > xwiki.sql

在多wiki环境中,使用--all-databases替换--databases

It's important that the backup is done with --add-drop-database since when you restore it it's important that tables that might have been created are removed. For example database migrations can create extra tables. If you want to cancel the migration and go back to your clean dump you'll need to have those tables removed as otherwise when you run the migration again later on you might have errors.

备份WAR文件

最安全做法是将tomcat中webapps的xwiki目录整体复制。这里面大部分文件是静态的不会改变的,但其中有些配置文件是确实需要备份的:

恢复这些配置文件,只需将它们拷贝回原来复制的地方。除了上述配置文件,JDBC、extra plugins也要根据实际情况备份。自定义皮肤在webapps/xwiki/skins/目录下,根据实际情况备份。

备份Permanent Data

xwiki产生如下数据

备份日志

Those logs are not needed by XWiki but you may want to save them to review them later on to diagnose issues that happened for example.

位置:TOMCAT_HOME/logs/catalina.out

备份脚本示例

01. #!/bin/bash  
02.   
03. #Space Separated List of Databases to Dump  
04. #DATABASE="xwiki d1 d3"  
05. DATABASE="xwiki"  
06. DBUSER=root  
07. DBPASS=*****  
08.   
09. #XWIKI data folder  
10. DATAFOLDER=/srv/tomcat6/data/  
11. #Where is the webapps folder for your tomcat installation  
12. # SLES 11 is located /srv/tomcat6/webapps  
13. WEBAPPDIR=/srv/tomcat6/webapps  
14. #What context (dir) does your application deploy to  
15. DEPLOYCONTEXT=ROOT  
16.   
17.   
18. ###~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
19. DEPLOYDIR=${WEBAPPDIR}/${DEPLOYCONTEXT}  
20. DATE=$(date '+%Y-%m-%d')  
21. mkdir ./${DATE}  
22.   
23. #backup mysql  
24. echo "Backing up Mysql"  
25. mysqldump -h 127.0.0.1 -u ${DBUSER} --password=${DBPASS} --max_allowed_packet=512m --add-drop-database --databases ${DATABASE} | /bin/gzip  > ./${DATE}/${DATABASE}.sql.gz  
26.  
27. echo "Backing up Data"  
28. #Backup Exteral Data Storage  
29. /bin/tar -C ${DATAFOLDER}/../ -zcf ./${DATE}/data.tar.gz data  
30.   
31. #Backing Java Keystore  
32. /bin/cp /srv/tomcat6/.keystore ./${DATE}/.keystore  
33.   
34. echo "Backing up xwiki configuration"  
35. /bin/cp ${DEPLOYDIR}/WEB-INF/hibernate.cfg.xml ./${DATE}/hibernate.cfg.xml  
36. /bin/cp ${DEPLOYDIR}/WEB-INF/xwiki.cfg ./${DATE}/xwiki.cfg  
37. /bin/cp ${DEPLOYDIR}/WEB-INF/xwiki.properties ./${DATE}/xwiki.properties  
38.   
39. #Backup Deploy Context  
40. echo "Backing UP deploy Context"  
41. /bin/tar -C ${DEPLOYDIR}/../ -zcf ./${DATE}/ROOT.tar.gz ROOT  
42.   
43. echo "DONE"

恢复

上一篇 下一篇

猜你喜欢

热点阅读