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 "http://maven.xwiki.org/public.gpg" -O- | sudo apt-key add - sudo wget "http://maven.xwiki.org/lts/xwiki-lts.list" -P /etc/apt/sources.list.d/ |
Other versions are:
http://maven.xwiki.org/releases/xwiki-releases.list: all released versions including milestones and release candidates (beta)
http://maven.xwiki.org/stable/xwiki-stable.list: 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_HOME=/usr/lib/jvm/java-8-oracle JAVA_OPTS="-Djava.awt.headless=true -Xmx512m -XX:MaxPermSize=192m -XX:+UseConcMarkSweepGC" service tomcat7 restart |
Configure xwiki
nano /etc/xwiki/xwiki.cfg xwiki.authentication.validationKey=AKEY xwiki.authentication.encryptionKey=ANOTHERKEY ### file storage xwiki.store.attachment.hint = file xwiki.store.attachment.versioning.hint = file xwiki.store.attachment.recyclebin.hint = file |
http://yourIPorDNS:8080/xwiki/
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 "http://maven.xwiki.org/public.gpg" -O- | sudo apt-key add - sudo wget "http://maven.xwiki.org/lts/xwiki-lts.list" -P /etc/apt/sources.list.d/ 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 |
Enjoy!