How to Install XWiki on Ubuntu 18.04

XWiki is a free and opensource advanced Wiki Software which is written in Java. It runs on servlet containers like JBoss, Tomcat etc. It uses a database such as MySQL or PostgreSQL to store its information.

In this tutorial, I'll explain how to install XWiki software on Ubuntu 18.04, using its standalone distribution which is the fastest and easiest way because all components needed by XWiki are automatically installed on the server. This XWiki software provides an in-built  XWiki, with a portable database (HSQLDB) and a lightweight Java container (Jetty).

XWiki comes with lots of useful features such as:

  • A very robust WYSIWYG editor for page editing
  • A powerful wiki syntax
  • Content organization
  • Create your own applications
  • Version Control
  • Advanced search and a lots more

Hardware and Software Requirements

  • 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).
  • A Servlet Container supporting Servlet 3.0.1 (Servlet 2.4 for XWiki versions < 7.0)
  • A Database and a JDBC 4 Driver for your database
  • Enough memory, at least 2 GB RAM (or 1 GB for small Wikis)

XWiki Installation Steps

Before starting any installation, I would recommend updating your system software using apt-update. And you can install wget and screen package if those aren't installed before.

#apt-get update -y
#apt install wget screen

Step 1: Install Java

As discussed before, Xwiki is a Java-based application, so you will need to install Java 8 or above to meet its software requirement. By default Java 8 is not available in the default Ubuntu repository. Hence, you can install the supported Java by adding the webupd8team PPA repository to your system.

#add-apt-repository ppa:webupd8team/java
#apt-get update -y

After adding the PPA repository you need to update the repository packages. Once it's done you can install the required Java 8 by running this command below:

#apt-get install oracle-java8-installer -y
You can confirm the Java version installed.
~# java -version
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)

Step 2: Download and Install XWiki

Firstly, you need to start a new screen session for this XWiki installation. Now we need to download the generic installer that works on all platforms. It just requires only Java to be installed on your system. You can download the XWiki generic installer file with this command below:

#screen -U -S xwiki
#wget http://download.forge.ow2.org/xwiki/xwiki-enterprise-installer-generic-8.1-standard.jar

Once you have downloaded this installer, you can install this downloaded package using Java. The installer takes you to various interactive sections as shown below where it demands an output like entering 1 (accept or proceed)/ 2 (quit) /3 (redisplay) from you to proceed with the installation. Most of the prompts can be answered with 1 (accept or proceed). The installer is quite self-explanatory, so you just need to follow the instructions.

# java -jar xwiki-enterprise-installer-generic-8.1-standard.jar
Aug 7, 2018 10:08:33 AM INFO: Logging initialized at level 'INFO'
Aug 7, 2018 10:08:33 AM INFO: Commandline arguments:
Aug 7, 2018 10:08:33 AM INFO: Detected platform: ubuntu_linux,version=4.15.0-29-generic,arch=x64,symbolicName=null,javaVersion=1.8.0_181
Welcome to the installation of XWiki Enterprise 8.1!
The homepage is at: http://xwiki.org/

Press 1 to continue, 2 to quit, 3 to redisplay

While pressing 1 to continue, it will provide you with XWiki Enterprise - Readme Note as below:

Please read the following information:
XWiki Enterprise - Readme

XWiki Enterprise is a second generation Wiki engine, features professional features like
XWiki Enterprise also includes an advanced form and scripting engine which makes it an ideal
development environment for constructing data-based intranet applications. It has powerful extensibility features, supports scripting, extensions and is based on a highly modular
architecture. The scripting engine allows to access a powerful API for accessing the XWiki repository in read and write mode.
XWiki Enterprise is used by major companies around the world and has strong Support for a professional usage of XWiki.
Here are some pointers to get you started with XWiki once you have finished installing it:
The documentation can be found on the XWiki.org web site
If you wish to talk to XWiki users or developers please use our
You can also access XWiki's
If you need commercial support please visit the
Support page

Press 1 to continue, 2 to quit, 3 to redisplay
1

Once you Press 1 to proceed, it will take you to the License Agreement notice.

Press 1 to continue, 2 to quit, 3 to redisplay
1
See the NOTICE file distributed with this work for additional information regarding copyright ownership.
This is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this software; if not, write to the Free
Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF site: http://www.fsf.org.

Press 1 to accept, 2 to reject, 3 to redisplay
1

After accepting the License Agreement, it will take you through various installation stages for setting up the installation folder, auto installer, Desktop shortcuts, user shortcuts etc. I'm proceeding with the default path selected by the installer. If you need, you can set custom paths during this section.

Select the installation path: [/usr/local/XWiki Enterprise 8.1]

Press 1 to continue, 2 to quit, 3 to redisplay
1

[x] Pack 'Core' required
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
[x] Include optional pack 'Default Wiki'
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Enter Y for Yes, N for No:
Y
Done!

Press 1 to continue, 2 to quit, 3 to redisplay
1
[ Starting to unpack ]
[ Processing package: Core (1/2) ]
[ Processing package: Default Wiki (2/2) ]
[ Unpacking finished ]
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Create shortcuts in the Start-Menu
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Enter Y for Yes, N for No:
Y
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Create additional shortcuts on the desktop
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Enter Y for Yes, N for No:
Y
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
create shortcut for: all users
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Enter Y for Yes, N for No:
Y
Aug 7, 2018 10:11:08 AM WARNING: Shortcut 'Go to my wiki' has URL but type ('Application') is not 'Link'
Aug 7, 2018 10:11:08 AM WARNING: Shortcut 'Go to my wiki' has URL but type ('Application') is not 'Link'
Aug 7, 2018 10:11:08 AM WARNING: Shortcut 'Documentation' has URL but type ('Application') is not 'Link'
Aug 7, 2018 10:11:08 AM WARNING: Shortcut 'Documentation' has URL but type ('Application') is not 'Link'
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Generate an automatic installation script
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Enter Y for Yes, N for No:
Y
Select the installation script (path must be absolute)[/usr/local/XWiki Enterprise 8.1/auto-install.xml]

Installation was successful
application installed on /usr/local/XWiki Enterprise 8.1
[ Writing the uninstaller data ... ]
[ Console installation done ]

Once the installation is done, it will display the Application installation folder as shown in our output which is at  /usr/local/XWiki Enterprise 8.1. Now you need to move to the application folder and run the XWiki startup script as below:

# cd /usr/local/XWiki\ Enterprise\ 8.1/
1:/usr/local/XWiki Enterprise 8.1# bash start_xwiki.sh
Starting Jetty on port 8080, please wait...
2018-08-09 09:31:08.832:INFO::main: Logging initialized @692ms
2018-08-09 09:31:09.354:INFO:oejs.Server:main: jetty-9.2.13.v20150730
2018-08-09 09:31:09.378:INFO:oejs.AbstractNCSARequestLog:main: Opened /usr/local/XWiki Enterprise 8.1/data/logs/2018_08_09.request.log
2018-08-09 09:31:09.383:INFO:oejdp.ScanningAppProvider:main: Deployment monitor [file:/usr/local/XWiki%20Enterprise%208.1/jetty/contexts/] at interval 0
2018-08-09 09:31:32,621 [main] INFO o.x.s.s.i.EmbeddedSolrInstance - Starting embedded Solr server... 
2018-08-09 09:31:32,633 [main] INFO o.x.s.s.i.EmbeddedSolrInstance - Using Solr home directory: [data/solr] 
2018-08-09 09:31:38,070 [coreLoadExecutor-6-thread-1] WARN o.a.s.c.SolrCore - [xwiki] Solr index directory '/usr/local/XWiki Enterprise 8.1/data/solr/xwiki/data/index' doesn't exist. Creating new index... 
2018-08-09 09:31:39,756 [main] INFO o.x.s.s.i.EmbeddedSolrInstance - Started embedded Solr server. 
2018-08-09 09:31:41.705:INFO:oejsh.ContextHandler:main: Started [email protected]{/xwiki,file:/usr/local/XWiki%20Enterprise%208.1/webapps/xwiki/,AVAILABLE}{/xwiki}
2018-08-09 09:31:41.802:INFO:oejsh.ContextHandler:main: Started [email protected]{/,file:/usr/local/XWiki%20Enterprise%208.1/webapps/root/,AVAILABLE}{/root}
2018-08-09 09:31:41.862:INFO:oejs.ServerConnector:main: Started [email protected]{HTTP/1.1}{0.0.0.0:8080}
2018-08-09 09:31:41.862:INFO:oejs.Server:main: Started @33722ms
2018-08-09 09:31:41.862:INFO:oxtjl.NotifyListener:main: ----------------------------------
2018-08-09 09:31:41.869:INFO:oxtjl.NotifyListener:main: Server started, you can now open http://ubuntu18.example.com:8080/ in your browser to access your wiki.
2018-08-09 09:31:41.871:INFO:oxtjl.NotifyListener:main: ----------------------------------

The Application will automatically start on port 8080. You need to wait for a few minutes to start the application. And once it's done, you can visit the XWiki via your domain or Server IP on port 8080. Do not close our screen terminal window that shows up. It's needed for our XWiki server to be running. You can stop this XWiki server by terminating this screen terminal.

PS: By default, the application runs on port 8080. But if you’d like to use custom port 8081, make sure there’s nothing already running on port 8081 and start XWiki with the following command:

#bash start_xwiki.sh -p 8081

Step 3: Launch the application

Once XWiki is started, you can point your browser to http://ServerIP or Hostname:8080/ to access the Web interface.

Xwiki home

You can log in to the Admin Panel using the default Admin user (first letter is capitalized) and its default password is admin (lowercase).

Xwiki login

Xwiki Dashboard

Read Also:

Hurray! We have successfully installed and configured our XWiki. I hope this article will help you to set up your own self-hosted Wiki using XWiki. Please post your valuable suggestions and comments on this.

 

Saheetha Shameer 1:39 am

About Saheetha Shameer

Self-motivated and dedicated Linux Administrator having 10 years of working experience on various web-hosting control panels and Unix distributions. I'm a quick learner and have a slight inclination towards following the current and emerging trends in the industry. I'm passionate about testing/reviewing new Linux applications and open source tools.

Author Archive Page

Have anything to say?

Your email address will not be published. Required fields are marked *

All comments are subject to moderation.