This document is a WORK IN PROGRESS.
This is just a quick personal cheat sheet: treat its contents with caution!
XWiki¶
XWiki is an open-source enterprise ready wiki server written in Java, with a focus on extensibility.
Reference(s)
Table of contents¶
Install¶
On Debian based with PostgreSQL and Tomcat 9
Reference(s)
-
First, you have to configure your package manager in order to use the XWiki repository. This can be done simply, using this command:
-
Then do a full system update/upgrade:
-
Now you can see what this repository offers:
-
The following will install everything you need to run XWiki with PostgreSQL and Tomcat 9:
-
Open
/etc/xwiki/xwiki.cfg
file and change lines: -
If you need, add password to the built-in
superadmin
account, by changing line:$ sudo vi /etc/xwiki/xwiki.cfg > ... > #-# 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 > ...
Uninstall¶
- If you want to remove XWiki from your system, you only have to uninstall the package you have installed at the beginning of this documentation. For example:
Config¶
You need to configure your Servlet
container so that XWiki has enough memory. You will need to
tune the value to your need. You should check the logs and see if there are any "out of memory"
errors. Here are some good default values:
For Java 8 (i.e. XWiki >= 8.1
):
$ sudo vi /etc/default/tomcat9
> ...
> # You may pass JVM startup parameters to Java here. If unset, the default
> # options will be: -Djava.awt.headless=true -XX:+UseG1GC
> # JAVA_OPTS="-Djava.awt.headless=true -XX:+UseG1GC"
> JAVA_OPTS="-Djava.awt.headless=true -Xmx2048m"
> ...
In most Debian based systems the default random implementation is /dev/random
which can be very
slow. /dev/urandom
is much faster and is fine for XWiki:
$ sudo vi /etc/default/tomcat9
> ...
> # In most Debian-based systems the default random implementation is /dev/random which can be very
> # slow. /dev/urandom is much faster and it's fine for XWiki's needs.
> JAVA_OPTS="${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom"
- Then simply browse to http://localhost:8080/xwiki to run the final configuration with the
distribution
wizard.
- When asked, install the XWiki Standard Flavor
Use¶
Tips¶
-
If you want to migrate from confluence to XWiki: https://xwiki.com/en/Blog/Confluence-to-XWiki-migration-export-import/
-
See all the shortcuts: https://www.xwiki.org/xwiki/bin/view/Documentation/UserGuide/Features/KeyboardShortcuts
Install XWiki plugins from source¶
Reference(s)
For example, let's install Diagram Application (Pro) from source:
-
After installing maven, change your
$HOME/.config/maven/settings.xml
like so:Note that you can, of course, tweak your> <settings> > <profiles> > <profile> > <id>xwiki</id> > <repositories> > <repository> > <id>xwiki-snapshots</id> > <name>XWiki Nexus Snapshot Repository Proxy</name> > <url>https://nexus.xwiki.org/nexus/content/groups/public-snapshots</url> > <releases> > <enabled>false</enabled> > </releases> > <snapshots> > <enabled>true</enabled> > </snapshots> > </repository> > <repository> > <id>xwiki-releases</id> > <name>XWiki Nexus Releases Repository Proxy</name> > <url>https://nexus.xwiki.org/nexus/content/groups/public</url> > <releases> > <enabled>true</enabled> > </releases> > <snapshots> > <enabled>false</enabled> > </snapshots> > </repository> > </repositories> > <pluginRepositories> > <pluginRepository> > <id>xwiki-snapshots</id> > <name>XWiki Nexus Plugin Snapshot Repository Proxy</name> > <url>https://nexus.xwiki.org/nexus/content/groups/public-snapshots</url> > <releases> > <enabled>false</enabled> > </releases> > <snapshots> > <enabled>true</enabled> > </snapshots> > </pluginRepository> > <pluginRepository> > <id>xwiki-releases</id> > <name>XWiki Nexus Plugin Releases Repository Proxy</name> > <url>https://nexus.xwiki.org/nexus/content/groups/public</url> > <releases> > <enabled>true</enabled> > </releases> > <snapshots> > <enabled>false</enabled> > </snapshots> > </pluginRepository> > </pluginRepositories> > </profile> > </profiles> > <activeProfiles> > <activeProfile>xwiki</activeProfile> > </activeProfiles> > </settings>
settings.xml
in order for it to include more settings like e.g.<localRepository>${user.home}/.config/maven/.m2/repository</localRepository>
. -
Then, clone, build and install
Diagram Application (Pro)
: -
After successfully building the plugin, you should find the following
.xar
file :application-diagram-ui/target/application-diagram-1.16.2.xar
-
Execute the following steps:
- Log into your XWiki instance with an admin user.
- Click on the "Drawer" (very top right corner).
- Click on "Administer Wiki".
- Click on "Content".
- Click on "Import".
- Click on "Browse...".
- Select the previously generated
.xar
file in the browser. - Select it again on the XWiki import page (under the "Available packages" section).
- Click on "Import" (under the "Package Content" section).
- Wait a moment and the plugin will be installed.
That's it the Diagram Application (Pro) plugin should be installed and running.
WIP: not working with this particular plugin at the moment.
If this cheat sheet has been useful to you, then please consider leaving a star here.