Wiki source code of Installation

Version 99.4 by Vincent Massol on 2017/03/18

Hide last authors
Jean-Vincent Drean 48.1 1 {{box cssClass="floatinginfobox" title="**Contents**"}}
2 {{toc/}}
3 {{/box}}
Ludovic Dubost 28.1 4
Vincent Massol 31.5 5 XWiki is a Java-based wiki and runs on a Servlet Container such as Tomcat, Jetty, JBoss, WebLogic, WebSphere, etc. It also uses a relational database to store its content. It can run on almost any database (HSQL, MySQL, etc) but XWiki and the database need to be setup correctly.
Raffaello Pelagalli 13.1 6
Vincent Massol 93.1 7 There are several ways of installing XWiki:
guillemp 36.1 8
Vincent Massol 84.2 9 * Use the [[Standalone distribution>>AdminGuide.InstallationStandalone]] which already packages a Servlet Container (Jetty) and a database (HSQL), filled with default wiki pages. This is the recommended option for first time XWiki users and for users who wish to quickly try out XWiki.
Guillaume Fenollar 72.1 10 * Use the [[WAR distribution>>AdminGuide.InstallationWAR]] and configure both your container and your database to work with it.
Manuel Smeria 75.4 11 * Use the [[.deb package>>AdminGuide.InstallationViaAPT]] to install the last version of XWiki and the dependencies.
Vincent Massol 93.1 12 * [[Use a non-official installation method>>#HOtherInstallationMethods]].
Vincent Massol 31.5 13
Vincent Massol 84.2 14 If you're upgrading an existing XWiki install check the [[Upgrade instructions page>>AdminGuide.Upgrade]].
Vincent Massol 31.5 15
Vincent Massol 14.3 16 Pick one of the trails in the outline on the right to get started.
Vincent Massol 31.5 17
Ludovic Dubost 28.1 18 Once you've finished the installation check the other topics in the [[Admin Guide>>AdminGuide.WebHome]] for configuring and [[securing>>Security]] your wiki.
Vincent Massol 31.5 19
Jean-Vincent Drean 48.1 20 {{info}}
Manuel Smeria 75.4 21 If you want to make a manual installation or need to migrate an existing XWiki installation, check the [[Release Notes>>xwiki:ReleaseNotes.WebHome]].
Jean-Vincent Drean 48.1 22 {{/info}}
Vincent Massol 1.112 23
Vincent Massol 94.1 24 {{id name="Prerequisites"/}}
Thomas Mortagne 98.1 25
Vincent Massol 94.1 26 = Hardware and Software requirements =
Vincent Massol 75.2 27
Vincent Massol 99.2 28 * Java 1.8.0_101 or greater installed for XWiki >= 8.1 (Java 7 or greater for XWiki < 8.1, Java 6 or greater for XWiki versions < 6.0)
Vincent Massol 90.1 29 * A Servlet Container supporting Servlet 3.0.1 (Servlet 2.4 for XWiki versions < 7.0)
Vincent Massol 91.1 30 * A JDBC 4 Driver for your database (JDBC 3 was required for XWiki versions < 7.0)
Vincent Massol 80.2 31 * Enough memory, check the [[Memory section>>AdminGuide.Performances#HMemory]] of the [[Performance Guide>>AdminGuide.Performances]].
Manuel Smeria 75.4 32 * Check the [[release notes>>xwiki:ReleaseNotes.WebHome]] for the version you're installing to see what browsers and databases are supported for it. You can also check our [[general support strategy>>dev:Community.SupportStrategy]].
Vincent Massol 75.2 33
Guillaume Fenollar 69.1 34 = Installation Methods =
35
Vincent Massol 96.1 36 * [[Using a standalone distribution >>AdminGuide.InstallationStandalone]]: Provides a built-in XWiki, with a portable database and a lightweight Java container. This standalone distribution is not recommended in a production environment. If you need to use it in a production basis, you may look at the other options.
37 * [[Using .war package (usable for production)>>AdminGuide.InstallationWAR]]: Provides a Java application package that has to be installed in a Java container (such as Tomcat). This can be used on almost any operating system.
38 * [[Using .deb package (usable for production)>>AdminGuide.InstallationViaAPT]]: Provides a .deb package that can be used on a Debian-based operating system. It can be installed with ##dpkg## or ##apt##; installation is thus automated.
39 * [[Using an official XWiki Docker image>>https://hub.docker.com/_/xwiki/]]: Provides an easy solution to test XWiki, with a configuration very close to a production setup.
Ludovic Dubost 28.1 40
Vincent Massol 93.1 41 = Other Installation Methods =
Vincent Massol 89.1 42
Vincent Massol 93.1 43 This section is about other, non-official ways of installing XWiki that have been contributed by the community.
Vincent Massol 89.1 44
Vincent Massol 93.1 45 {{warning}}
46 Tutorials external to the xwiki.org site have not been validated for correctness by the XWiki Development Team and it's also possible that they are out of date or even not working.
47 {{/warning}}
48
49 * [[Ansible playbook for installing XWiki Enterprise>>https://github.com/rastandy/xwiki-ansible-playbook]]
50 * [[Using yaourt on Arch Linux>>https://github.com/xwiki-contrib/packaging-archlinux]]
51 * [[XWiki On OpenShift (Platform-as-a-Service)>>https://github.com/rkmallik/xwiki-example]]
Vincent Massol 95.2 52 * [[XWiki On Windows>>http://agoncalves.developpez.com/tutoriels/xwiki/creer-un-site-associatif/]] (French)
53 * [[XWiki On Debian 4 (Etch) - Tomcat - PostgreSQL (or MySQL)>>http://www.howtoforge.com/xwiki-tomcat-mysql-debian-etch]] (English)
54 * [[XWiki On Debian 4 (Etch) - Tomcat - PostgreSQL (or MySQL)>>http://www.howtoforge.de/howto/xwiki-on-debian-4-etch-tomcat-mysql]] (German)
55 * [[XWiki On Windows - GlassFish - Oracle>>http://etvc.myxwiki.org/xwiki/bin/view/UNA/XWikiInstalation]] (Russian)
56 * [[XWiki on OpenSUSE - Tomcat - MySQL)>>http://geistreicher-papierkorb.blogspot.com/2011/03/setting-up-xwiki-on-opensuse-with-mysql.html]] (English)
57 * [[XWiki On Archlinux - Tomcat - hsql or MySQL>>https://github.com/xwiki-contrib/packaging-archlinux]] (English)
58 * [[Install XWiki on an Ubuntu 16.04 VPS>>https://www.rosehosting.com/blog/install-xwiki-on-an-ubuntu-16-04-vps/]] (English)
Vincent Massol 95.1 59 * [[Install XWiki using Docker compose>>https://zwindler.fr/wordpress/2016/09/15/installer-xwiki-8-2-1-avec-docker-compose-en-2-lignes-de-commandes]] (French)
Nick Reiner 97.1 60 * [[Install XWiki on a CentOS 7 VPS>>https://thishosting.rocks/how-to-build-your-own-wiki-with-xwiki-on-centos/]] (English)
Vincent Massol 93.1 61
Vincent Massol 31.5 62 = Troubleshooting =
Vincent Massol 1.125 63
Manuel Smeria 75.4 64 You can verify some basic settings of your XWiki installation (on Tomcat, MySQL) using the [[Admin Tools application>>extensions:Extension.Admin Tools Application]]. Keep in mind that some of these tools only work in a Linux environment.
Sergiu Dumitriu 74.1 65
66 == Running multiple instances of XWiki in the same container ==
67
68 If you get this error:
69
70 {{code}}
71 com.xpn.xwiki.XWikiException: Error number 3 in 0: Could not initialize main XWiki context
72 Wrapped Exception: Failed to get cache factory component
73 ...
74 Caused by:
75 org.infinispan.jmx.JmxDomainConflictException: Domain already registered org.xwiki.infinispan
76 {{/code}}
77
78 You need to edit ##WEB-INF/cache/infinispan/config.xml## for each instance of XWiki, and change the ##jmxDomain## value (found under the ##globalJmxStatistics## tag) to have a unique name.
Roman Muntyanu 74.2 79
80 == Running XWiki behind proxy-server ==
Thomas Mortagne 75.1 81
Roman Muntyanu 74.2 82 Extension manager relies on remote repositories for searching and fetching available extensions, so if your XWiki is installed in a network accessing the internet through proxy-server, most likely extensions search will return you nothing and log files will contain ##connection refused## exceptions.
83
Sergiu Dumitriu 75.3 84 In such cases you should configure XWiki to know your proxy-server.
Roman Muntyanu 74.2 85
Manuel Smeria 75.4 86 XWiki uses default Java proxy configuration through Apache httpclient. See the [[Java Networking and Proxies documentation>>http://docs.oracle.com/javase/6/docs/technotes/guides/net/proxies.html]] for more details.
Roman Muntyanu 74.2 87 The main idea is to add a set of proxy-related properties to system scope.
88
Manuel Smeria 75.4 89 E.g. for Tomcat 6 it could be done in the following way: modify ##/<tomcat-home>/bin/catalina.sh## and added proxies to the ##JAVA_OPTS## variable definition:
Roman Muntyanu 74.2 90
Vincent Massol 79.1 91 ##JAVA_OPTS="$JAVA_OPTS -Dappserver.home=$CATALINA_HOME -Dappserver.base=$CATALINA_HOME **-Dhttp.proxyHost=proxy.mycompany.com -Dhttp.proxyPort=7777 -Dhttps.proxyHost=proxy.mycompany.com -Dhttps.proxyPort=7777** -Xmx512m -XX:MaxPermSize=196m $XWIKI_OPTS"##
Vincent Massol 84.1 92
93 == Unsupported major.minor version 51.0 ==
94
95 This is because starting with version 6.0, XWiki requires Java 7 and you're using Java 6. You need to upgrade your Java version.
96
Vincent Massol 85.1 97 == Installing without internet connection ==
98
99 Three solutions:
bouquetf 85.2 100
Vincent Massol 95.3 101 * Set up a local Extension Repository, either as a Maven Repository or using the [[Extension Repository Application>>extensions:Extension.Repository Application]]. Of course you'll need to [[prefill it with all the extensions you'll wish to install when offline>>platform:AdminGuide.FillLocalMavenRepository]], which isn't something easy to do.
Vincent Massol 85.1 102 * [[Install the Standalone Distribution>>platform:AdminGuide.InstallationStandalone]] which contains a default set of wiki pages.
103 * Do not use the Distribution Wizard and [[import default wiki pages using the XAR Import feature>>AdminGuide.InstallationConcludingSteps]].
Thomas Mortagne 98.1 104
105 == Getting an error about SSL certificate ==
106
Vincent Massol 99.4 107 If you get an error in the log telling you that it fail to access some some https website it usually means you have a too old version of Java 8 (older that update 101) and you should upgrade it (does not need to be upgraded to next major version of Java, just make sure you have at least Java 8 update 101).
Thomas Mortagne 98.1 108
109 {{code language="none"}}
110 2017-03-14 20:40:17,494 [http://dwswiki10:8080/xwiki/bin/admin/XWiki/XWikiPreferences?editor=globaladmin&section=XWiki.AddExtensions] ERROR aultExtensionRepositoryManager - Failed to search on repository [store.xwiki.com:xwiki:https://store.xwiki.com/xwiki/rest] with query [org.xwiki.extension.repository.search.ExtensionQuery@78b5e254]. Ignore and go to next repository.
111 org.xwiki.extension.repository.search.SearchException: Failed to search extensions based on pattern []
112 at org.xwiki.extension.repository.xwiki.internal.XWikiExtensionRepository.search(XWikiExtensionRepository.java:434)
Thomas Mortagne 99.1 113 ...
Thomas Mortagne 98.1 114 Caused by: java.io.IOException: Failed to request [https://store.xwiki.com/xwiki/rest/repository/search?start=0&number=20&q=]
115 at org.xwiki.extension.repository.xwiki.internal.XWikiExtensionRepository.getRESTResource(XWikiExtensionRepository.java:246)
Thomas Mortagne 99.1 116 ...
Thomas Mortagne 98.1 117 Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
118 at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
Thomas Mortagne 99.1 119 ...
Thomas Mortagne 98.1 120 Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
121 at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:387)
Thomas Mortagne 99.1 122 ...
Thomas Mortagne 98.1 123 Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
124 at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:145)
Thomas Mortagne 99.1 125 ...
Thomas Mortagne 98.1 126 {{/code}}

Get Connected