{"id":6974,"date":"2023-07-25T09:54:22","date_gmt":"2023-07-25T01:54:22","guid":{"rendered":"https:\/\/i007.vip:15443\/wordpress\/?p=6974"},"modified":"2023-07-25T09:54:22","modified_gmt":"2023-07-25T01:54:22","slug":"%e5%9f%ba%e4%ba%8exwiki%e9%83%a8%e7%bd%b2%e4%bc%81%e4%b8%9a%e5%86%85%e9%83%a8%e7%9f%a5%e8%af%86%e7%ae%a1%e7%90%86%e5%b9%b3%e5%8f%b0","status":"publish","type":"post","link":"https:\/\/i007.cc\/wordpress\/archives\/6974","title":{"rendered":"\u57fa\u4e8exwiki\u90e8\u7f72\u4f01\u4e1a\u5185\u90e8\u77e5\u8bc6\u7ba1\u7406\u5e73\u53f0"},"content":{"rendered":"<p><a href=\"https:\/\/blog.csdn.net\/colalovescoffee\/article\/details\/127576568\">cc from<\/a><\/p>\n<p>1. Xwiki\u4ecb\u7ecd<\/p>\n<p>\u5370\u8c61\u7b14\u8bb0\u3001\u6709\u9053\u7b14\u8bb0\u3001\u4e3a\u77e5\u7b14\u8bb0\u90fd\u662f\u633a\u597d\u7684\u5546\u7528\u7b14\u8bb0\u77e5\u8bc6\u7ba1\u7406\u8f6f\u4ef6\uff0c\u4e0d\u8fc7\u6709\u4e9b\u654f\u611f\u6587\u4ef6\u662f\u4e0d\u592a\u597d\u653e\u5230\u4e92\u8054\u7f51\u4e0a\u7684\u3002<\/p>\n<p>\u6240\u4ee5\u642d\u5efa\u4e00\u5957\u5185\u90e8\u5c40\u57df\u7f51\u77e5\u8bc6\u7ba1\u7406\u5e73\u53f0\u662f\u975e\u5e38\u6709\u610f\u4e49\u7684\uff0c\u5728\u5f00\u6e90Wiki\u7cfb\u7edf\u4e2d\uff0cXWiki\u662f\u505a\u7684\u6700\u597d\u7684\u4ea7\u54c1\u4e4b\u4e00\u3002\u56e0\u4e3a\u5b83\u63d0\u4f9b\u7684\u529f\u80fd\u4e0eConfluence\u7684\u529f\u80fd\u975e\u5e38\u76f8\u4f3c\uff0c\u4e0d\u9700\u8981\u5b66\u4e60\u4efb\u4f55\u8bed\u6cd5\u683c\u5f0f\uff0c\u53ef\u4ee5\u76f4\u63a5\u5728\u7ebf\u50cf\u7f16\u8f91Word\u4e00\u6837\u7f16\u8f91WIKI\u9875\u9762\u3002\u901a\u8fc7\u914d\u7f6e\u63d2\u4ef6\u548c\u6269\u5c55\uff0c\u8fd8\u53ef\u4ee5\u5b9e\u73b0\u5305\u62ecMarkdown\u8bed\u6cd5\u4e4b\u5185\u7684\u5404\u79cd\u5ef6\u5c55\u529f\u80fd\u3002<\/p>\n<p>\u6240\u4ee5\u57282021\u5e74\u5c31\u64b8\u4e86\u4e00\u904dxwiki\uff0c\u73b0\u5728\u628a\u5f53\u65f6\u7684\u8bb0\u5f55\u6574\u7406\u4e00\u904d\uff0c\u4ee5\u98e8\u540c\u884c\u3002<\/p>\n<p>2. \u7b80\u4ecb<br \/>\n\u672c\u6587\u57fa\u4e8eCentos7.x+Tomcat+Mysql\u8fdb\u884c\u90e8\u7f72Xwiki11.10.10\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>Xwiki\u5b89\u88c5\u524d\u4ed4\u7ec6\u9605\u8bfbRelease Notes for XWiki 11.10.10\uff0c\u53ef\u4ee5\u907f\u514d\u8d70\u5f88\u591a\u4e0d\u5fc5\u8981\u7684\u5751\u3002<\/p>\n<p>3.\u5b89\u88c5\u6b65\u9aa4<\/p>\n<p>3.1\u5b89\u88c5Tomcat<br \/>\n\u5b89\u88c5tomcat\u524d\u9996\u5148\u8981\u5b89\u88c5\u5bf9\u5e94\u7684jdk\u5e76\u914d\u7f6eJava\u73af\u5883\u3002<\/p>\n<p>3.1.1\u4e0b\u8f7djdk\u5b89\u88c5\u5305<br \/>\n\u5b98\u7f51\u4e0b\u8f7d\u5730\u5740\uff1ahttp:\/\/www.oracle.com\/technetwork\/java\/javase\/downloads\/jdk8-downloads-2133151.html<\/p>\n<p>\u6211\u8fd9\u8fb9\u662f\u4e0b\u8f7d\u7684jdk-8u181-linux-x64.tar.gz<\/p>\n<p>&nbsp;<\/p>\n<p>\u5982\u679cLinux\u672c\u8eab\u8fde\u63a5\u5230\u4e92\u8054\u7f51\uff0c\u6211\u4eec\u53ef\u4ee5\u76f4\u63a5\u901a\u8fc7wget\u547d\u4ee4\u76f4\u63a5\u628aJDK\u5b89\u88c5\u5305\u4e0b\u8f7d\u4e0b\u6765\u3002<\/p>\n<p>3.1.2\u89e3\u538bjdk\u5b89\u88c5\u5305<br \/>\n\u5c06\u6211\u4eec\u4e0b\u8f7d\u597d\u7684JDK\u5b89\u88c5\u5305\u4e0a\u4f20\u5230\u670d\u52a1\u5668\uff0c\u8fdb\u884c\u89e3\u538b\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u6211\u662f\u653e\u5728\u4e86\/usr\/local\/java\u6587\u4ef6\u4e0b\uff0c\u6240\u4ee5\u8981\u521b\u5efajava\u6587\u4ef6\u5939\u5e76\u5c06\u89e3\u538b\u6587\u4ef6\u79fb\u52a8\u5230java\u4e0b<\/p>\n<p>mkdir -p \/usr\/local\/java<\/p>\n<p>3.1.3\u4fee\u6539\u914d\u7f6e\u6587\u4ef6\uff08\u914d\u7f6e\u73af\u5883\u53d8\u91cf\uff09<br \/>\nvim \/etc\/profile<\/p>\n<p>export JAVA_HOME=\/usr\/local\/java\/jdk1.8.0_271<\/p>\n<p>export JAVA_BIN=\/usr\/local\/java\/jdk1.8.0_271\/bin<\/p>\n<p>export PATH=${JAVA_HOME}\/bin:$PATH<\/p>\n<p>export CLASSPATH=.:${JAVA_HOME}\/lib\/dt.jar:${JAVA_HOME}\/lib\/tools.jar<\/p>\n<p>\u7528vim\u7f16\u8f91\u5668\u6765\u7f16\u8f91profile\u6587\u4ef6\uff0c\u5728\u6587\u4ef6\u672b\u5c3e\u6dfb\u52a0\u4e00\u4e0b\u5185\u5bb9\uff1a<\/p>\n<p>&nbsp;<\/p>\n<p>\uff1awq\u56de\u8f66\u4fdd\u5b58\u9000\u51fa\u3002<\/p>\n<p>\u4fdd\u5b58\u4e4b\u540e\u901a\u8fc7source \/etc\/profile\u547d\u4ee4\u4f7f\u4fee\u6539\u7684\u914d\u7f6e\u751f\u6548<\/p>\n<p>&nbsp;<\/p>\n<p>3.1.4\u6d4b\u8bd5JDK\u5b89\u88c5\u662f\u5426\u6210\u529f<br \/>\njava -version \u51fa\u73b0\u5b89\u88c5\u7248\u672c\u4fe1\u606f<\/p>\n<p>&nbsp;<\/p>\n<p>3.1.5\u5b89\u88c5tomcat<br \/>\n\u4e0b\u8f7d\u5b89\u88c5tomcat\uff08http:\/\/tomcat.apache.org\/\uff09\u6211\u8fd9\u8fb9\u662f\u4e0b\u8f7d\u7684apache-tomcat-8.5.32.tar.gz<\/p>\n<p>&nbsp;<\/p>\n<p>\u89e3\u538b<\/p>\n<p>tar -zxvf apache-tomcat-9.0.41.tar.gz<\/p>\n<p>\u6211\u662f\u653e\u5728\u4e86usr\/local\/tomcat\u4e0b\u6240\u4ee5\u8981\u521b\u5efatomcat\u6587\u4ef6\u5939\u5e76\u5c06\u89e3\u538b\u6587\u4ef6\u79fb\u52a8\u5230tomcat\u4e0b<\/p>\n<p>mkdir \/usr\/local\/tomcat<\/p>\n<p>mv apache-tomcat-9.0.41 \/usr\/local\/tomcat\/<\/p>\n<p>\u8fdb\u5165tomcat\u5b89\u88c5bin\u76ee\u5f55\u5e76\u542f\u52a8<\/p>\n<p>cd \/usr\/local\/tomcat\/apache-tomcat-9.0.41\/bin<\/p>\n<p>.\/startup.sh<\/p>\n<p>&nbsp;<\/p>\n<p>\u6210\u529f\u542f\u52a8\u540e\u6d4f\u89c8\u5668\u8f93\u5165http:\/\/localhost:8080\/\u67e5\u770b\u4fe1\u606f\uff08\u5982\u679c\u4e0d\u662f\u672c\u673a\u5219\u8f93\u5165\u5bf9\u5e94IP\uff09\u81f3\u6b64\uff0ctomcat\u5b89\u88c5\u5b8c\u6210\uff0c\u540e\u7eed\u53ef\u6dfb\u52a0\u9879\u76ee\u91cd\u542ftomcat\u670d\u52a1\u3002<\/p>\n<p>3.1.6\u5c06tomcat\u6dfb\u52a0\u4e3alinux\u7cfb\u7edf\u670d\u52a1<br \/>\n\u2474\u590d\u5236catalina.sh\u4f5c\u4e3a\u7cfb\u7edf\u670d\u52a1\u811a\u672c<\/p>\n<p>cp -p \/usr\/local\/tomcat\/apache-tomcat-9.0.41\/bin\/catalina.sh \/etc\/init.d\/tomcat \u91cd\u547d\u540d\u7684tomcat\u4e3a\u4ee5\u540e\u7684\u670d\u52a1\u540d<\/p>\n<p>\u2475\u4fee\u6539\u811a\u672c<\/p>\n<p>vim \/etc\/init.d\/tomcat<\/p>\n<p>\u5728\u811a\u672c\u8f83\u524d\u9762\u7684\u4f4d\u7f6e\u52a0\u4e0b\u9762\u4e24\u884c\u6ce8\u91ca<\/p>\n<p>#chkconfig:2345 10 90<\/p>\n<p>#description:Tomcat service<\/p>\n<p>JAVA_HOME=\/usr\/local\/java\/jdk1.8.0_271<\/p>\n<p>CATALINA_HOME=\/usr\/local\/tomcat\/apache-tomcat-9.0.41<\/p>\n<p>&nbsp;<\/p>\n<p>\u7b2c\u4e00\u884c\u662f\u670d\u52a1\u7684\u914d\u7f6e\uff1a<\/p>\n<p>\u7b2c\u4e00\u4e2a\u6570\u5b57\u662f\u670d\u52a1\u7684\u8fd0\u884c\u7ea7\uff0c2345\u8868\u660e\u8fd9\u4e2a\u670d\u52a1\u7684\u8fd0\u884c\u7ea7\u662f2\u30013\u30014\u548c5\u7ea7\uff08Linux\u7684\u8fd0\u884c\u7ea7\u4e3a0\u52306\uff09\uff1b<\/p>\n<p>\u7b2c\u4e8c\u4e2a\u6570\u5b57\u662f\u542f\u52a8\u4f18\u5148\u7ea7\uff0c\u6570\u503c\u4ece0\u523099\uff1b<\/p>\n<p>\u7b2c\u4e09\u4e2a\u6570\u662f\u505c\u6b62\u4f18\u5148\u7ea7\uff0c\u6570\u503c\u4e5f\u662f\u4ece0\u523099\u3002<\/p>\n<p>\u7b2c\u4e8c\u884c\u662f\u5bf9\u670d\u52a1\u7684\u63cf\u8ff0<\/p>\n<p>\u5982\u679c\u8be5\u6ce8\u91ca\u6709\u8bef\uff0c\u5728\u6dfb\u52a0\u670d\u52a1\u65f6\u4f1a\u51fa\u73b0&#8221;tomcat\u4e0d\u652f\u6301chkconfig&#8221;\u7684\u9519\u8bef\u63d0\u793a<\/p>\n<p>\u7b2c\u4e09\u56db\u884c \u4e3a\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf<\/p>\n<p>\u5728profile\u6587\u4ef6\u4e2d\u8bbe\u7f6e\u7684\u53d8\u91cf\u4e0d\u8d77\u4f5c\u7528\uff0c\u8981\u5728\u8fd9\u91cc\u518d\u8bbe\u7f6e\u4e00\u904d<\/p>\n<p>\u2476\u6dfb\u52a0\u811a\u672c\u7684\u53ef\u6267\u884c\u6743\u9650<\/p>\n<p>chmod 755 \/etc\/init.d\/tomcat<\/p>\n<p>\u2477\u6dfb\u52a0\u4e3a\u7cfb\u7edf\u670d\u52a1<\/p>\n<p>chkconfig &#8211;add tomcat<\/p>\n<p>\u2478\u67e5\u770b\u7cfb\u7edf\u670d\u52a1\u5217\u8868<\/p>\n<p>chkconfig &#8211;list | grep tomcat<\/p>\n<p>\u2479\u542f\u505ctomcat \u670d\u52a1<\/p>\n<p>\u542f\u52a8tomcat<\/p>\n<p>service tomcat start<\/p>\n<p>\u505c\u6b62<\/p>\n<p>service tomcat stop<\/p>\n<p>\u247a\u8bbe\u7f6e\u4e3a\u5f00\u673a\u81ea\u52a8\u542f\u52a8<\/p>\n<p>vi \/etc\/rc.local<\/p>\n<p>&nbsp;<\/p>\n<p>\u6dfb\u52a0startup.sh\u7684\u8def\u5f84<\/p>\n<p>\/usr\/local\/tomcat\/apache-tomcat-9.0.41\/bin\/startup.sh\u5b8c\u6210<\/p>\n<p>\u247b\u4fee\u6539tomcat\u670d\u52a1\u5668\u7684\u542f\u52a8\u7aef\u53e3\uff08\u672a\u4fee\u6539\uff09<\/p>\n<p>cd \/usr\/local\/tomcat\/apache-tomcat-8.5.32\/conf\/<\/p>\n<p>vim server.xml<\/p>\n<p>&nbsp;<\/p>\n<p>\u4fee\u6539\u5c06Tomcat\u670d\u52a1\u5668\u542f\u52a8\u65f6\u4f7f\u7528\u76848080\u7aef\u53e3\uff0c\u4f8b\u5982\u6539\u62109999<\/p>\n<p>&nbsp;<\/p>\n<p>Make sure you give enough memory to Java since by default Tomcat is not configured with enough memory for XWiki.<\/p>\n<p>When you run XWiki in Tomcat with the default settings, you&#8217;ll probably get an Out Of Memory error (java.lang.OutOfMemoryError: Java heap space or java.lang.OutOfMemoryError: PermGen space) since the default Tomcat memory settings are not enough for XWiki Memory Requirements. You&#8217;ll need to allocate more memory to the JVM.<\/p>\n<p>One easy solution to configure Tomcat&#8217;s memory is to create a setenv.sh file (or setenv.bat on Windows) in [TOMCAT_HOME]\/bin\/ (where [TOMCAT_HOME] is where you&#8217;ve installed Tomcat) and inside this file add the following (adjust the memory values according to the XWiki Memory Requirements). For example:<\/p>\n<p>CATALINA_OPTS=&#8221;-Xmx4096m -XX:MaxPermSize=960m&#8221;<\/p>\n<p>\u247c\u624b\u52a8\u89e3\u538bwar\u5305\u5230\u5bf9\u5e94\u76ee\u5f55<\/p>\n<p>Extract the XWiki WAR into a directory named xwiki in TOMCAT_HOME\/webapps\/<\/p>\n<p>jar -xvf project.war<\/p>\n<p>3.2 \u8bbe\u7f6e permanent\u76ee\u5f55<br \/>\nOpen TOMCAT_HOME\/webapps\/xwiki\/WEB-INF\/xwiki.properties files and configure a permanent directory<\/p>\n<p>Permanent Directory<\/p>\n<p>To set the permanent directory, you have 2 options:<\/p>\n<p>Set the xwiki.data.dir system property when starting the JVM (ie. the Servlet Container&#8217;s JVM, specifically: -Dxwiki.data.dir=&#8230;)<\/p>\n<p>Set the environment.permanentDirectory property in your xwiki.properties file<\/p>\n<p>Make sure to choose a folder different from the XWiki home on which XWiki (which usually means whatever user running the application server in which XWiki is installed) has write access. For example the standard Debian package use \/var\/lib\/xwiki\/data which is usually a good fit for many Linux distributions.<\/p>\n<p>If the location points to a file or a directory to which XWiki(\u9700\u8981\u65b0\u5efa\u7528\u6237\uff1f) does not have write access to, a warning will be printed in the log and the temporary directory will be used as a default. The temporary directory can be periodically cleaned and all its content deleted so it is critical that it is not used for anything else. Thus it&#8217;s especially important to set the Permanent directory to not point to the temporary directory.<\/p>\n<p>Start Tomcat<\/p>\n<p>When Tomcat has opened go to your wiki by accessing http:\/\/localhost:8080\/xwiki\/bin\/view\/Main\/<\/p>\n<p>NOTE &#8211; if you have issues with maximum cache size &#8211; In your $CATALINA_BASE\/conf\/context.xml add the following content before &lt;\/Context&gt;:<\/p>\n<p>&lt;Resources cachingAllowed=&#8221;true&#8221; cacheMaxSize=&#8221;100000&#8243; &gt;&lt;\/Resources&gt;<\/p>\n<p>Activate headless mode<\/p>\n<p>If you&#8217;re operating XWiki on a Linux server with no X11 libraries installed you have to enable headless mode for your Tomcat installation. Sometimes this is also needed on Windows platforms. Typical exceptions are:<\/p>\n<p>Exception: Could not initialize class sun.awt.X11.XToolkit<\/p>\n<p>java.lang.InternalError: Can&#8217;t connect to X11 window server using &#8216;localhost:10.0&#8217; as the value of the DISPLAY variable<\/p>\n<p>On Linux create a file \/TOMCAT_HOME\/bin\/setenv.sh and insert the following code:<\/p>\n<p>#!\/bin\/sh<br \/>\nexport JAVA_OPTS=&#8221;${JAVA_OPTS} -Djava.awt.headless=true&#8221;<\/p>\n<p>On Windows create a file \/TOMCAT_HOME\/bin\/setenv.bat and insert the following code:<\/p>\n<p>set JAVA_OPTS=%JAVA_OPTS% -Djava.awt.headless=true<\/p>\n<p>When running as a Windows service the setenv.bat is not working. See registry HKEY_LOCAL_MACHINE\\SOFTWARE\\Apache Software Foundation\\Procrun 2.0\\FOOBAR\\Parameters\\Java for similar settings.<\/p>\n<p>Optional configuration<\/p>\n<p>Edit your conf\/server.xml to enable gzip compression: &lt;Connector port=&#8221;8080&#8243; &#8230; compression=&#8221;on&#8221; compressionMinSize=&#8221;2048&#8243; compressibleMimeType=&#8221;text\/html,text\/xml,text\/css,text\/javascript,application\/x-javascript&#8221;&gt;&lt;\/Connector&gt;<\/p>\n<p>If you want to modify the port on which Tomcat will run, edit TOMCAT_HOME\/conf\/server.xml\/. Search for 8080 (sometimes 8180 if you are under Linux) and replace with the port value you wish to use.<\/p>\n<p>It is possible to setup a Tomcat Java Server as a UNIX Daemon &#8211; JSVC. Just follow these instructions. The only reason to make Tomcat a daemon is to make it runnable on the 80th port, which can be replaced by using NginX as a proxy on the 80th port and then forwarding to Tomcat to the 8080th port.<\/p>\n<p>Policy configuration<\/p>\n<p>For those who activate the security manager for Tomcat, add this portion of code to the end of your conf\/catalina.policy file from your Tomcat installation. You can adapt the code for the available installations of OpenOffice\/LibreOffice on your server and for different databases :<\/p>\n<p>grant codeBase &#8220;file:${catalina.base}\/webapps\/xwiki\/WEB-INF\/lib\/-&#8221; {<br \/>\n\/\/ for mySQL connection<br \/>\npermission java.net.SocketPermission &#8220;127.0.0.1:3306&#8221;, &#8220;connect,resolve&#8221;;<\/p>\n<p>\/\/ XWiki must have access to all properties in read\/write<br \/>\npermission java.util.PropertyPermission &#8220;*&#8221;, &#8220;read, write&#8221;;<\/p>\n<p>\/\/ Generic detected permissions<br \/>\npermission java.lang.reflect.ReflectPermission &#8220;suppressAccessChecks&#8221;;<br \/>\npermission java.lang.RuntimePermission &#8220;createClassLoader&#8221;;<br \/>\npermission java.lang.RuntimePermission &#8220;setContextClassLoader&#8221;;<br \/>\npermission java.lang.RuntimePermission &#8220;accessClassInPackage.org.apache.catalina.loader&#8221;;<br \/>\npermission java.lang.RuntimePermission &#8220;accessDeclaredMembers&#8221;;<br \/>\npermission java.lang.RuntimePermission &#8220;getenv.ProgramFiles&#8221;;<br \/>\npermission java.lang.RuntimePermission &#8220;getenv.APPDATA&#8221;;<br \/>\npermission java.lang.RuntimePermission &#8220;accessClassInPackage.sun.reflect&#8221;;<br \/>\npermission java.lang.RuntimePermission &#8220;getClassLoader&#8221;;<br \/>\npermission java.lang.RuntimePermission &#8220;accessClassInPackage.org.apache.catalina.connector&#8221;;<br \/>\npermission java.lang.RuntimePermission &#8220;accessClassInPackage.org.apache.tomcat.util.threads&#8221;;<br \/>\npermission java.lang.RuntimePermission &#8220;reflectionFactoryAccess&#8221;;<br \/>\npermission java.lang.RuntimePermission &#8220;accessClassInPackage.com.sun.jmx.interceptor&#8221;;<br \/>\npermission java.lang.RuntimePermission &#8220;accessClassInPackage.com.sun.jmx.mbeanserver&#8221;;<br \/>\npermission java.lang.RuntimePermission &#8220;modifyThread&#8221;;<br \/>\npermission java.lang.RuntimePermission &#8220;getProtectionDomain&#8221;;<\/p>\n<p>\/\/ JAXB permissions<br \/>\npermission javax.xml.bind.JAXBPermission &#8220;setDatatypeConverter&#8221;;<\/p>\n<p>\/\/ Serialization related permissions<br \/>\npermission java.io.SerializablePermission &#8220;allowSerializationReflection&#8221;;<br \/>\npermission java.io.SerializablePermission &#8220;creator&#8221;;<br \/>\npermission java.io.SerializablePermission &#8220;enableSubclassImplementation&#8221;;<\/p>\n<p>\/\/ Internal resources access permissions<br \/>\npermission java.io.FilePermission &#8220;synonyms.txt&#8221;, &#8220;read&#8221;;<br \/>\npermission java.io.FilePermission &#8220;lang\/synonyms_en.txt&#8221;, &#8220;read&#8221;;<br \/>\npermission java.io.FilePermission &#8220;quartz.properties&#8221;, &#8220;read&#8221;;<br \/>\npermission java.io.FilePermission &#8220;\/templates\/-&#8220;, &#8220;read&#8221;;<br \/>\npermission java.io.FilePermission &#8220;\/skins\/-&#8220;, &#8220;read&#8221;;<br \/>\npermission java.io.FilePermission &#8220;\/resources\/-&#8220;, &#8220;read&#8221;;<\/p>\n<p>\/\/ MBean related permissions<br \/>\npermission javax.management.MBeanServerPermission &#8220;createMBeanServer&#8221;;<br \/>\npermission javax.management.MBeanPermission &#8220;*&#8221;, &#8220;registerMBean&#8221;;<br \/>\npermission javax.management.MBeanPermission &#8220;*&#8221;, &#8220;unregisterMBean&#8221;;<br \/>\npermission javax.management.MBeanTrustPermission &#8220;register&#8221;;<br \/>\npermission javax.management.MBeanPermission &#8220;-#-[-]&#8221;, &#8220;queryNames&#8221;;<br \/>\npermission javax.management.MBeanServerPermission &#8220;findMBeanServer&#8221;;<\/p>\n<p>\/\/ LibreOffice\/OpenOffice related permissions<br \/>\npermission java.io.FilePermission &#8220;\/opt\/openoffice.org3\/program\/soffice.bin&#8221;, &#8220;read&#8221;;<br \/>\npermission java.io.FilePermission &#8220;\/opt\/libreoffice\/program\/soffice.bin&#8221;, &#8220;read&#8221;;<br \/>\npermission java.io.FilePermission &#8220;\/usr\/lib\/openoffice\/program\/soffice.bin&#8221;, &#8220;read&#8221;;<br \/>\npermission java.io.FilePermission &#8220;\/usr\/lib\/libreoffice\/program\/soffice.bin&#8221;, &#8220;read&#8221;;<\/p>\n<p>\/\/ Allow file storage directory reading &#8211; for directory and everything underneath<br \/>\n\/\/ This is dependent on the setting of environment.permanentDirectory in xwiki.properties<br \/>\npermission java.io.FilePermission &#8220;${catalina.base}${file.separator}xwikidata${file.separator}&#8221;, &#8220;read,write,delete&#8221;;<br \/>\npermission java.io.FilePermission &#8220;${catalina.base}${file.separator}xwikidata${file.separator}-&#8220;, &#8220;read,write,delete&#8221;;<\/p>\n<p>\/\/ Allow file storage directory reading &#8211; temporary directory and everything underneath<br \/>\n\/\/ This is dependent on the setting of environment.temporaryDirectory in xwiki.properties.<br \/>\npermission java.io.FilePermission &#8220;${catalina.base}${file.separator}temp${file.separator}&#8221;, &#8220;read,write,delete&#8221;;<br \/>\npermission java.io.FilePermission &#8220;${catalina.base}${file.separator}temp${file.separator}-&#8220;, &#8220;read,write,delete&#8221;;<br \/>\n};<\/p>\n<p>\u540e\u7eed\u8fd8\u53ef\u4ee5\u914d\u7f6engnix https<\/p>\n<p>3.3\u5b89\u88c5mysql<br \/>\n\u4e0b\u8f7d\u9014\u5f84\uff1aFrom the Download MySQL Community Server page in the MySQL Developer Zone.<\/p>\n<p>shell&gt; sudo yum install mysql-community-{server,client,common,libs}-* -y<\/p>\n<p>3.3.1\u542f\u52a8\u670d\u52a1<\/p>\n<p>[root@sty software]# service mysqld start<\/p>\n<p>Initializing MySQL database: \/usr\/sbin\/mysqld: error while loading shared libraries: libnuma.so.1: cannot open shared object file: No such file or directory<\/p>\n<p>MySQL has a dependency on the libaio library. Data directory initialization<\/p>\n<p>and subsequent server startup steps will fail if this library is not installed locally.<\/p>\n<p>If necessary, install it using the appropriate package manager. For example, on<\/p>\n<p>Yum-based systems:<\/p>\n<p>shell&gt; yum search libaio # search for info<\/p>\n<p>shell&gt; yum install libaio # install library<\/p>\n<p>[root@sty software]# yum install libaio* -y<\/p>\n<p>[root@sty software]# service mysqld start<\/p>\n<p>Initializing MySQL database: [ OK ]<\/p>\n<p>Starting mysqld: [ OK ]<\/p>\n<p>[root@sty software]# service mysqld status<\/p>\n<p>mysqld (pid 63380) is running&#8230;<\/p>\n<p>[root@sty software]#<\/p>\n<p>3.3.2\u67e5\u770broot\u5bc6\u7801<\/p>\n<p>[root@xwiki soft]# more \/var\/log\/mysqld.log |grep password<\/p>\n<p>2021-01-16T10:18:48.243819Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: Hur!dHpCh1d? [root@xwiki soft]#<\/p>\n<p>3.3.3\u767b\u5f55<\/p>\n<p>shell&gt; mysql \u2013u root -p<\/p>\n<p>3.3.4\u4fee\u6539\u5bc6\u7801\u89c4\u5219\u4ee5\u53ca\u4fee\u6539\u5bc6\u7801<\/p>\n<p>\u5982\u679c\u662f\u4ee5\u524d\u7684MySQL\u7248\u672c\uff0c\u5e38\u4f7f\u7528password\u51fd\u6570\u6765\u8fdb\u884c\u4fee\u6539\u5bc6\u7801<\/p>\n<p>mysql&gt; update mysql.user set password=password(&#8216;xxx&#8217;) where user=&#8217;root&#8217;;<\/p>\n<p>\u4f46\u662fMySQL8\u4e4b\u540e\uff0c\u6ca1\u6709\u4e86password\u5b57\u6bb5\u548cpassword()\u51fd\u6570\uff0c\u6240\u4ee5\u4e0d\u80fd\u4f7f\u7528\u4e0a\u9762\u7684\u4fee\u6539\u5bc6\u7801\u7684\u65b9\u6cd5\u3002<\/p>\n<p>\u4fee\u6539\u5bc6\u7801<\/p>\n<p>mysql&gt; alter user &#8216;root&#8217;@&#8217;localhost&#8217; identified by &#8216;Root@123456&#8217;;<\/p>\n<p>\u6211\u4eec\u4e5f\u8fd8\u53ef\u4ee5\u4f7f\u7528mysqladmin\u547d\u4ee4\u6765\u8fdb\u884c\u4fee\u6539<\/p>\n<p>mysqladmin -u root -p &#8216;\u65e7\u5bc6\u7801&#8217; password &#8216;\u65b0\u5bc6\u7801&#8217;<\/p>\n<p># mysqladmin -u root -p&#8217;Root@12345&#8242; password &#8216;xxx&#8217;<\/p>\n<p>alter user &#8216;xwiki&#8217;@&#8217;localhost&#8217; identified by &#8216;xwiki&#8217;;<\/p>\n<p>alter user &#8216;root&#8217;@&#8217;localhost&#8217; identified by &#8216;root&#8217;;<\/p>\n<p>mysql&gt; set global validate_password.policy=LOW;<\/p>\n<p>mysql&gt; set global validate_password.length=4;<\/p>\n<p>3.3.5\u521b\u5efaxwiki\u6570\u636e\u5e93<\/p>\n<p>mysql -u root -e &#8220;create database xwiki default character set utf8mb4 collate utf8mb4_bin&#8221;<\/p>\n<p>mysql -u root -e &#8220;grant all privileges on *.* to xwiki@localhost&#8221;<\/p>\n<p>ALTER USER &#8216;xwiki&#8217;@&#8217;localhost&#8217; IDENTIFIED WITH MYSQL_NATIVE_PASSWORD BY \u2018Passw0rd\u2019;<\/p>\n<p>ALTER USER &#8216;root&#8217;@&#8217;localhost&#8217; IDENTIFIED WITH MYSQL_NATIVE_PASSWORD BY \u2018Root@123456\u2019;<\/p>\n<p>If the above command fails with a password-does-not-meet-requirements error, uninstall the MySQL password_validate plugin or pick a more complex password and update the password used by default in hibernate.cfg.xml:<\/p>\n<p>mysql -u root -p -e &#8220;uninstall plugin validate_password;&#8221;<\/p>\n<p>Please make sure that the DNS-name &#8220;localhost&#8221; is defined in your hosts-file (i.e. \/etc\/hosts)<\/p>\n<p>You need to have the MySQL JDBC Driver JAR (named mysql-connector-java*.jar) installed in XWiki&#8217;s WAR file. If this file isn&#8217;t present in XWiki&#8217;s WEB-INF\/lib directory you&#8217;ll need to download it and copy it there. You can download it from the MySQL Connector\/J Driver page or directly from the Maven Central Repository\uff08\u8fd9\u91cc\u6709\u73b0\u6210\u7684\uff09.<\/p>\n<p>You need the 5.x version or higher. The 3.x version doesn&#8217;t handle Boolean data correctly and will either throw errors or will make all documents hidden by default.<\/p>\n<p>Now you need to tell XWiki to use MySQL. To do this, edit the WEB-INF\/hibernate.cfg.xml file where you have expanded the XWiki WAR file and replace the matching properties with the following ones:<\/p>\n<p>&lt;property name=&#8221;connection.url&#8221;&gt;jdbc:mysql:\/\/localhost\/xwiki&lt;\/property&gt;<br \/>\n&lt;property name=&#8221;connection.username&#8221;&gt;xwiki&lt;\/property&gt;<br \/>\n&lt;property name=&#8221;connection.password&#8221;&gt;Xwiki_123456&lt;\/property&gt;<br \/>\n&lt;property name=&#8221;connection.driver_class&#8221;&gt;com.mysql.jdbc.Driver&lt;\/property&gt;<br \/>\n&lt;property name=&#8221;dialect&#8221;&gt;org.hibernate.dialect.MySQL5InnoDBDialect&lt;\/property&gt;<br \/>\n&lt;property name=&#8221;connection.useUnicode&#8221;&gt;true&lt;\/property&gt;<br \/>\n&lt;property name=&#8221;connection.characterEncoding&#8221;&gt;UTF-8&lt;\/property&gt;<\/p>\n<p>XML\u5982\u4f55\u6dfb\u52a0\u6ce8\u91ca\uff1f<\/p>\n<p>\u6ce8\u91ca\u4ee5 &lt;!&#8211; \u5f00\u59cb\u5e76\u4ee5 &#8211;&gt; \u7ed3\u675f\uff0c<br \/>\n\u4f8b\u5982 &lt;!&#8211;\u6ce8\u91ca\u5185\u5bb9&#8211;&gt;\u3002\u6ce8\u91ca\u53ef\u4ee5\u51fa\u73b0\u5728\u6587\u6863\u5e8f\u8a00\u4e2d\uff0c\u5305\u62ec\u6587\u6863\u7c7b\u578b\u5b9a\u4e49 (DTD)\uff1b\u6587\u6863\u4e4b\u540e\uff1b\u6216\u6587\u672c\u5185\u5bb9\u4e2d\u3002 \u6ce8\u91ca\u4e0d\u80fd\u51fa\u73b0\u5728\u5c5e\u6027\u503c\u4e2d\u3002 \u4e0d\u80fd\u51fa\u73b0\u5728\u6807\u8bb0\u4e2d\u3002<br \/>\n\u5206\u6790\u5668\u5728\u9047\u5230 &gt; \u65f6\uff0c\u5c31\u8ba4\u4e3a\u6ce8\u91ca\u5df2\u7ed3\u675f\uff1b\u7136\u540e\u7ee7\u7eed\u5c06\u6587\u6863\u4f5c\u4e3a\u6b63\u5e38\u7684 XML \u5904\u7406\u3002 \u56e0\u6b64\uff0c\u5b57\u7b26\u4e32 &gt; \u4e0d\u80fd\u51fa\u73b0\u5728\u6ce8\u91ca\u4e2d\u3002 \u9664\u4e86\u8be5\u9650\u5236\u4e4b\u5916\uff0c\u4efb\u4f55\u5408\u6cd5\u7684 XML \u5b57\u7b26\u5747\u53ef\u4ee5\u51fa\u73b0\u5728\u6ce8\u91ca\u4e2d\uff0c\u4e0e CDATA \u8282\u975e\u5e38\u7c7b\u4f3c\u3002 \u8fd9\u6837\uff0c\u53ef\u4ee5\u4ece\u5206\u6790\u5668\u770b\u5230\u7684\u8f93\u51fa\u6d41\u4e2d\u5220\u9664 XML \u6ce8\u91ca\uff0c\u540c\u65f6\u53c8\u4e0d\u4f1a\u5220\u9664\u6587\u6863\u7684\u5185\u5bb9\u3002<br \/>\n\u4ee5\u4e0b\u6ce8\u91ca\u53ef\u4ee5\u7528\u4e8e\u6682\u65f6\u9664\u53bb\u6807\u8bb0\u3002<br \/>\n&lt;!&#8212; &lt;test pattern=&#8221;SECAM&#8221; \/&gt;&lt;test pattern=&#8221;NTSC&#8221; \/&gt; &#8211;&gt;<\/p>\n<p>\u6b64\u5904mysql8 \u9700\u8981\u914d\u7f6epublickey ttps:\/\/mysqlconnector.net\/connection-options\/<\/p>\n<p>&lt;property name=&#8221;hibernate.connection.url&#8221;&gt;jdbc:mysql:\/\/localhost\/xwiki?allowPublicKeyRetrieval=true&amp;amp;useSSL=false&amp;amp;serverTimezone=${timezone}&lt;\/property&gt;<\/p>\n<p>By default MySQL only accepts packets that are smaller than 1MB. If you get the &#8220;Packet for query is too large (max_allowed_packet)&#8221; error then see the Packet too large error page. For example to increase the packet size to 32M you could start the MySQL server with mysqld &#8211;console &#8211;max_allowed_packet=32M or you can modify directly the my.cnf configuration file to set this value permanently.<\/p>\n<p>If an empty XWiki starts with no errors, but you are unable to upload the default set of pages (XAR file) try to increase the max_allowed_packet parameter as shown above.<\/p>\n<p>3.3.6\u7ed9\u4efb\u610fIP\u6388\u6743(\u5c1a\u672a\u505a)<\/p>\n<p>3.3.7\u521b\u5efa\u7d22\u5f15Indexes<\/p>\n<p>\/\/ Required<br \/>\ncreate index xwl_value on xwikilargestrings (xwl_value(50));<br \/>\ncreate index xwd_parent on xwikidoc (xwd_parent(50));<br \/>\ncreate index xwd_class_xml on xwikidoc (xwd_class_xml(20));<br \/>\ncreate index ase_page_date on activitystream_events (ase_page, ase_date);<br \/>\ncreate index xda_docid1 on xwikiattrecyclebin (xda_docid);<br \/>\ncreate index ase_param1 on activitystream_events (ase_param1(200));<br \/>\ncreate index ase_param2 on activitystream_events (ase_param2(200));<br \/>\ncreate index ase_param3 on activitystream_events (ase_param3(200));<br \/>\ncreate index ase_param4 on activitystream_events (ase_param4(200));<br \/>\ncreate index ase_param5 on activitystream_events (ase_param5(200));<br \/>\n\/\/ Only required if you use stats (feature is off by default)<br \/>\ncreate index xws_number on xwikistatsdoc (XWS_NUMBER);<br \/>\ncreate index xws_classname on xwikistatsdoc (XWS_CLASSNAME);<br \/>\ncreate index xwr_number on xwikistatsreferer (XWR_NUMBER);<br \/>\ncreate index xwr_classname on xwikistatsreferer (XWR_CLASSNAME);<br \/>\ncreate index xwr_referer on xwikistatsreferer (XWR_REFERER(50));<br \/>\ncreate index xwv_user_agent on xwikistatsvisit (XWV_USER_AGENT(255));<br \/>\ncreate index xwv_cookie on xwikistatsvisit (XWV_COOKIE(255));<br \/>\ncreate index xwv_classname on xwikistatsvisit (XWV_CLASSNAME);<br \/>\ncreate index xwv_number on xwikistatsvisit (XWV_NUMBER);<\/p>\n<p>Note to XWiki developers: The following indexes could be created automatically though since they&#8217;re less than 255 characters and thus should be added in a future version of XWiki so that they don&#8217;t need to be created manually:<\/p>\n<p>create index xws_number on xwikistatsdoc (XWS_NUMBER);<br \/>\ncreate index xws_classname on xwikistatsdoc (XWS_CLASSNAME);<br \/>\ncreate index xwr_number on xwikistatsreferer (XWR_NUMBER);<br \/>\ncreate index xwr_classname on xwikistatsreferer (XWR_CLASSNAME);<br \/>\ncreate index xwv_classname on xwikistatsvisit (XWV_CLASSNAME);<br \/>\ncreate index xwv_number on xwikistatsvisit (XWV_NUMBER);<br \/>\ncreate index xda_docid1 on xwikiattrecyclebin (xda_docid);<\/p>\n<p>3.4\u914d\u7f6e\u6570\u636e\u5e93\u76f8\u5173\u53c2\u6570<br \/>\nCreate a user with all privileges on that database<\/p>\n<p>Copy your RDBMS Java drivers to the XWiki webapp&#8217;s WEB-INF\/lib directory<\/p>\n<p>Configure XWiki to use the created database. This involves modifying the WEB-INF\/hibernate.cfg.xml file as is described in the tutorials for each database below.<\/p>\n<p>XWiki will automatically create the various tables it needs when it executes on the first run<\/p>\n<p>3.5\u914d\u7f6eXwiki Ui\u754c\u9762<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>3.6\u5f00\u542fOffice Importer Application \u65b9\u4fbfword\u6587\u6863\u76f4\u63a5\u5bfc\u5165xwiki<br \/>\nThe Office Importer application comes pre-bundled with XWiki versions greater than 1.8M1, so there is no need for a manual installation. The Office Importer makes use of a running Libre Office server to convert office documents into HTML before they are finally transformed into XWiki 2.0 syntax. Thus, a Libre Office server instance is required on the server computer which hosts your XWiki installation. Beginning with XWiki 1.8.4 you can configure a Libre Office or an OpenOffice server in the following ways described below.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>4.\u7ed3\u8bed<br \/>\n\u8fc7\u7a0b\u5176\u5b9e\u8fd8\u662f\u6bd4\u8f83\u6298\u817e\u7684\uff0c\u81ea\u5df1\u642d\u7684\u65f6\u5019\u524d\u524d\u540e\u540e\u82b1\u4e86\u56db\u4e94\u5929\u7684\u65f6\u95f4\u3002\u5b98\u7f51\u8fd8\u63d0\u4f9b\u4e86docker\u5b89\u88c5\u9009\u62e9\uff0c\u60f3\u7528\u800c\u4e14\u60f3\u5077\u61d2\u7684\u540c\u5b66\u53ef\u4ee5\u8003\u8651\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>cc from 1. Xwiki\u4ecb\u7ecd \u5370<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"colormag_page_container_layout":"default_layout","colormag_page_sidebar_layout":"default_layout","footnotes":""},"categories":[24],"tags":[121],"class_list":["post-6974","post","type-post","status-publish","format-standard","hentry","category-value_docs","tag-05-"],"_links":{"self":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/posts\/6974","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/comments?post=6974"}],"version-history":[{"count":0,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/posts\/6974\/revisions"}],"wp:attachment":[{"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/media?parent=6974"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/categories?post=6974"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/i007.cc\/wordpress\/wp-json\/wp\/v2\/tags?post=6974"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}