Linux部署xwiki步骤(war包)

Linux下部署xwiki安装需求:

     jdk1.8
    mysql-connector-java-5.1.34.jar
    tapache-tomcat-8.5.29.tar.gz
    mysql
    xwiki-10.1.war

1、下载xwiki

    http://www.xwiki.org/xwiki/bin/view/Download/或者:http://download.forge.ow2.org/xwiki/xwiki-10.2.war

2、安装apache-tomcat

          下载地址:http://mirror.bit.edu.cn/apache/tomcat/tomcat-8/v8.5.29/bin/apache-tomcat-8.5.29.tar.gz
          解压缩:tar -xzvf apache-tomcat-8.5.29.tar.gz

          安装:mv apache-tomcat-8.5.29 /usr/local/apache

3.安装xwiki             

                     移动到webapps文件夹下:cd /home/dong/tomcat/apache-tomcat-8.5.28/webapps

                     新建文件夹用以存放xwiki:mkidr xwiki

                     解压xwiki至xwiki文件夹中:unzip xwiki-10.1.war  -d /home/dong/tomcat/apache-tomcat-8.5.28/webapps/xwiki/

4.配置

        1)编辑tomcat的server.xml(文件路径:/home/dong/tomcat/apache-tomcat-8.5.28/conf)修改8080端口描述设置编码为UTF8,并允许gzip压缩
                           connectionTimeout="20000"
               redirectPort="8443"
               URIEncoding="UTF-8"
               compression="on"
               compressionMinSize="2048"
               compressableMimeType="text/html,text/xml,text/css,text/javascript,application/x-javascript"/>    
        2)配置JVM的内存大小和安装路径
                如果是通过yum安装的tomcat需要修改如/etc/tomcat6/tomcat6.conf 这个文件
                如果是使用的tomcat源码包安装,则修改bin/catalina.sh 这个文件
              JAVA_OPTS="-Xmx300m -XX:MaxPermSize=196m"
              JAVA_HOME="/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.20-3.b26.el6.x86_64"
        3)配置数据库,新建xwiki的数据库并授权
          新建数据库:create database xwiki default character set utf8 collate utf8_bin;  
          数据库授权(账号xwiki,密码xwiki):grant all privileges on xwiki.* to xwiki@'%' identified by 'xwiki';
        4)下载MySQL JDBC Driver Jar放到/home/dong/tomcat/apache-tomcat-8.5.28/webapps/xwiki/WEB-INF/lib/目录下
               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  /home/dong/tomcat/apache-tomcat-8.5.28/webapps/xwiki/WEB-INF/lib/
       5)配置xwiki应用

     cd  /home/dong/tomcat/apache-tomcat-8.5.28/webapps/xwiki/WEB-INF
            vi hibernate.cfg.xml   (注释掉无用的数据源配置)
            jdbc:mysql://localhost/xwiki?useSSL=false
            xwiki
            xwiki
            com.mysql.jdbc.Driver
            org.hibernate.dialect.MySQL5InnoDBDialect
            UTF-8
            UTF-8
            true
            true
            20
           
           
           
           
             

        6)编辑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
        7)配置office server
            yum install libreoffice   libreoffice-headless
        8)XWIKI字符集编码配置
            vi web.xml     

    encoding="UTF-8"
5.xwiki初始化

使用. /home/dong/tomcat/apache-tomcat-8.5.28/bin/startup.sh 启动tomcat后,通过http://ipaddr:8080/xwiki做xwiki初始化工作

你可能感兴趣的:(Linux笔记)