Starting with XWiki 3.3, it's possible to download and install automatically XWiki and every component needed for a production instance in a one shot, with the help of our new .deb packages, into our repository.
This method should work on every Debian-based linux distribution. Feel free to use the user Mailing List to report an issue, or discuss about it.
Before you start make sure you've checked the System Requirements. Main of them - you should have java (jdk) installed.
First Step : APT Configuration
First, you have to configure your package manager in order to use xwiki's repository. This can be done simply, using this command:
wget -q "https://maven.xwiki.org/public.gpg" -O- | sudo apt-key add -
sudo wget "https://maven.xwiki.org/stable/xwiki-stable.list" -P /etc/apt/sources.list.d/
Note that there is several repositories you can choose (as alternatives to the stable one you have in the previous example):
Now you can update the packages database to read the data from this repository.
I'll assume you're using APT tools. You can use Aptitude as well.
Now you can make a little search to see what this repo offers.
It shows the following packages (the exact list depends on the version the repository contains):
- xwiki-common - XWiki, you can install this if you want to take care yourself of the database and application server
- xwiki-mysql-common - XWiki MySQL common package, you can install this if you want to take care yourself of the application server
- xwiki-pgsql-common - XWiki PostgreSQL common package, you can install this if you want to take care yourself of the application server
- xwiki-tomcat7-common - XWiki Tomcat 7 common package, you can install this if you want to take care yourself of the database link
- xwiki-tomcat8-common - XWiki Tomcat 8 common package, you can install this if you want to take care yourself of the database link
- xwiki-tomcat7-mysql - XWiki Tomcat 7/MySQL based package
- xwiki-tomcat8-mysql - XWiki Tomcat 8/MySQL based package
- xwiki-tomcat7-pgsql - XWiki Tomcat 7/PostgreSQL
- xwiki-tomcat8-pgsql - XWiki Tomcat 8/PostgreSQL
- xwiki-solr-data - A pre configured Solr core to be used to setup a standalone instance of Solr for XWiki
Plus legacy packages from older versions of XWiki like xwiki-enterprise-* packages.
According to selection, package manager will install all necessary dependencies (application server, database, Java runtime). If you haven't installed these packages before, package manager can ask additional info from you.
Java 8
Some distributions seems to have issue with the Java version selected by Tomcat so until this is fixed on Ubuntu/Debian or Tomcat side it's usually safer to start by installing Java first before installing XWiki.
On most distribution it means using:
sudo apt-get install openjdk-8-jre-headless
You can also use Web Upd8 repository if you want Oracle Java version. See documentation for Ubuntu or Debian.
XWiki require Java 8 since 8.1, it will be automatically installed as dependency on recent distributions. Problem is that Ubuntu and Debian did not bothered put OpenJDK on older but still supported distributions default repositories (for example Ubuntu 14.04 or Debian Wheezy/Jessie). For those you will have to either install Java 8 yourself or make sure there is some repository with it so that openjdk is installed automatically with XWiki.
Also if you have several versions of Java installed you might need to explicitly tell Tomcat which one to use after the install. See Tomcat Usability section.
Here is a few helpers:
Ubuntu 14.04
Debian Wheezy or Jessie
Second Step : Complete Installation
Most Debian distributions provide a Tomcat package with a pretty low Memory setting by default (128MB) and this need to be increased for XWiki to fully work. See Tomcat Usability section for more details.
Using MySQL
You only have to run this command to install all the interesting components.
sudo apt-get install xwiki-tomcat8-mysql
This package depends on xwiki-common, xwiki-tomcat8-common, xwiki-mysql-common, mysql-server, tomcat8 and libmysql-java.
During the installation, you may have some questions from dbconfig, in charge of the configuration of the database. Don't confuse it with the MySQL root password prompt, which beg you to put a password for the superuser.
DBconfig prompt is about the configuration of xwiki and mysql. If you haven't any mysql already installed and you aren't familiar with it, you should let dbconfig handle this.
DBconfig is then asking you for the mysql root password (you may have entered before). Then, you can choose the password for the "xwiki" mysql user. This user will be used to connect from XWiki application. Choose it wisely, but you don't have to pay a lot of attention to it, because after that, dbconfig is configuring XWiki automatically with these credentials.
The installation now ends, with the automatic start of tomcat daemon ("Starting Tomcat servlet engine tomcat7 [OK]").
You can now point your favorite browser to the following URL to use your wiki: http://localhost:8080/xwiki
Note that your wiki is absolutely empty, like a WAR installation. Distribution Wizard will take care of the rest.
Using PostgreSQL
It's as simple as the MySQL installation, you only need to choose the right virtual package.
sudo apt-get install xwiki-tomcat8-pgsql
You can now point your favorite browser to the following URL to use your wiki: http://localhost:8080/xwiki
PostgreSQL is slightly different than MySQL in the handling of databases and in the manual configuration, but everything should work on the first try.
Security settings
Open /etc/xwiki/xwiki.cfg file and change lines:
...
#-# Cookie encryption keys. You SHOULD replace these values with any random string,
#-# as long as the length is the same.
xwiki.authentication.validationKey=your1stkeyhere
xwiki.authentication.encryptionKey=your2ndkeyhere
...
If you need, add password to the built-in superadmin account, by changing line:
...
#-# 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=yourpassword
...
Tomcat Usability
Java Version
Make sure Tomcat is executed with the right Java version.
This is usually indicated in the file /etc/default/tomcat8 (or /etc/default/tomcat7 for Tomcat 7, etc).
Memory
The default Tomcat memory setup is way too low for XWiki.
You can change it in the file /etc/default/tomcat8 (or /etc/default/tomcat7 for Tomcat 7, etc).
Modify the property JAVA_OPTS. For example:
JAVA_OPTS="-Djava.awt.headless=true -Xmx1024m"
You should check the Memory settings we recommend.
Concluding Step
Failed to execute the [include] macro. Cause: [Error number 2 in 0: No wiki with id [platform] could be found]. Click on this message for details.
org.xwiki.rendering.macro.MacroExecutionException: Failed to load Document [platform:AdminGuide.InstallationConcludingSteps]
at org.xwiki.rendering.internal.macro.include.IncludeMacro.execute(IncludeMacro.java:111)
at org.xwiki.rendering.internal.macro.include.IncludeMacro.execute(IncludeMacro.java:58)
at org.xwiki.rendering.internal.transformation.macro.MacroTransformation.transform(MacroTransformation.java:309)
at org.xwiki.rendering.internal.transformation.DefaultRenderingContext.transformInContext(DefaultRenderingContext.java:183)
at org.xwiki.rendering.internal.transformation.DefaultTransformationManager.performTransformations(DefaultTransformationManager.java:88)
at org.xwiki.display.internal.DocumentContentAsyncExecutor.executeInCurrentExecutionContext(DocumentContentAsyncExecutor.java:395)
at org.xwiki.display.internal.DocumentContentAsyncExecutor.execute(DocumentContentAsyncExecutor.java:268)
at org.xwiki.display.internal.DocumentContentAsyncRenderer.execute(DocumentContentAsyncRenderer.java:112)
at org.xwiki.rendering.async.internal.block.AbstractBlockAsyncRenderer.render(AbstractBlockAsyncRenderer.java:157)
at org.xwiki.rendering.async.internal.block.AbstractBlockAsyncRenderer.render(AbstractBlockAsyncRenderer.java:54)
at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.syncRender(DefaultAsyncRendererExecutor.java:290)
at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.render(DefaultAsyncRendererExecutor.java:267)
at org.xwiki.rendering.async.internal.block.DefaultBlockAsyncRendererExecutor.execute(DefaultBlockAsyncRendererExecutor.java:125)
at org.xwiki.display.internal.DocumentContentDisplayer.display(DocumentContentDisplayer.java:67)
at org.xwiki.display.internal.DocumentContentDisplayer.display(DocumentContentDisplayer.java:43)
at org.xwiki.display.internal.DefaultDocumentDisplayer.display(DefaultDocumentDisplayer.java:96)
at org.xwiki.display.internal.DefaultDocumentDisplayer.display(DefaultDocumentDisplayer.java:39)
at org.xwiki.sheet.internal.SheetDocumentDisplayer.display(SheetDocumentDisplayer.java:123)
at org.xwiki.sheet.internal.SheetDocumentDisplayer.display(SheetDocumentDisplayer.java:52)
at org.xwiki.display.internal.ConfiguredDocumentDisplayer.display(ConfiguredDocumentDisplayer.java:68)
at org.xwiki.display.internal.ConfiguredDocumentDisplayer.display(ConfiguredDocumentDisplayer.java:42)
at com.xpn.xwiki.doc.XWikiDocument.display(XWikiDocument.java:1355)
at com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:1492)
at com.xpn.xwiki.doc.XWikiDocument.displayDocument(XWikiDocument.java:1441)
at com.xpn.xwiki.doc.XWikiDocument.displayDocument(XWikiDocument.java:1410)
at com.xpn.xwiki.api.Document.displayDocument(Document.java:786)
at jdk.internal.reflect.GeneratedMethodAccessor647.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:571)
at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:554)
at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:221)
at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:368)
at org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:704)
at org.apache.velocity.runtime.parser.node.ASTExpression.value(ASTExpression.java:75)
at org.apache.velocity.runtime.parser.node.ASTSetDirective.render(ASTSetDirective.java:242)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:147)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:439)
at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:190)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:147)
at org.xwiki.velocity.internal.directive.TryCatchDirective.render(TryCatchDirective.java:86)
at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:304)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:439)
at org.apache.velocity.Template.merge(Template.java:358)
at org.apache.velocity.Template.merge(Template.java:262)
at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:280)
at com.xpn.xwiki.render.DefaultVelocityManager.evaluate(DefaultVelocityManager.java:321)
at com.xpn.xwiki.internal.template.VelocityTemplateEvaluator.evaluateContent(VelocityTemplateEvaluator.java:95)
at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.evaluateContent(TemplateAsyncRenderer.java:222)
at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.renderVelocity(TemplateAsyncRenderer.java:177)
at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.render(TemplateAsyncRenderer.java:138)
at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.render(TemplateAsyncRenderer.java:54)
at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.lambda$syncRender$0(DefaultAsyncRendererExecutor.java:284)
at com.xpn.xwiki.internal.security.authorization.DefaultAuthorExecutor.call(DefaultAuthorExecutor.java:98)
at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.syncRender(DefaultAsyncRendererExecutor.java:284)
at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.render(DefaultAsyncRendererExecutor.java:267)
at org.xwiki.rendering.async.internal.block.DefaultBlockAsyncRendererExecutor.render(DefaultBlockAsyncRendererExecutor.java:154)
at com.xpn.xwiki.internal.template.InternalTemplateManager.render(InternalTemplateManager.java:843)
at com.xpn.xwiki.internal.template.InternalTemplateManager.renderFromSkin(InternalTemplateManager.java:805)
at com.xpn.xwiki.internal.template.InternalTemplateManager.render(InternalTemplateManager.java:792)
at com.xpn.xwiki.internal.template.InternalTemplateManager.renderNoException(InternalTemplateManager.java:747)
at com.xpn.xwiki.internal.template.InternalTemplateManager.renderNoException(InternalTemplateManager.java:739)
at com.xpn.xwiki.internal.template.DefaultTemplateManager.renderNoException(DefaultTemplateManager.java:79)
at com.xpn.xwiki.internal.template.DefaultTemplateManager.renderNoException(DefaultTemplateManager.java:73)
at org.xwiki.template.script.TemplateScriptService.render(TemplateScriptService.java:54)
at jdk.internal.reflect.GeneratedMethodAccessor299.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:571)
at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:554)
at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:221)
at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:368)
at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:492)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:147)
at org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:218)
at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:331)
at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:261)
at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:304)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:439)
at org.apache.velocity.Template.merge(Template.java:358)
at org.apache.velocity.Template.merge(Template.java:262)
at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:280)
at com.xpn.xwiki.render.DefaultVelocityManager.evaluate(DefaultVelocityManager.java:321)
at com.xpn.xwiki.internal.template.VelocityTemplateEvaluator.evaluateContent(VelocityTemplateEvaluator.java:95)
at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.evaluateContent(TemplateAsyncRenderer.java:222)
at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.renderVelocity(TemplateAsyncRenderer.java:177)
at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.render(TemplateAsyncRenderer.java:138)
at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.render(TemplateAsyncRenderer.java:54)
at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.lambda$syncRender$0(DefaultAsyncRendererExecutor.java:284)
at com.xpn.xwiki.internal.security.authorization.DefaultAuthorExecutor.call(DefaultAuthorExecutor.java:98)
at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.syncRender(DefaultAsyncRendererExecutor.java:284)
at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.render(DefaultAsyncRendererExecutor.java:267)
at org.xwiki.rendering.async.internal.block.DefaultBlockAsyncRendererExecutor.render(DefaultBlockAsyncRendererExecutor.java:154)
at com.xpn.xwiki.internal.template.InternalTemplateManager.render(InternalTemplateManager.java:843)
at com.xpn.xwiki.internal.template.InternalTemplateManager.renderFromSkin(InternalTemplateManager.java:805)
at com.xpn.xwiki.internal.template.InternalTemplateManager.render(InternalTemplateManager.java:792)
at com.xpn.xwiki.internal.template.InternalTemplateManager.renderNoException(InternalTemplateManager.java:747)
at com.xpn.xwiki.internal.template.InternalTemplateManager.renderNoException(InternalTemplateManager.java:739)
at com.xpn.xwiki.internal.template.DefaultTemplateManager.renderNoException(DefaultTemplateManager.java:79)
at com.xpn.xwiki.internal.template.DefaultTemplateManager.renderNoException(DefaultTemplateManager.java:73)
at org.xwiki.template.script.TemplateScriptService.render(TemplateScriptService.java:54)
at jdk.internal.reflect.GeneratedMethodAccessor299.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:571)
at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:554)
at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:221)
at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:368)
at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:492)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:147)
at org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:218)
at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:331)
at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:261)
at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:304)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:147)
at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:171)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:147)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:439)
at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:190)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:439)
at org.apache.velocity.Template.merge(Template.java:358)
at org.apache.velocity.Template.merge(Template.java:262)
at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:280)
at com.xpn.xwiki.render.DefaultVelocityManager.evaluate(DefaultVelocityManager.java:321)
at com.xpn.xwiki.internal.template.VelocityTemplateEvaluator.evaluateContent(VelocityTemplateEvaluator.java:95)
at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.evaluateContent(TemplateAsyncRenderer.java:222)
at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.renderVelocity(TemplateAsyncRenderer.java:177)
at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.render(TemplateAsyncRenderer.java:138)
at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.render(TemplateAsyncRenderer.java:54)
at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.lambda$syncRender$0(DefaultAsyncRendererExecutor.java:284)
at com.xpn.xwiki.internal.security.authorization.DefaultAuthorExecutor.call(DefaultAuthorExecutor.java:98)
at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.syncRender(DefaultAsyncRendererExecutor.java:284)
at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.render(DefaultAsyncRendererExecutor.java:267)
at org.xwiki.rendering.async.internal.block.DefaultBlockAsyncRendererExecutor.render(DefaultBlockAsyncRendererExecutor.java:154)
at com.xpn.xwiki.internal.template.InternalTemplateManager.render(InternalTemplateManager.java:843)
at com.xpn.xwiki.internal.template.InternalTemplateManager.renderFromSkin(InternalTemplateManager.java:805)
at com.xpn.xwiki.internal.template.InternalTemplateManager.renderFromSkin(InternalTemplateManager.java:785)
at com.xpn.xwiki.internal.template.InternalTemplateManager.render(InternalTemplateManager.java:771)
at com.xpn.xwiki.internal.template.DefaultTemplateManager.render(DefaultTemplateManager.java:91)
at com.xpn.xwiki.internal.template.DefaultTemplateManager.render(DefaultTemplateManager.java:85)
at com.xpn.xwiki.XWiki.evaluateTemplate(XWiki.java:2563)
at com.xpn.xwiki.web.Utils.parseTemplate(Utils.java:180)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:651)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:339)
at com.xpn.xwiki.web.LegacyActionServlet.service(LegacyActionServlet.java:114)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:122)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.xwiki.wysiwyg.filter.ConversionFilter.doFilter(ConversionFilter.java:61)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter.doFilter(SetHTTPHeaderFilter.java:63)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:132)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:687)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:346)
at org.apache.coyote.ajp.AjpProcessor.service(AjpProcessor.java:433)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:888)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1684)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: com.xpn.xwiki.XWikiException: Error number 3202 in 3: Exception while reading document [platform:AdminGuide.InstallationConcludingSteps()]
at com.xpn.xwiki.store.XWikiHibernateStore.loadXWikiDoc(XWikiHibernateStore.java:1184)
at com.xpn.xwiki.store.XWikiCacheStore.loadXWikiDoc(XWikiCacheStore.java:399)
at com.xpn.xwiki.XWiki.getDocument(XWiki.java:2194)
at com.xpn.xwiki.XWiki.getDocument(XWiki.java:2256)
at com.xpn.xwiki.XWiki.getDocument(XWiki.java:2155)
at com.xpn.xwiki.doc.DefaultDocumentAccessBridge.getDocumentInstance(DefaultDocumentAccessBridge.java:150)
at org.xwiki.rendering.internal.macro.include.IncludeMacro.execute(IncludeMacro.java:108)
... 185 more
Caused by: com.xpn.xwiki.XWikiException: Error number 2 in 0: No wiki with id [platform] could be found
at com.xpn.xwiki.internal.store.hibernate.HibernateStore.beginTransaction(HibernateStore.java:854)
at com.xpn.xwiki.store.XWikiHibernateBaseStore.beginTransaction(XWikiHibernateBaseStore.java:576)
at com.xpn.xwiki.store.XWikiHibernateStore.loadXWikiDoc(XWikiHibernateStore.java:1040)
... 191 more
Uninstallation
If you want to remove XWiki from your system, you only have to uninstall the package you've installed at the beginning of this documentation. For example:
sudo apt-get --purge remove xwiki-common
Attention, these commands do not remove MySQL/PostgreSQL nor Tomcat from your system. To do so, if you don't use these applications for another purpose, you can make some cleaning with
sudo apt-get --purge autoremove
Troobeshooting
Tomcat
See Tomcat Installation for generic Tomcat related issues.
MySQL
See MySQL Installation for generic MySQL related issues.
PostgreSQL
See PostgreSQL Installation for generic PostgreSQL related issues.
Bad version of PostgreSQL driver on Debian
The version of the PostgreSQL driver on Debian Wheezy and Jessie is the 9.1 (at least when writing those lines) which does not work well with XWiki. You will have to upgrade it.
The latest JDBC postgres driver is available at https://jdbc.postgresql.org/download.html , at the time of this writing, the latest version is postgresql-9.4-1201.jdbc41.jar (which works fine with xwiki), you need to download the driver to your server, a good place is where the other drivers are: /usr/share/java, then remove the symlink postgresql-jdbc4.jar and replace it by one to the new driver:
wget -O /usr/share/java/postgresql-9.4-1201.jdbc41.jar https://jdbc.postgresql.org/download/postgresql-9.4-1201.jdbc41.jar
rm /usr/share/java/postgresql-jdbc4.jar
ln -s /usr/share/java/postgresql-9.4-1201.jdbc41.jar /usr/share/java/postgresql-jdbc4.jar
Restart tomcat and you will not have any issue with the JDBC driver.
There is no automatic migration of Solr schema and it changes it from time to time. The simplest fix such case is usually to delete the folder /var/lib/xwiki/data/solr and restart Tomcat. XWiki will automatically create a new one and start indexing the wiki.
sudo /etc/init.d/tomcat8 stop
rm -rf /var/lib/xwiki/data/solr
sudo /etc/init.d/tomcat8 start
Other useful info
XWiki as root webapp (short URLs)
When doing it make sure to check after upgrade if all is OK in /etc/tomcat8/Catalina/localhost folder (xwiki.xml might be restored).
- Rename file /etc/tomcat7/Catalina/localhost/xwiki.xml into /etc/tomcat8/Catalina/localhost/ROOT.xml
- Edit file /etc/xwiki/xwiki-tomcat8.xml (or /etc/xwiki/xwiki-tomcat7.xml depending on your tomcat version) and modify Context XML element path from /xwiki to / as in moving from
<Context path="/xwiki" docBase="/usr/lib/xwiki" privileged="true" allowLinking="true" crossContext="true">
<!-- make symlinks work in Tomcat -->
<Resources className="org.apache.naming.resources.FileDirContext" allowLinking="true" />
</Context>
to
<Context path="/" docBase="/usr/lib/xwiki" privileged="true" allowLinking="true" crossContext="true">
<!-- make symlinks work in Tomcat -->
<Resources className="org.apache.naming.resources.FileDirContext" allowLinking="true" />
</Context>
- Edit file /etc/xwiki/xwiki.cfg and uncomment xwiki.webapppath=
Integrate with LibreOffice
Install libreoffice with sudo apt-get install libreoffice.
And setup XWiki to automatically start and access libreoffice in /etc/xwiki/xwiki.properties:
openoffice.autoStart=true
openoffice.homePath=/usr/lib/libreoffice/
See Office Importer Application for more details.
Overview of the important files
Here is a list of a different tree. The point is to help you find useful files easily. This list is showing a few files and directories, to keep it simple and clear. The '->' is used to show a link to another file/directory.
XWiki
/etc/xwiki/
- hibernate.cfg.xml Hibernate configuration, helping to configure the database resources
- xwiki.cfg
- xwiki.properties
/usr/lib/xwiki/
- META-INF
- resources
- skins
- templates
- WEB-INF
- hibernate.cfg.xml -> /etc/xwiki/hibernate.cfg.xml
- xwiki.cfg -> /etc/xwiki/xwiki.cfg
- xwiki.properties -> /etc/xwiki/xwiki.properties
Tomcat
/etc/tomcat<version>/
- context.xml
- logging.properties
- server.xml
- tomcat-users.xml
- web.xml
/etc/default/
- tomcat<version> This file helps configuring the Tomcat daemon. Every change needs a restart to be effective
/etc/init.d/
- tomcat<version> Daemon start/stop script
/var/lib/tomcat<version>/
- common
- conf -> /etc/tomcat<version>
- logs -> ../../log/tomcat<version>
- server
- shared
- webapps
/var/log/tomcat<version>/
- catalina.out First logging file. Check this one if you're experiencing troubles with Tomcat/XWiki.
- localhost.<date>.log "Container Log file": Start of each filter and failures thereof are listed.
MySQL
/etc/mysql/
- debian.cnf
- my.cnf Database configuration. Max_allowed_packet is the parameter you need to change to improve upload data size. permitted.
/var/lib/mysql/
- mysql
- xwiki This is the xwiki database. You may want to backup this directory from time to time.
/var/log/
PostgreSQL
/etc/postgresql/
- <version>
- main
- postgresql.conf
- pg_hba.conf
/var/lib/postgresql/<version>/main/