Mittwoch, 2. März 2011

Setting up XWiki on Opensuse with mysql and tomcat

Hi girls and guys,

After spending hours with my setup of XWiki on Opensuse 11.3 i finally managed to fulfill this task.
Since it is pretty easy to install but has a lot of edges to deal with, i will detailed instruct you how to get this wiki up and running.

I only describe how to do this on opensuse. If you are looking for Debian just go ahead reading here

(1) First install these packages using zypper:

zypper ref && zypper in mysql-community-server mysql-community-server-client tomcat6, tomcat6-el-1_0-api tomcat6-jsp-2_1-api tomcat6-lib tomcat6-servlet-2_5-api
jakarta-commons-collections-tomcat5 mysql-connector-java java-1_6_0-su

(2) Now copy your XWiki-enterprise-web-A.x.n.war to /srv/tomcat/xwiki.war and start the tomcat6 Server by issuing the following:

service tomcat6 start

(3) After waiting a couple of seconds this command unpacks your war archive and you should end up having a directory xwiki under /srv/tomcat/

Stop the tomcat Server by doing a

service tomcat6 stop

(4) We need to do some changes to the particular init scripts. First edit the /etc/init.d/tomcat6 Script and put


under the line with

and save the file. Next is the /etc/init.d/mysql. Find the line in the case constructor that says

echo -n "Starting service MySQL "

and add the following option line
--max_allowed_packet=32M \

!!!The \ in the end of the line is important here!!!

(6) Next create the database for your xwiki and grant the permissions by executing the follwoing

service mysql start && mysql_secure_installation
(this will finalize the installation of mysql for opensuse)
mysql -u root -p -e "create database xwiki"
(this will create the database xwiki)
mysql -u root -p -e "grant all privileges on xwiki.* to xwiki@ identified by 'xwiki'"
(this will grant the permissions to Xwiki)

(7) Copy the mysql connector library from /usr/share/java/mysql-connector-java-5.1.6.jar to
/srv/tomcat6/webapps/xwiki/WEB-INF/lib/. A Symbolic link may also work. But i didn't try this out.

(8) You must now edit the /srv/tomcat/webapps/xwiki/WEB-INF/hibernate.cfg.xml file. And
comment out other database configurations you don't need. Especially the one hsqldb which is the line that is not comment out by default. Instead uncomment out the mysql section.

(9) Now you can restart the servers by issuing the following commands:
service mysql restart && service tomcat6 start

(10) You should add the servicedaemons permanently to avoid starting them manually each time.
chkconfig -a mysql && chkconfig -a tomcat6

The wiki should live on localhost:8080/xwiki. All you have to do now is to apply the xwiki-enterprise-wiki.A.x.n.xar file. But this should be no problem if you followed these steps.

You can get the latest XWiki and further Instructions here:

Keine Kommentare:

Kommentar veröffentlichen

Hinweis: Nur ein Mitglied dieses Blogs kann Kommentare posten.