XWiki
Jump to navigation
Jump to search
XWiki is an open-source enterprise-ready wiki written in Java, with a focus on extensibility.
Installation
Feel free to follow along on the XWiki Installation Guide. These instructions assume you will be using Tomcat and PostgreSQL. It should not be too difficult to apply these guidelines to other combinations.
- Install PostgreSQL.
- For easier PostgreSQL administration, install phpPgAdmin.
- Install Tomcat 7. (Do not forget tomcat-native.)
- Download the XWiki WAR file.
- Rename the WAR file to
xwiki. - Move the WAR file into the
/var/lib/tomcat7/webappsdirectory. - Tomcat should automatically extract the WAR file. If not, restart Tomcat.
- At this point, you may find that a
datadirectory has appeared in/var/lib/tomcat7/webapps. Delete it. - As root:
# cd /var/lib/tomcat7 # mkdir data # chown tomcat:tomcat data
- Inside the
/var/lib/tomcat7/webapps/xwiki/WEB-INFdirectory:- Open the
xwiki.cfgfile and alter thexwiki.work.dirfield to read/var/lib/tomcat7/data/xwiki. - Open the
xwiki.propertiesfile and alter thecontainer.persistentDirectoryfield to read/var/lib/tomcat7/data/xwiki. - Open the
hibernate.cfg.xmlfile and:- Comment-out the section entitled "Configuration for the default database".
- Uncomment the section entitled "PostgreSQL Configuration".
- Modify the database name (in
connection.url), username, and password as desired.
- Open the
- Create a role and database in PostgreSQL to match the hibernate configuration.
- Install postgresql-jdbcAUR from the Arch User Repository.
- As root:
# cd /usr/share/java/tomcat7 # ln -s /usr/share/java/postgresql-jdbc/postgresql-jdbc4.jar
- Restart Tomcat.
- Launch the XWiki application by clicking on
/xwikiin Tomcat Manager. - Download the XAR file for XWiki and upload it to populate the empty Wiki.
Nginx proxy configuration
I found that instructing nginx to proxy to http://localhost:8080/xwiki/ did not work: the generated URLs were incorrect. Contrary to what is indicated in the XWiki documentation, I could not make the URLs correct through the use of HTTP headers.
The only solution I'm aware of so far is to create a new Host element in Tomcat's server.xml file:
- Duplicate the existing
Hostelement and alter thenameattribute to readxwiki. - Alter the
appBaseattribute to read/var/lib/tomcat7/webapps-xwiki. - Move the
xwikiapplication from/var/lib/tomcat7/webapps/xwikito/var/lib/tomcat7/webapps-xwiki/ROOT. - Restart Tomcat
- Add
xwikias an alias to localhost in/etc/hosts(add it to the end of the 127.0.0.1 line). - Instruct Nginx to proxy to
http://xwiki:8080/instead.