Tomcat+mysql+xwiki building an open source wiki system

Source: Internet
Author: User

XWiki is an open source wiki system written in the Java language

XWiki has a variety of versions, standalone version can be downloaded directly after the standalone installation, the default integration of Jetty run, but this way to install XWiki, running slower, in most cases can not meet the needs of enterprises.

There are several ways to implement XWiki on Linux systems:

There are many Serlet container:

Tomcat

GlassFish

JBoss, etc.

The choice of relational databases is also extensive, where Tomcat and MySQL are used

First step: Download the XWiki War pack


Step Two: Install the JDK

The main points of installation jdkde are environment variables

Export Java_home

Jre_home

Export executable program to PATH variable


Step Three: Install Tomcat

1. Set the Catalina_home to test if Tomcat can start normally, then close Tomcat and unzip the XWiki package into the Catalina_home/webapps/xwiki directory

2. Edit the Tomcat configuration file Server.xml, set the encoding format to Utf-8

<connector port= "8080" ... uriencoding= "UTF-8"/>


3. If the X11 related library file is not installed on the Linux system

Activate headless mode: Create a new file named Serenv.sh under Catalina_home/bin

#!/bin/sh
Exportjava_opts="${java_opts}-djava.awt.headless=true "

4. If you want to turn on the gzip compression feature

<connector port= "8080" ... compression= "on" compressionminsize= "2048" compressablemimetype= "text/html,text/ Xml,text/css,text/javascript,application/x-javascript "/>

Fourth step: Install MySQL

1. Install MySQL with Yum first

Edit the MySQL configuration file: [mysqld] Segment Add Default-storage-engine=inonodb, set InnoDB as the default storage engine (because XWiki often need to rollback the transaction)

2. Create a database

mysql> CREATE DATABASE xwiki default character set UTF8 collate utf8_bin

3. Create users and authorizations

Mysql>Grant all privileges on * * to [e-mail protected] identified by ' XWiki '

4. Configure XWiki to use MySQL database

Because XWiki is written in the Java language, Java's MySQL connector is required to use the MySQL database

Mysql-connector-java*.jar downloaded and placed in the Catalina_home/webapps/xwiki/web-inf/lib directory

5. Modify the XWiki configuration file and use the MySQL database to modify the default related options as follows:

<property name="Connection.url">Jdbc:mysql://localhost/xwiki</property>
<property name="Connection.username">XWiki</property>
<property name="Connection.password">XWiki</property>
<property name="Connection.driver_class">Com.mysql.jdbc.Driver</property>
<property name="dialect">Org.hibernate.dialect.MySQL5InnoDBDialect</property>
<property name="Connection.useunicode">true</property>
<property name="Connection.characterencoding">UTF-8</property>


Start Tomcat: Access the native 8080/xwiki, and then perform XWiki initialization

If startup fails, view Tomcat's log file Catalina.out

The error of out of memory error is generally present: The default RAM is not used

Workaround: Add the following in the serenv.sh file:

Catalina_opts= "-xmx1024m-xx:maxpermsize=1000m"

Specific numbers can be set by themselves


At this point, XWiki can run on the system, XWiki is a powerful open-source wiki system, so the most important is the subsequent use of the wiki, how to use good xwiki to achieve the corresponding effect

This article is from the "Zxcvbnm Xuan ye" blog, please be sure to keep this source http://10764546.blog.51cto.com/10754546/1720838

Tomcat+mysql+xwiki building an open source wiki system

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.