Instructions and precautions for installing Python in CentOS
1. application background description
In normal O & M work, it is very important to organize documents for routine work. Whether it is normal work processing or work handover, real-time maintenance of documents and materials can improve work efficiency. If you use traditional TXT documents or Word documents to record the files, it is not convenient to modify them. Using online WIKI allows you to view or modify the documents in real time.
The Wiki system does a good job in Confluence, but Confluence needs to buy a License to use it. There are also cracked versions on the Internet. Compared with multiple open-source WIKI systems, we chose XWIKI as our WIKI system because it provides similar functions as Confluence and does not need to learn any syntax format, you can directly edit the WIKI page online just like editing the Word.
XWIKI has the following notable features:
1) multi-language support, including English, Chinese, Korean, and Japanese
2) attachments can be uploaded.
3) supports LDAP authentication and logon.
4) You can directly import the Office documents to the WIKI page, or export the WIKI pages to Office documents or PDF documents.
5) You do not need to learn any WIKI syntax format and directly use the WYSIWYG editor to edit the WIKI page.
6) has the version control management function, and can be rolled back to the previous version
7) user-friendly, rich functions, built-in search engines, and intra-site search.
8) user and group permission management, space and page permission management
9) email notification function
10) supports multiple WIKI syntax formats, such as Confluence, Markdown, Jspwiki, meidawiki, and twiki.
2. Install XWIKI
Currently, the latest version of XWIKI is 6.3, which can be installed separately or in conjunction with other WEB containers such as tomcat. Here we use tomcat as a container to install XWIKI
The installation methods for each version are similar.
This document uses CentOS6 Operating Systems
1) install Java and Tomcat
Yum-y installjava-1.7.0-openjdk
Install the Chinese font library
Yum install autocorr-zh.noarch libreoffice-langpack-zh-Hans.x86_64 libreoffice-langpack-zh-Hant.x86_64
Wgethttp: // response
Wgethttp: // download.forge.ow2.org/xwiki/xwi?enterprise-web-6.3.war
2) Go to the tomcat installation directory, depending on your tomcat installation directory.
Cd/data/app_platform/xwiki_tomcat/webapps/
Mkdir xwiki
Put the xwiki-enterprise-web-6.3.war under the xwiki directory
Cd/data/app_platform/xwiki_tomcat/webapps/xwiki/
Unzip xwiki-enterprise-web-6.3.war
3) EDIT tomcat server. xml and modify port 8080 description to UTF8, and allow gzip compression.
<Connectorport="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"/>
4) 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_HOME="/usr/lib/jvm/java-1.7.0-openjdk.x86_64/"
JAVA_OPTS="-Xmx300m-XX:MaxPermSize=196m"
5) Configure Nginx forwarding
By default, XWIKI uses http: // xxxx: 8080/xwiki/
You can configure Nginx forwarding.
server{
listen80;
server_namexwiki.xxx.xxx;
root/data/app_platform/xwiki_tomcat/webapps/xwiki/;
location/{
rewrite^$scheme://$server_name/xwiki$request_uri?permanent;
}
location^~/xwiki{
#Ifpathstartswith/xwiki-thenredirecttobackend:XWikiapplicationinTomcat
proxy_passhttp://localhost:8080/xwiki;
}
}
6) configure the MySQL database
MySQL 5.0 or above is recommended. Do not use the MyISAM storage engine. Because MyISAM does not support transaction processing, InnoDB Storage engine is recommended.
Create an XWIKI Database
Create database xwiki default character set utf8 collate utf8_bin;
Grant corresponding Permissions
Grant all privileges on xwiki. * to xwiki identified by 'xwiki ,./';
Flush privileges;
Download MySQL JDBC Driver Jar to/data/app_platform/xwiki_tomcat/webapps/xwiki/WEB-INF/lib directory
Wgethttp: // response
Edit/data/app_platform/xwiki_tomcat/webapps/xwiki/WEB-INF/hibernate. cfg. xml
Comment out the default one, and then remove the comment from the MySQL section.
<!--MySQLconfiguration.
UncommentifyouwanttouseMySQLandcommentoutotherdatabaseconfigurations.
-->
<propertyname="connection.url">jdbc:mysql://localhost/xwiki</property>
<propertyname="connection.username">xwiki</property>
<propertyname="connection.password">xwiki</property>
<propertyname="connection.driver_class">com.mysql.jdbc.Driver</property>
<propertyname="dialect">org.hibernate.dialect.MySQL5InnoDBDialect</property>
<propertyname="dbcp.ps.maxActive">20</property>
<mappingresource="xwiki.hbm.xml"/>
<mappingresource="feeds.hbm.xml"/>
<mappingresource="activitystream.hbm.xml"/>
<mappingresource="instance.hbm.xml"/>
7) configure the Office Server
Yum install libreoffice-headless
Edit xwiki. properties
openoffice.autoStart=true
openoffice.homePath=/usr/lib64/libreoffice/
8) XWIKI character set encoding Configuration
/Data/app_platform/xwiki_tomcat/webapps/xwiki/WEB-INF/web. xml
<filter>
<filter-name>SetCharacterEncoding</filter-name>
<filter-class>org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter</filter-class>
<!--Theencodingtouse.Thismustbethesameastheoneinxwiki.cfg(hopefullyonlyone
encodingwillbeusedlater).-->
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
<!--Whethertoignoreandoverridetheencodingspecifiedbytheclient,whenthisactually
happens.Forexample,AJAXrequestsmadethroughXmlHttpRequestsspecifyUTF-8.Whenthis
issettofalse,thecustomencodingisusedonlywhentherewasn'tanyencodingspecified
bytheclient.-->
<init-param>
<param-name>ignore</param-name>
<param-value>false</param-value>
</init-param>
</filter>
/Data/app_platform/xwiki_tomcat/webapps/xwiki/WEB-INF/xwiki. cfg
#-#Theencodingtousewhentransforminstringstoandfrombytearrays.Thiscausesthejvmencodingtobeignored,
#-#sincewewanttobeindependendoftheunderlyingsystem.
xwiki.encoding=UTF-8
Add in hibernate. cfg. xml
<propertyname="connection.useUnicode">true</property>
<propertyname="connection.characterEncoding">UTF-8</property>
MySQL configuration file my. cnf
[client]
default-character-set=utf8
[mysqld]
default-character-set=utf8
character-set-server=utf8
collation-server=utf8_bin
9) Manage attachments
By default, XWIKI uses a database to store attachments. the maximum size of uploaded attachments is about 30 mb, And the MySQL configuration file my. in cnf, you must set max_allowed_packet to about three times the maximum value, because the storage History version also consumes space.
You can use file system storage to upload larger attachments. XWIKI uses a temporary directory to store images or attachments that are pulled from the database.
The storage directory of the attachment is set in xwiki. properties. You cannot add or delete content in this directory at will, because each attachment has corresponding metadata in the database.
#-#Noteifthesystempropertyxwiki.data.dirissetthenthispropertyisnotused.
#-#IfneitherthesystempropertynorthisconfigurationvalueherearesetthentheServletcontainer'stemporary
#-#directoryisused;Thisisabsolutelynotrecommendedsincethatdirectorycouldbewipedoutatanytimeandyou
#-#shouldspecifyavalue.
environment.permanentDirectory=/data/xwiki/
It is best to set the attachment storage mode when running XWIKI for the first time.
In the xwik. cfg file, Set
xwiki.store.attachment.hint=file
xwiki.store.attachment.versioning.hint=file
xwiki.store.attachment.recyclebin.hint=file
10) You can directly access xwiki through XWIKI. xxx. xxx and then go to the installation page.
Reference:
Http://www.xwiki.org/xwiki/bin/view/Main/WebHome
Http://enterprise.xwiki.org/xwiki/bin/view/Main/Download
Http://platform.xwiki.org/xwiki/bin/view/AdminGuide/
Https://www.atlassian.com/software/confluence/
Http://en.wikipedia.org/wiki/Comparison_of_wiki_software
This article is from the "Linux SA John" blog, please be sure to keep this source http://john88wang.blog.51cto.com/2165294/1605787