ienki 发表于 2017-1-6 10:08:21

Apache Roller 5.0 安装部署

  本文讲述Roller 5.0的安装部署,使用的是官方的Roller war包而非源码,在tomcat和mysql中的部署过程。

  
 
  1  准备资源
  1.1 jdk
  1.2 tomcat
  1.3 mysql
  1.4 Apache Roller 5.0包,从http://roller.apache.org上可下载最新的
  
 
  2 数据库配置
      2.1 按照下载的文档中说明,创建一个rollerdb的数据库,注意编码格式为utf8,否则中文出错。
      2.2执行如下脚本,创建rollerdb的用户和权限

   % mysql -u root -p
password: *****
mysql> create database rollerdb;
mysql> grant all on rollerdb.* to scott@'%' identified by 'tiger';
mysql> grant all on rollerdb.* to scott@localhost identified by 'tiger';
 
      2.3 从下载的war包中解压出文件,在WEB-INF\classes\dbscripts文件夹中找到数据库脚本执行创建表,即可创建完数据库。
  
 
  3 在tomcat中配置roller的虚拟目录

<Context docBase="C:\roller-5.0.0-tomcat" path="/roller" />
   

4 配置邮件服务器所需jar包      将mail.jar和activation.jar放入%TOMCAT_HOM%/LIB文件夹下,并把两个api添加到CLASSPATH中。
  
 
  5 创建roller配置文件
      创建roller-custom.properties文件,内容如下:
  

installation.type=auto
database.configurationType=jdbc
database.jdbc.driverClass=com.mysql.jdbc.Driver
database.jdbc.connectionURL=jdbc:mysql://localhost:3306/rollerdb
database.jdbc.username=scott
database.jdbc.password=tiger
mail.configurationType=properties
mail.hostName=smtp-server.example.com
mail.username=scott
mail.password=tiger
   
  该文件主要设置了数据库连接和邮件服务器,把这个文件放入%TOMCAT_HOM%/LIB下,并把路径添加到CLASSPATH中。
  
 
  6  启动tomcat,查看tomcat的log是否报错,具体原因具体解决,如果没有报错,输入http://localhost:xxx/roller 即可访问
  
 
   

  
 
页: [1]
查看完整版本: Apache Roller 5.0 安装部署