Installing xwiki on Ubuntu

I had many problems installing xwiki on Ubuntu 14.04LTS. Also know that xwiki is quite hungry on the memory side, running on 2GB is really recommended.

Use Oracle Java (not OpenJDK):

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
sudo dpkg-reconfigure tzdata
sudo fallocate -l 1G /swapfile && sudo chmod 600 /swapfile && sudo mkswap /swapfile && sudo swapon /swapfile
sudo nano /etc/fstab:
/swapfile   none    swap    sw    0   0

Install xwiki (using LTS & MySql)

wget -q "" -O- | sudo apt-key add -
sudo wget "" -P /etc/apt/sources.list.d/

Other versions are: all released versions including milestones and release candidates (beta) all released versions excluding milestones and release candidates (stable)

apt-get update
sudo apt-get install xwiki-enterprise-tomcat7-mysql

You will get this error:
Setting up xwiki-enterprise-tomcat7-common (7.4.4) …
* no JDK or JRE found – please set JAVA_HOME

Fix it by editing the JAVA_HOME and also increase the memory allocated:

nano /etc/default/tomcat7
JAVA_OPTS="-Djava.awt.headless=true -Xmx512m -XX:MaxPermSize=192m -XX:+UseConcMarkSweepGC"
service tomcat7 restart

Configure xwiki

nano /etc/xwiki/xwiki.cfg
### file storage = file = file = file

You should see the “Distribution Wizard” just follow the steps! I installed the “XWiki Enterprise Flavor – Main Wiki”. You can now login with the user “Admin” and password “admin” (change this as soon as possible).

Here’s another way to install xwiki using OpenJDK:
Installed Ubuntu Server 16.04.1

wget -q "" -O- | sudo apt-key add -
sudo wget "" -P
sudo apt-get update
sudo apt-get install default-jdk // I prefer using oracle, had problem with openjdk (performance)
sudo apt-get install tomcat8
sudo service tomcat8 restart
sudo apt install xwiki-enterprise-tomcat8-mysql
sudo reboot



08 2012

Your Comment