Thursday, August 21, 2025

Installation and Configuration XWiki

This document describes the steps to install and configure XWiki as a knowledge base site. The production information can be found in https://www.xwiki.org/.

Application Server


• Unzip Tomcat 9
• Set up Tomcat 9 environment
○ SET JAVA_HOME=%ROOT%/jdk-21.0.2
○ SET CATALINA_HOME=%ROOT%/apache-tomcat-9.0.108
○ SET CATALINA_BASE=%CATALINA_HOME%
○ SET PATH=%PATH%;%JAVA_HOME%/bin;%CATALINA_HOME%/bin

Database


• For set up PostgresSQL, refer to Set up PostgresSQL database
• Start PostgresSQL: pg_ctl start
• Log in DB with postgres: psql -h localhost -U postgres
• Create Xwiki database: for v17, use LOCALE_PROVIDER = 'builtin' and LOCALE = 'C.UTF-8'
CREATE DATABASE xwiki
WITH OWNER = postgres
ENCODING = 'UNICODE'
LOCALE_PROVIDER = 'icu'
LOCALE = 'en_US.UTF-8'
TABLESPACE = pg_default
TEMPLATE = template0;
• Connect to DB and create a user and grant all permissions
\CONNECT xwiki;
CREATE USER xwiki PASSWORD '<password>' VALID UNTIL 'infinity';
GRANT ALL PRIVILEGES ON DATABASE xwiki TO xwiki;
ALTER DATABASE xwiki OWNER TO xwiki;
• Visit Download | pgJDBC to download JDBC library: postgresql-*.jar

Application Configuration

Download XWiki 16.10.10 - for production, download WAR Package for Servlet Container
• Unzip the .war file content into %CATALINA_HOME%\webapps\xwiki
• Review %CATALINA_HOME%\webapps\xwiki\WEB-INF\hibernate.cfg.xml with the DB connection URL mentioned in the DB installation above and update if needed
• Review %CATALINA_HOME%\webapps\xwiki\WEB-INF\xwiki.properties for the permanent directory set up mentioned in the Tomcat installation above and update if needed
• Copy the download postgrsql-*.jar into %CATALINA_HOME%\webapps\xwiki\WEB-INF\lib

Application Initialization

• Start Tomcat: catalina start
• Visit http://localhost:8080/xwiki/bin/view/Main/ first time to complete the application initialization

Troubleshooting

• Check Tomcat log files in %CATALINA_HOME%\logs
• Enable Tomcat admin user by add/uncomment the following in %CATALINA_HOME%\conf\tomcat-users.xml
  <role rolename="manager-gui"/>
          <user username="admin" password="<password>" roles="manager-gui"/>

References

No comments:

Post a Comment