1 - i stopped tomcat 9
2 - i downloaded the war from https://www.xwiki.org/xwiki/bin/view/Download/
3 - I unzipped the war and customized the following files in the expanded directory
web.xml
<env-entry>
<env-entry-name>XWikiConfig</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>/WEB-INF/xwiki.cfg</env-entry-value>
</env-entry>
hibernate.cfg.xml
<property name="connection.url">jdbc:hsqldb:file:${environment.permanentDirectory}/database/xwiki_db;shutdown=true</property>
<property name="connection.username">sa</property>
<property name="connection.password"></property>
<property name="connection.driver_class">org.hsqldb.jdbcDriver</property>
<property name="dialect">org.hibernate.dialect.HSQLDialect</property>
<property name="hibernate.connection.charSet">UTF-8</property>
<property name="hibernate.connection.useUnicode">true</property>
<property name="hibernate.connection.characterEncoding">utf8</property>
<mapping resource="xwiki.hbm.xml"/>
<mapping resource="feeds.hbm.xml"/>
<mapping resource="instance.hbm.xml"/>
<mapping resource="notification-filter-preferences.hbm.xml"/>
<mapping resource="mailsender.hbm.xml"/>
4 - I put the db drivers (hsqldb.jar) in the directory /u02/apache-tomcat-9.0.4/webapps/xwiki/WEB-INF/lib
[root@xxxxs lib]# ls -la hsql*
-rwxrwxrwx 1 tomcat tomcat 1543134 May 16 2018 hsqldb.jar
[root@xxxx lib]# pwd
/u02/apache-tomcat-9.0.4/webapps/xwiki/WEB-INF/lib
5 - I restarted the tomcat and followed the distribution wizard procedure.