XWiki is an open-source content management framework written and based on Java. It allows anyone to build enterprise-class websites for any purpose. XWiki CMS system offers a platform for developing projects and collaborative applications using the wiki paradigm. Some of the features include WYSIWYG editing, OpenDocument-based document import/export, tagging, strong rights management, and more. Whether you’re creating a personal or business website, XWiki CMS can help you create and manage your content on every device with its intuitive and powerful admin dashboard… XWiki is a Java-based CMS, so you must have Java installed to use it. To install Java JDK 8, follow the steps below:
Add A Third-Party PPA to Ubuntu
The easiest way to install Oracle Java JDK 8 on Ubuntu is via a third-party PPA. To add that PPA, run the commands below After running the commands above, you should see a prompt to accept the PPA key onto Ubuntu. accept and continue Continue below to install Java 8.
Download Oracle Java 8 Installer
Now that the PPA repository has been added to Ubuntu, run the commands below to download Oracle Java 8 installer. the installer should install the latest Java JDK 8 on your Ubuntu machines. When you run the commands above you’ll be prompted to access the license terms of the software. accept and continue.
Configure Oracle JDK8 as Default
Set Oracle JDK8 as default, to do that, install the oracle-java8-set-default package. This will automatically set the JAVA env variable. The command above will automatically set Java 8 as the default. and that should complete your installation, you can check your java version by running the following command.
Download Tomcat Packages
XWiki also requires a Tomcat webserver. the steps below show you how to download and install the Tomcat web server on Ubuntu. Run the commands below to download Tomcat version 9. Next, run the commands below to extract the downloaded packages. Create a directory for Tomcat files. and move the files there by running the commands below. Create Tomcat users by running the commands below. this user will own the Tomcat directory content. Then give the user control of the directory.
Configure Tomcat9 Service
Now that the package is extracted, run the commands to open the Tomcat configuration file for its default user Then create an account with a password for the user and save by copying and pasting the line below into the file. just before the Save the file and exit. Next, run the commands below to create a server account for Tomcat then copy and paste the lines below into the file and save Save and exit.
Install MariaDB Database Server
XWiki also requires a database server. and MariaDB database server is a great place to start. To install it run the commands below. After installing MariaDB, the commands below can be used to stop, start and enable the MariaDB service to always start up when the server boots. Run these on Ubuntu 16.04 LTS Run these on Ubuntu 17.10 and 18.04 LTS After that, run the commands below to secure the MariaDB server by creating a root password and disallowing remote root access. When prompted, answer the questions below by following the guide.
Enter current password for root (enter for none): Just press the Enter Set root password? [Y/n]: Y New password: Enter password Re-enter new password: Repeat password Remove anonymous users? [Y/n]: Y Disallow root login remotely? [Y/n]: Y Remove test database and access to it? [Y/n]: Y Reload privilege tables now? [Y/n]: Y
Restart MariaDB server Next, run the commands below to logon into the database server. When prompted for a password, type the root password you created above. Then create a database called XWiki Create a database user called xwikiuser with a new password Then grant the user full access to the database. Finally, save your changes and exit.
Download and Install XWiki
Now that Java is installed, run the commands below to download XWiki content, then extract it to the /opt directory. Move the content to the /opt directory and install. Then run the commands below to give the tomcat user permission to that file. Restart the Tomcat server by running the commands below. After this, you should be able to access the site content by going to the server hostname or IP address followed by port 8080. ex. http://localhost:8080/xwiki This should bring up the XWiki wizard. If you get error 500, you should run the commands below to the commands: Then make the highlighted changes to the file and save. Restart Tomcat and try again. Continue to the next page and validate that all requirements are met. then go and enter the database info you created above. After entering the database info, continue with the defaults until you’ve successfully set up XWiki.