如何安装部署OLAT

分享一下我老师大神的人工智能教程!零基础,通俗易懂!http://blog.csdn.net/jiangjunshow

也欢迎大家转载本篇文章。分享知识,造福人民,实现我们中华民族伟大复兴!

               

    OLAT的安装基本分为标准安装模式和开发者安装模式。标准安装模式最简单,也最常用。如果你不想进行二次开发,只是直接使用的话,那么标准安装就能满足你的要求了。

    以OLAT 7.0举例。简单来说,标准安装分为4个步骤:

  1. 数据库安装和配置:OLAT默认使用MySQL数据库。安装好MySQL后,按照安装说明设置好用户和权限,导入初始数据库就OK了。
  2. 修改配置文件olat.local.properties :这个配置文件里面决定了OLAT数据库连接方式、部署路径等事项,要根据自己的使用环境进行修改,然后放在Tomcat的lib下即可。在OLAT的war包里,有此文件的模板olat.properties,注释都很清楚,照着改就可以了。
  3. 修改log4j.xml,也放在Tomcat的lib下。OLAT官方安装说明里有具体的配置方法,一般把输出路径改改就行了。这个东西很有用,可以输出log日志,查看出错信息。
  4. 从官网上下载OLAT安装包olat.war,部署在tomcat里面就行了。相信部署war包都应该会,不细说了。

    一个小教训:如果是在Windows系统做服务器,那么你的Tomcat在安装的时候不能使用带空格的路径,切记!

 

    下面是OLAT关于标准安装的文档,照着做应该基本没有什么问题了。

 

标准安装(摘自OLAT安装帮助文档):

      This chapter describes the installation of OLAT for those wishing to use OLAT in a test or production  environment.  If you are a developer then please skip this section and proceed to Section 2.3, “Developer Installation”    where the installation process for an Eclipse IDE environment is described (please see the specific notes regarding  Eclipse and WTP found in developer installation instructions!)  If you are a deployment manager then we suggest that you review the Operations chapter to consider  additional installation and configuration details.  This installation process has been tested on Linux, MacOSX and Windows systems.   Our production systems run on Linux and use JDK 1.6.x, Tomcat 6.x, MySQL 5.x and the latest Openfire 3.4.x 

  The following are the necessary steps for installation:  

  •           The database user and the olat database needs to be created. Please refer to the scripts initDatabase.sql and setupDatabase.sql, which          are located in the olat3/webapp/WEB-INF/classes/resources/database. For MySQL the steps are as follows:          

    • Create the database and user manually. (use your user and password instead of olat and olatpwd)       

      # mysql -u root -p On the console run the following SQL-statements:
      # use mysql;
      # mysql> create database olatdb;      
      # mysql> create user 'olatdb'@'localhost' identified by 'olatpwd';
      # mysql> grant all on olatdb.* to 'olat'@'localhost' identified by 'olatpwd';
      # mysql> flush privileges;     

       

    • On the console run the script:            

      >> mysql -u olat -p olatdb < setupDatabase.sql

         The webapp/WEB-INF/src/serviceconfig/olat.properties file contains settings required to build and install OLAT most of which     you will seldom, if ever, need to change.  The olat.local.properties file     contains those configuration settings you are most likely going to need to change for your environment.     Begin by making an empty olat.local.properties save it to /yourTomcatDir/lib or an other place on your classpath.       Review the olat.properties contents and amend them as appropriate for your local environment.    

         Please note that OLAT application directories will be created for you during the     build for which the build user account must have sufficient access rights. Pre-existing directories will     not be removed though their contents may become overwritten.      

         The follow remarks apply to the local properties (note that other parameters not cited here are chiefly of     relevance to developers):    

    Table 2.1. Local configuration properties

    userdata.dirThis should be set to an appropriate application data location.  A typical choice on a Linux system would be    /var/lib/olat.       
    archive.dirA typical choice is ${userdata.dir}/archive.       
    log.dirA typical choice is ${userdata.dir}/logs.    
    upgrade.dirA typical choice is ${userdata.dir}/upgrades.       
    folder.rootA typical choice is ${userdata.dir}/bcroot.    
    temp.dirA typical choice is ${userdata.dir}/tmp.    
    smtp.*Mail settings for your local SMTP agent (typically an MTA such as Sendmail, Postfix or Exim)  Without these settings    your OLAT instance will be unable to issue emails.  You must sent email addresses for admin and support emails.
    instance.id    This is an internal instance identifier used by OLAT and should only be changed in the event that several instances are    deployed within a single cluster.      
    db.*    The database settings are mostly self explanatory and refer to the database server that will host the OLAT database.      

  •     The following MySQL configuration parameters should be applied to your server configuration file    (i.e., my.cnf)    

    Table 2.2. MySQL configuration file parameters.

    default-storage_engineThis must be set to innodb and applies to all OLAT tables (unless    the table definition states otherwise)
    transaction-isolationThis must be set to READ-COMMITTED which denies opportunity for dirty    reads and represents the optimal choice for an OLTP system.  This is a required setting    for OLAT.    
    innodb_data_home_dirThis establishes the tablespace for your OLAT database which you can place under    your MySQL data directory.    You must create this directory yourself before starting the MySQL instance.    We recommend a dedicated tablespace for OLAT and hence a dedicated MySQL instance.    
    innodb_log_group_home_dirThis establishes the logfiles for your OLAT database which you can place under    your MySQL data directory i.e., datadir in a directory called olatlogs    We recommend dedicated logfiles for OLAT and hence a dedicated MySQL instance.  For heavy loads    you may consider locating these files on a separate partition or volume.    You must create this directory yourself before starting the MySQL instance.    
    innodb_flush_log_at_trx_commit    When set to 1 this flushes the log buffer to the log file with each commit and a    a disk write is performed.  This is a reasonable default value for OLAT which ensures ACID    compliance though you may wish to review other possible values depending on your     circumstances.    
    innodb_buffer_pool_sizeGenerally speaking we recommend a value of c. 1024M for production systems though a (considerably)    smaller value is appropriate for trial instances
    innodb_additional_mem_pool_sizeThis should be set to 20M and is required exclusively for the data dictionary and related matters.
    log-bin, expire_logs_daysWe strongly recommend that you make use of binary logging and that you retain binary logs for a reasonableperiod of time (e.g., 5-7 days)  See MySQL documentation for further details.

  •      Put your customized log4j.xml file to tomcat/lib directory.     Example file :     

    1. <?xml version="1.0" encoding="UTF-8"?>  
    2. <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">  
    3. <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false" threshold="all">  
    4. <!--  
    5.    This file gets only used if you overwrite the file in WEB-INF/classes with this one or by specifing a java system property.  
    6.    Overwrite it with -Dlog4j.configuration="file:/tmp/mylog4j.xml" (java system property) and specifie a path for your logging config.  
    7. -->  
    8.  <!-- CONSOLE appender defined in case it is ever needed -->  
    9.  <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">  
    10.    <layout class="org.apache.log4j.PatternLayout">  
    11.      <param name="ConversionPattern" value="%d [%t] %-5p %c{1} %x - %m%n"/>  
    12.    </layout>  
    13.  </appender>  
    14.  <appender name="DebugLog" class="org.apache.log4j.DailyRollingFileAppender">  
    15.    <param name="File" value="/olatapps/olatng/logs/thishost/tomcat/olatng99/olat.debug.log"/>  
    16.    <param name="DatePattern" value="'.'yyyy-MM-dd"/>  
    17.    <layout class="org.apache.log4j.PatternLayout">  
    18.      <param name="ConversionPattern" value="%d [%t] %-5p %c{1} %x - %m%n"/>  
    19.    </layout>  
    20.  </appender>  
    21.  <!-- this is not UNIX syslog but instead the standard olat logging -->  
    22.  <appender name="syslog" class="org.apache.log4j.DailyRollingFileAppender">  
    23.    <param name="File" value="/olatapps/olatng/logs/thishost/tomcat/olatng99/olat.log"/>  
    24.    <param name="DatePattern" value="'.'yyyy-MM-dd"/>  
    25.    <layout class="org.apache.log4j.PatternLayout">  
    26.      <param name="ConversionPattern" value="%d [%t] %-5p %c{1} %x - %m%n"/>  
    27.    </layout>  
    28.  </appender>  
    29.  <!--  OLAT settings  -->  
    30.  <logger name="org.olat">  
    31.     <level value="INFO"/>  
    32.  </logger>  
    33.  <logger name="org.olat.basesecurity.AuthHelper">  
    34.    <level value="ERROR"/>  
    35.  </logger>  
    36.  <logger name="org.apache.commons.httpclient">  
    37.    <level value="WARN"/>  
    38.  </logger>  
    39.  <logger name="org.olat.core.commons.taskExecutor.ThreadPoolTaskExecutor">  
    40.    <level value="ERROR"/>  
    41.  </logger>  
    42.  <logger name="org.apache.pdfbox.filter.FlateFilter">  
    43.    <level value="FATAL" />  
    44.  </logger>  
    45.  <!--  Third party libraries -->  
    46.  <logger name="org.apache">  
    47.    <level value="ERROR"/>  
    48.  </logger>  
    49.  <logger name="org.hibernate">  
    50.    <level value="ERROR"/>  
    51.  </logger>  
    52.  <logger name="org.springframework">  
    53.    <level value="ERROR"/>  
    54.  </logger>  
    55.   <!-- 
    56.   Filter db-task executor error and warn because they could happen per design 
    57.   -->  
    58.  <logger name="org.hibernate.event.def.AbstractFlushingEventListener">  
    59.    <level value="FATAL"/>  
    60.  </logger>  
    61.  <logger name="net.sf.hibernate">  
    62.    <level value="WARN"/>  
    63.  </logger>  
    64.  <!-- verify treecache.xml activation -->  
    65.  <logger name="org.jboss.cache">  
    66.    <level value="DEBUG" />  
    67.  </logger>  
    68.  <logger name="org.hibernate.cache">  
    69.    <level value="DEBUG" />  
    70.  </logger>  
    71.  <root>  
    72.    <level value="INFO" />  
    73.      <appender-ref ref="syslog"/>  
    74.  </root>  
    75. </log4j:configuration>   
    <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"><log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false" threshold="all"><!--   This file gets only used if you overwrite the file in WEB-INF/classes with this one or by specifing a java system property.   Overwrite it with -Dlog4j.configuration="file:/tmp/mylog4j.xml" (java system property) and specifie a path for your logging config.--> <!-- CONSOLE appender defined in case it is ever needed --> <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">   <layout class="org.apache.log4j.PatternLayout">     <param name="ConversionPattern" value="%d [%t] %-5p %c{1} %x - %m%n"/>   </layout> </appender> <appender name="DebugLog" class="org.apache.log4j.DailyRollingFileAppender">   <param name="File" value="/olatapps/olatng/logs/thishost/tomcat/olatng99/olat.debug.log"/>   <param name="DatePattern" value="'.'yyyy-MM-dd"/>   <layout class="org.apache.log4j.PatternLayout">     <param name="ConversionPattern" value="%d [%t] %-5p %c{1} %x - %m%n"/>   </layout> </appender> <!-- this is not UNIX syslog but instead the standard olat logging --> <appender name="syslog" class="org.apache.log4j.DailyRollingFileAppender">   <param name="File" value="/olatapps/olatng/logs/thishost/tomcat/olatng99/olat.log"/>   <param name="DatePattern" value="'.'yyyy-MM-dd"/>   <layout class="org.apache.log4j.PatternLayout">     <param name="ConversionPattern" value="%d [%t] %-5p %c{1} %x - %m%n"/>   </layout> </appender> <!--  OLAT settings  --> <logger name="org.olat">    <level value="INFO"/> </logger> <logger name="org.olat.basesecurity.AuthHelper">   <level value="ERROR"/> </logger> <logger name="org.apache.commons.httpclient">   <level value="WARN"/> </logger> <logger name="org.olat.core.commons.taskExecutor.ThreadPoolTaskExecutor">   <level value="ERROR"/> </logger> <logger name="org.apache.pdfbox.filter.FlateFilter">   <level value="FATAL" /> </logger> <!--  Third party libraries --> <logger name="org.apache">   <level value="ERROR"/> </logger> <logger name="org.hibernate">   <level value="ERROR"/> </logger> <logger name="org.springframework">   <level value="ERROR"/> </logger>  <!--  Filter db-task executor error and warn because they could happen per design  --> <logger name="org.hibernate.event.def.AbstractFlushingEventListener">   <level value="FATAL"/> </logger> <logger name="net.sf.hibernate">   <level value="WARN"/> </logger> <!-- verify treecache.xml activation --> <logger name="org.jboss.cache">   <level value="DEBUG" /> </logger> <logger name="org.hibernate.cache">   <level value="DEBUG" /> </logger> <root>   <level value="INFO" />     <appender-ref ref="syslog"/> </root></log4j:configuration> 

     

  •      Download olat.war File     and deploy it into tomcat (copy to webapp directory). See 'Tomcat Web Application Depolyment' documentation.      

           

给我老师的人工智能教程打call!http://blog.csdn.net/jiangjunshow
这里写图片描述
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值