Step by step minimum installation of XEM based on MySQL
Prerequisites
This tutorial is meant to help you install XWiki XEM on a Linux machine. However, if you want to install XWiki XEM on a Windows environment, the same steps will apply.
Java
- Download and install Java 1.5 or more from the Java website : http://www.java.com
- After installing Java use the following command provided your JVM was successfully installed. You should get something similar to:
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode)
Mysql
- Download and install Mysql from the Mysql website: http://dev.mysql.com/downloads/
- After installing MySQL use the following command to check if the MySQL server is properly started and listening for connections. You should get something similar to:
tcp 0 0 localhost:mysql *:* LISTEN 2798/mysqld
- If the server is not running correctly, you can type the following command to start it:
Download XEM packages
From the download page, get:
- Starting XEM 3.3:
- the last XEM distribution package preconfigured (xwiki-manager-jetty-mysql-<version>.zip).
- the last XEM application xar package (xwiki-manager-ui-all-<version>.xar).
- Before XEM 3.3:
- the last XEM distribution package preconfigured (xwiki-enterprise-manager-mysql-<version>.zip).
- the last XEM application xar package (xwiki-enterprise-manager-wiki-administrator-<version>.xar).
Mysql configuration
Follow the XWiki Platform mysql installation (InstallationMySQL) except for privileges settings. To be able to create new wikis the MySQL user will need to have all rights on database. You can use any username you want, but make sure you update your hibernate configuration accordingly. The following example uses the username called xwiki:
The above command will automatically create the xwiki user in the MySQL database.
XEM web application installation
The XEM web application contains the XWiki Enterprise web application and the XEM plugins which are Application Manager and Wiki Manager. To install it you just need to unpack xwiki-enterprise-manager-mysql-<version>.zip anywhere you want.
In the created directoy containing the unpacked zip file you will find :
- start_xwiki.sh (start_xwiki.bat for Windows system) which starts the Jetty server containing the XWiki Platform
- stop_xwiki.sh (stop_xwiki.bat for Windows system) which stops the Jetty server containing the XWiki Platform
- webapps/xwiki directory which contains the XEM web application. You will mostly access:
- webapps/xwiki/WEB-INF/hibernate.cfg.xml which contains database communication hibernate parameters
- webapps/xwiki/WEB-INF/xwiki.cfg which contains xwiki configuration parameters
XEM application xar importation
We are now installing XEM application on XWiki Platform.
Run XEM using start_xwiki.sh (start_xwiki.bat for Windows system) and import:
- Before 3.3 xwiki-enterprise-manager-wiki-administrator-<version>.xar (see the complete list of version on the maven releases for xwiki-enterprise-manager-wiki-administrator)
- After 3.4 xwiki-manager-ui-all-<version>.xar (see the complete list of version on the maven releases for xwiki-manager-ui-all)
See ImportExport to see how you may import a xar package in the XWiki Platform.
The imported package contains the default users rights configuration, so to edit your wiki or to access the administration interface you will need to log in with the "Admin" user and the "admin" password.
Configure the main wiki descriptor
By default a subwiki is accessed based on XEM's host. See "The domain name based wiki access" for more details.
There are two ways to access the main wiki and configure the main wiki descriptor if needed:
- the cleaner way: access the main wiki with the ip if you can or with a host starting with "www" (like www.xwiki.org) or "xwiki" and add the right hosts to the main wiki's descriptor
- set xwiki.virtual=false in xwiki.cfg and reput it to true when you have correctly configured the main wiki descriptor
[OPTIONAL] Create default XE wiki template
Go to http://localhost:8080/xwiki/bin/view/XemManager/Install and confirm. This will create a wiki called "templatexe" containing an XWiki Enterprise wiki and list this wiki as a template from which it's possible to create another wiki.