Xwiki installation and deployment details, xwiki deployment details

Source: Internet
Author: User

Xwiki installation and deployment details, xwiki deployment details

I. Introduction to Xwiki
XWiki is an open-source wiki and application platform developed by Java based on the LGPL protocol. XWiki is a java-based wiki that runs on Servlet containers such as Tomcat, Jetty, JBoss, WebLogic, and WebSphere and uses relational databases (such as HSQL and MySQL) to store data. Most database products can run on XWiki but must be correctly set.
Chinese site: http://www.xwikichina.com/xwiki/bin/view/Main/
Ii. Xwiki Installation
1. Software Download
Http://download.forge.ow2.org/xwiki/xwiki-10.1.war
Three installation methods: war package installation
Install XWiki with a packaged version that includes the Servlet container (Jetty) and database (HSQL) with the default wiki homepage. If you are a newbie and want to quickly try the XWiki function, we recommend that you use this method for installation.
Use the war package to install XWiki, but you must set up your Servlet container and database to make XWiki work.
Use the deb package to install the latest version of XWiki and related plug-ins.
2. Installation Requirements
Jdk1.8
Mysql-connector-java-5.1.34.jar
Tapache-tomcat-8.5.29.tar.gz
Mysql
Xwiki-10.1.war
3. install apache and xwiki
(8.5.29): http://mirror.bit.edu.cn/apache/tomcat/tomcat-8/v8.5.29/bin/apache-tomcat-8.5.29.tar.gz
Decompression: tar-xzvf apache-tomcat-8.5.29.tar.gz
Installation: mv apache-tomcat-8.5.29/usr/local/apache
Cd/usr/local/apache/webapps
Mkidr xwiki
Unzip xwiki-10.1.war-d/usr/local/apache/webapps/xwiki/
Configuration: Edit tomcat server. xml modify port 8080 description to UTF8 and allow gzip Compression
<Connector port = "8080" protocol = "HTTP/1.1"
ConnectionTimeout = "20000"
RedirectPort = "8443"
URIEncoding = "UTF-8"
Compression = "on"
CompressionMinSize = "2048"
CompressableMimeType = "text/html, text/xml, text/css, text/javascript, application/x-javascript"/>
Configure the JVM memory size and installation path
If tomcat is installed through yum, You need to modify the file/etc/tomcat6/tomcat6.conf.
If the tomcat source package is used for installation, modify the bin/catalina. sh file.
JAVA_OPTS = "-Xmx300m-XX: MaxPermSize = 196 m"
JAVA_HOME = "/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.20-3.b26.el6.x86_64"
Configure the database, create an xwiki database, and authorize
Create database xwiki default character set utf8 collate utf8_bin;
Grant all privileges on xwiki. * to xwiki @ '%' identified by 'xwiki ';
Download the MySQL JDBC Driver Jar to the/usr/local/apache/webapps/xwiki/WEB-INF/lib/directory.
Wget http://repo1.maven.org/maven2/mysql/mysql-connector-java/5.1.34/mysql-connector-java-5.1.34.jar
Cp-rp mysql-connector-java-5.1.34.jar/usr/local/apache/webapps/xwiki/WEB-INF/lib/
Configure xwiki applications

Cd/usr/local/apache/webapps/xwiki/WEB-INF
Vi hibernate. cfg. xml (comment out useless data source configurations)
<Property name = "connection. url"> jdbc: mysql: // localhost/xwiki? UseSSL = 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. MySQL5InnoDBDialect </property>
<Property name = "connection. charSet"> UTF-8 </property>
<Property name = "connection. characterEncoding"> UTF-8 </property>
<Property name = "connection. useUnicode"> true </property>
<Property name = "dbcp. poolPreparedStatements"> true </property>
<Property name = "dbcp. maxOpenPreparedStatements"> 20 </property>
<Mapping resource = "xwiki. hbm. xml"/>
<Mapping resource = "feeds. hbm. xml"/>
<Mapping resource = "activitystream. hbm. xml"/>
<Mapping resource = "instance. hbm. xml"/>
<Mapping resource = "mailsender. hbm. xml"/>

Edit xwiki. cfg
Vi xwiki. cfg
Xwiki. readonly = no
Xwiki. encoding = UTF-8
Xwiki. store. main. hint = hibernate
Xwiki. store. hibernate. path =/WEB-INF/hibernate. cfg. xml
Xwiki. superadminpassword = system
Configure office server
Yum install libreoffice-headless
XWIKI character set encoding Configuration
Vi web. xml

Encoding = "UTF-8"
4. xwiki Initialization

Start tomcat with./usr/local/apache/bin/startup. sh and perform xwiki initialization through http: // ipaddr: 8080/xwiki.

Set Chinese


Iii. Xwiki Management


Iv. Appendix

1. Installation Error 01

Error message: View tomcat startup logs/usr/local/apache_bak/logs/catalina.2018-03-25.log,/usr/local/apache_bak/logs/catalina. out

Mar 25, 2018 9:44:05 AM org.apache.catalina.loader.WebappClassLoaderBase validateJarFileINFO: validateJarFile(/usr/local/apache/webapps/xwiki/WEB-INF/lib/javax.el-3.0.0.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/el/Expression.classMar 25, 2018 9:44:22 AM org.apache.catalina.startup.TldConfig executeINFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.

Solution:

Based on the error message, check the tld for the Tomcat 7 or above startup. Enable the debug mode to check which jar packages are required, and skip the processing.

Enable tld check for jar log records vi/usr/local/apache/conf/logging. properties org. apache. jasper. servlet. tld.pdf. level = FINE, disable tomcat, start and check catalina. outegrep "No TLD files were found in" catalina. out | egrep "jar" | awk-F' [''{print $3} '| awk-F']'' {print $1}' | awk-f'lib /''{print $2} '> a.txt sets the jar package to skip the check and process vi/usr/local/apache/conf/catalina. "tomcat. util. scan. standardJarScanFilter. jarsToSkip = ", save the file

2. installation error message 02

After the preceding error message is processed, it is found that xwiki (404 error) cannot be accessed after tomcat is started. You can only enable the debug mode of xwiki to view the specific error information.

Set the debug log mode:

Cd/usr/local/apache/webapps/xwiki/WEB-INF/classestouch logging. properties ## Add the following content: handlers = org. apache. juli. fileHandler, java. util. logging. consoleHandler ####################################### ###################### Handler specific properties. # Describes specific configuration info for Handlers. ######################################## #################### org. apache. juli. fileHandler. level = FINE org. apache. juli. fileHandler. directory =/usr/local/apache/logs org. apache. juli. fileHandler. prefix = error-debug. java. util. logging. consoleHandler. level = FINE java. util. logging. consoleHandler. formatter = java. util. logging. simpleFormatter

Restart tomcat to view error logs.

The error message is as follows:

Unsupported major. minor version 52.0

Solution:

According to the error message, we can basically confirm that it is caused by the jdk version. Check that Jdk 1.8 is required. Download the jdk of a later version and restart it to solve the problem.

Wget http://download.oracle.com/otn-pub/java/jdk/8u161-b12/2f38c3b165be4555a1fa6e98c45e0808/jdk-8u161-linux-x64.rpm"

Rpm-ivh jdk-8u161-linux-x64.rpm

 

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.