Do diffence

Install XWiki on Linux, Tomcat, MySQL 본문

Tech Tips

Install XWiki on Linux, Tomcat, MySQL

고포릿 2006. 11. 8. 01:24

Install on Linux, Tomcat, MySQL
http://www.xwiki.org/xwiki/bin/view/AdminGuide/Linux+Tomcat+MySQL

Instructions

  • Copy xwiki-0-x-yyy.war and rename it to xwiki.war in the
    tomcat/webapps directory (rename before copying if tomcat is already
    running).
  • Create the xwiki database in mysql using the command "create database xwiki" from mysql command line client
  • Grant mysql access with the following command: grant all privileges
    on xwiki.* to xwiki@127.0.0.1 identified by 'xwiki' ; (if you get
    connections problems try localhost instead of the IP address)
  • Download xwiki-db-x.zip and unzip it. Import the mysql dump into
    the 'xwiki' database using "mysql -u xwiki -pxwiki xwiki <
    xwiki-db-x.txt" from command prompt
  • If you decide to use a different password or a different machine
    than the web server machine for you database, edit hibernate.cfg.xml to
    change the database configuration.
  • Launch tomcat once or extract xwiki.war in the xwiki directory
    manually (in JBoss extract manually xwiki.war in a directory named
    xwiki.war)
  • IMPORTANT: Update the xwiki.cfg
    configuration file to add xwiki.store.hibernate.updateschema=1 to make
    sure the database will be upgraded at startup (this variable can be
    then set to 0)
  • IMPORTANT: Edit
    xwiki/WEB-INF/hibernate.cfg.xml and modify your database connection.
    With a local install of xwiki it should be jdbc:mysql://localhost/xwiki
  • If you want to use bigger attachments than 1Mb you need to change the packet size setting in Mysql. See Config Larger Attachments.


Set up to UTF-8


  • xwiki.encoding=UTF-8 in xwiki.cfg
  • change the SetCharacterEncoding filter from ISO-8859-1 to UTF-8 in web.xml
  • change the LANG environment variable before Java is started to en_US.UTF8
  • change the file.encoding param (java -Dfile.encoding=UTF-8) to UTF-8
  • change the mysql encoding to UTF-8 (check it using "show variables")




Testing your install


Troubleshooting


  • Common issues can be jar conflicts between the XWiki application and the Tomcat engine:
  • Sometimes it might be necessary to copy your database driver to the
    tomcat/common/lib directory from the xwiki/WEB-INF/lib directory (e.g.
    mysql-connector-java-#.#.#-stable-bin.jar ) as well as the
    commons-pool-1.1.jar and commons-dbcp-1.2.1.jar
  • Sometimes you might need to copy jta.jar to the subdirectory tomcat/common/lib from the xwiki/WEB-INF/lib directory