Linux + Tomcat + XWiki + MySQL installation and configuration, old version, for reference only.
Jdk1.5
Install jdk1.5, omitted
XWiki uses the default Jetty + hsqldb
Decompress xwi1_1.1-milestone-1.tar.gz to/usr/wiki/xwiki/
Mkdir/usr/wiki
Mkdir/usr/wiki/xwiki
Cd/usr/wiki/xwiki/
Download or copy xwi1_1.1-milestone-1.tar.gz to/usr/wiki/xwiki/
Tar-zxf xwiki-1.1-milestone-1.tar.gz
Ln-s./xwiki-1.1-milestone-1 default
Test:
Default/start_xwiki.sh
Http: /localhost: 8080/xwiki/bin/view/Main/WebHome
You can see the XWiki homepage.
Chinese support
Modify the configuration file xwiki. cfg
Cd default/webapps/xwiki/WEB-INF/
Vi xwiki. cfg
Modify
xwiki.encoding=UTF-8
Vi web. xml
Modify
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
Add upload temporary directory
Added in xwiki. cfg
xwiki.upload.tempdir=/tmp
Tomcat installation
Assume that the Tomcat directory is in/usr/tomcat/default, modify/usr/tomcat/default/conf/server. xml:
Add on:
<Context docBase="/usr/wiki/xwiki/default/webapps/xwiki" path="/xwiki" reloadable="true"/>
Install MySQL
groupadd mysql
useradd -g mysql mysql
tar -zxf mysql-VERSION.tar.gz
cd mysql-VERSION
./configure --with-charset=utf8 --prefix=/usr/local/mysql
make
make install
cp support-files/my-medium.cnf /etc/my.cnf
cd /usr/local/mysql
bin/mysql_install_db --user=mysql
chown -R root .
chown -R mysql var
chgrp -R mysql .
Start Database
Bin/mysqld_safe user = mysql &
Change Password. yourpassword is your new password.
Mysqladmin-u root password yourpassword
Set as a service:
Cp support-files/mysql. server/etc/init. d/mysql. server chkconfig -- add mysql. in this way, you can use service mysql. server start starts Database service mysql. server stop shut down Database
Change Package Size:
The default value is 1 MB. errors may occur when the size of files imported by WiKi exceeds 1 MB.
Vi/etc/my. cnf
Change max_allowed_packet = 1 M to max_allowed_packet = 32 M.
Create an XWiki database:
mysql -u root -p
create database xwiki;
grant all privileges on xwiki.* to xwiki@127.0.0.1 identified by 'xwiki';
Add hibernate. cfg. mysql. xml
Cp hibernate. cfg. xml hibernate. cfg. mysql. xml
Vi hibernate. cfg. mysql. xml
MySQL-related content:
<!-- Default MySQL configuration
Comment it to use for HSQLDB or Oracle -->
<property name="connection.url">jdbc:mysql://localhost/xwiki?useServerPrepStmts=false</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.MySQLDialect</property>
<property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvider</property>
<property name="connection.pool_size">2</property>
<property name="statement_cache.size">2</property>
Modify the configuration file xwiki. cfg
Cd default/webapps/xwiki/WEB-INF/
Vi xwiki. cfg
Modify
Xwiki. store. hibernate. path =/WEB-INF/hibernate. cfg. hsql. xml
Is
Xwiki. store. hibernate. path =/WEB-INF/hibernate. cfg. mysql. xml
XWiki details: click here
XWiki: click here