随笔:15 文章:2 评论:14 引用:0
BlogJava 首页 发新随笔
发新文章 联系 聚合管理

roller4.0 安装小记
roller4.0 安装总体感觉很方便。有安装向导页面,自动建立数据库表。
但也有一点小问题,install-guide 上没有写得太详细,也可能我看得不够仔细,呵呵
。一个是没有说配置连接池配置文件,另一个是中文有点问题。

总结如下:
安装环境


JDK 1.5.05
tomcat-5.5.17
mysql-5.0.27
apache-roller-4.0

安装使用的是 msyql 数据库,现建立数据库和用户

mysql> create database rollerdb default charset utf8  collate utf8_general_ci;  
 
文档install-guide 上 create database rollerdb ; 建立的数据库默认是 lat1 字符  
编码,中文会有问题所以使用 utf8 编码  
 
给用户授权  
 
mysql> grant all on rollerdb.* to scott@'%' identified by 'tiger';  
mysql> grant all on rollerdb.* to scott@localhost identified by 'tiger'; 

mysql> create database rollerdb default charset utf8  collate utf8_general_ci;

文档install-guide 上 create database rollerdb ; 建立的数据库默认是 lat1 字符
编码,中文会有问题所以使用 utf8 编码

给用户授权

mysql> grant all on rollerdb.* to scott@'%' identified by 'tiger';
mysql> grant all on rollerdb.* to scott@localhost identified by 'tiger';

 

为了使用java mail 发送邮件,tomcat 的 common/lib 文件夹中放入 activation.jar,
javamail.jar


困了,先睡了回头再写...
各位新年快乐!

在 conf/server.xml 文件中的connector加入 URIEncoding=”UTF-8”, 为了I18N
例如:
<Connector port="8080"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" debug="0"
acceptCount="100" connectionTimeout="20000"
disableUploadTimeout="true"
URIEncoding="UTF-8" />

将roller 发行包的 roller 文件夹copy 到tomcat 的 webapps 下。

关于JDBC 驱动 install-guiade 上说
For MySQL 4.1.x 使用 the J/Connector 3.0.X JDBC
For MySQL 5.X use the J/Connector 3.1.X JDBC drivers

拷贝到 tomcat/common/lib 下

建立一个 roller-custom.properties 文件内容如下:
installation.type=auto
database.configurationType=jdbc
database.jdbc.driverClass=com.mysql.jdbc.Driver
database.jdbc.connectionURL=jdbc:mysql://localhost:3306/rollerdb?autoReconnect=true&useUnicode=true&characterEncoding=utf-8&mysqlEncoding=utf8
database.jdbc.username=scott
database.jdbc.password=tiger
mail.configurationType=properties
mail.hostname=smtp-server.example.com
mail.username=scott
mail.password=tiger

roller-custom.properties 放到 tomcat/common/classes 下

(这里有一个问题我不大明白,在roller-custom.properties
文件里指定了数据库连接,但是还需要制定一个数据库的连接池
给roller 才能正常工作,而且注意 database.jdbc.connectionURL=jdbc:mysql://localhost:3306/
rollerdb?autoReconnect=true&useUnicode
=true&characterEncoding=utf-8&mysqlEncoding=utf8
属性,如果按install-guide 的 database.jdbc.connectionURL=jdbc:mysql://localhost:3306/
rollerdb 中文是会乱码的)

在\tomcat-5.5.17\conf\Catalina\localhost放入一个 roller.xml
文件,内容如下:
Java代码
<Context path="/roller" 
docBase="roller" debug="0">  
<Resource name="jdbc/rollerdb" auth="Container" 
type="javax.sql.DataSource" 
driverClassName="com.mysql.jdbc.Driver" 
url="jdbc:mysql://localhost:3306/rollerdb?autoReconnect=true&useUnicode=true&characterEncoding=utf-8&mysqlEncoding=utf8" 
username="root" 
password="mysql" 
maxActive="20" 
maxIdle="3" 
removeAbandoned="true" 
maxWait="3000" />  
<!-- If you want e-mail features, un-comment the section below -->  
<!--  
<Resource name="mail/Session" auth="Container" 
type="javax.mail.Session" 
mail.smtp.host="mailhost.example.com" />  
-->  
</Context> 

<Context path="/roller"
docBase="roller" debug="0">
<Resource name="jdbc/rollerdb" auth="Container"
type="javax.sql.DataSource"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/rollerdb?autoReconnect=true&useUnicode=true&characterEncoding=utf-8&mysqlEncoding=utf8"
username="root"
password="mysql"
maxActive="20"
maxIdle="3"
removeAbandoned="true"
maxWait="3000" />
<!-- If you want e-mail features, un-comment the section below -->
<!--
<Resource name="mail/Session" auth="Container"
type="javax.mail.Session"
mail.smtp.host="mailhost.example.com" />
-->
</Context>


其实就是指定了一个 jdbc/rollerdb 的 jndi datasource,
如果没有的话,会发现每次见了用户,登陆时就登陆不了。提示
密码或用户错,但是用户确实在数据库表中了,我觉得
roller-custom.properties
和roller.xml 中的数据源配置都用到了,有点奇怪。
回头看看源码可能就知道是怎么回事了。

启动tomcat ,就可以正常安装roller 了

posted @ 2008-02-03 15:39 小Q 阅读(1270) | 评论 (0)编辑 收藏
 
     摘要: Spket Eclipse Plugin & IDE
The Spket IDE has by far the most superior code assist for Ext 2.0. It uses the Ext .jsb project file and embedded script doc to build code assist that includes options inherited from base classes and full documentation.

It doesn’t have much for editing other types of files though (e.g. CSS), so my preference is to install it as an Eclipse plugin in Aptana. To install the plugin in Aptana:

  阅读全文
posted @ 2008-02-02 16:38 小Q 阅读(14626) | 评论 (2)编辑 收藏
 
     摘要: 没有注册的版本,用的不爽。
居然没有混淆,反编译了下,修改里面的一个Class文件,就ok了。
com.spket.ui_1.6.6.jar --》\com\spket\ui\internal\License.class  阅读全文
posted @ 2008-02-02 16:21 小Q 阅读(5067) | 评论 (4)编辑 收藏
 
     摘要: 最近在研究Roller源代码.发现Roller文档和源代码中有一些容易让人混淆和模糊的概念(至少对我来说),在这里记下来.


Roller: 博客服务器, 能够同时支持多个用户(博客)的服务器软件,同时可以支持组网志(Group Weblog,意思是多个用户共同编辑的网志)

  阅读全文
posted @ 2008-01-21 22:49 小Q 阅读(2355) | 评论 (0)编辑 收藏
 
     摘要:       最近研究Roller,一直手痒,想搞个Java 的博客玩玩,网上查了下,Roller像是比较出名,所以就选择他了。      可惜网上中文的文档不多,官方e文的文档也不多,连API也没有提供,所以,我觉得,先把他的三个文档翻译下,一来方便我学习,二来,给同时给感兴趣的又不敢冒e文同志的一些方便(声明下,我...  阅读全文
posted @ 2008-01-20 22:46 小Q 阅读(4004) | 评论 (0)编辑 收藏
 
     摘要:     简单讲述下发送和接受邮件的协议: SMTP     简单邮件传输协议(Simple Mail Transfer Protocol,SMTP)由 RFC 821 定义。它定义了发送电子邮件的机制。在 JavaMail API 环境中,您基于 JavaMail 的程序将和您的公司或因特网服务供应商的(Internet Serv...  阅读全文
posted @ 2007-12-31 21:19 小Q 阅读(2831) | 评论 (1)编辑 收藏
 

    本没有什么追求,吃饱了,穿暖了。发现写写,更健康哦。
    扯哪里去了,有什么新的想法就大家看看,人多力量大的。

posted @ 2007-12-31 18:15 小Q 阅读(158) | 评论 (0)编辑 收藏
仅列出标题
共2页: 上一页 1 2 
CALENDER
<2024年5月>
2829301234
567891011
12131415161718
19202122232425
2627282930311
2345678

常用链接

留言簿(4)

随笔分类

随笔档案

文章分类

新闻分类

新闻档案

搜索

  •  

最新评论

阅读排行榜

评论排行榜


Powered By: 博客园
模板提供沪江博客