- 浏览: 59991 次
最新评论
-
chenlilin6391210:
javascript验证Validator.js -
spp_1987:
楼主 能详细点吗
ant工程发布 -
spp_1987:
云里雾里啊
ant工程发布 -
xhp317:
顶一下
javascript验证Validator.js -
xiaolan02:
<scrīpt src="./Js/valid ...
javascript验证Validator.js
apache-roller-src-3.1.tar.gz的oracle数据库版本配置过程
参考roller-install-guide.pdf过程
1:从官方网站下载源apache-roller-src-3.1.tar.gz代码。
http://cwiki.apache.org/confluence/display/ROLLER/Roller+Downloads
和下载oracle的java数据库驱动程序包ojdbc14.jar
2:我是也从svn上下载了最新的程序,主要是用到其中的tools下的jar包,并copy到tools文件夹下
3:设置环境变量,主要是CATALINA_HOME和ROLLER变量,大家根据自己的情况可以更改,我的设置如下
CATALINA_HOME: C:\tomcat\rollertomcat
4:修改默认的mysql数据库到oracle数据库,并创建oracle数据库,我创建了oracle数据库为roller,用户名和密码都为roller,数据库脚本在\web\WEB-INF\dbscripts\oracle,可能新版本的没有,我放到附件中了
5:修改oracle数据库的配置信息,
找到
<java classname="org.apache.roller.business.utils.ConsistencyCheck" fork="yes">
<arg value="${command}"/>
<jvmarg value="-Dusername=roller"/>
<jvmarg value="-Dpassword=tiger"/>
<classpath>
<path refid="base.path"/>
<path location="${ro.build}/lib/rollerbeans.jar"/>
<path location="${ro.tools}/lib/mm.mysql-2.0.14-bin.jar"/>
</classpath>
</java>
修改为
<java classname="org.apache.roller.business.utils.ConsistencyCheck" fork="yes">
<arg value="${command}"/>
<jvmarg value="-Dusername=roller"/>
<jvmarg value="-Dpassword=roller"/>
<classpath>
<path refid="base.path"/>
<path location="${ro.build}/lib/rollerbeans.jar"/>
<path location="${ro.tools}/lib/ojdbc14.jar"/>
</classpath>
</java>
修改hibernate.cfg.xml到相应的oracle数据库形式
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.url">jdbc:mysql://YOUR_DBHOSTNAME/YOUR_DBNAME?user=Y&password=YOUR_PASSWORD&autoReconnect=true&useUnicode=true&characterEncoding=utf-8&mysqlEncoding=utf8</property>
<property name="hibernate.connection.username">YOUR_USERNAME</property>
<property name="hibernate.connection.password">YOUR_PASSWORD</property>
<property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
改为如下
<property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property name="hibernate.connection.url">jdbc:oracle:thin:@192.168.2.199:1521:oracle</property>
<property name="hibernate.connection.username">roller</property>
<property name="hibernate.connection.password">roller</property>
<property name="hibernate.dialect">org.hibernate.dialect.OracleDialect</property>
5:进入文件roller文件夹,生成部署文件
在cmd命令中运行bulil all
如果缺少包的话,请找下相应的包,我是从svn上签下最新的程序,只是用到其中的tools下的包,因为最新的好像是struts2,没学过,不熟悉,本想学下,有没时间,下次吧
生成文件夹,\build,下面有4个,我只用到其中的webapp,即用于部署的tomcat中的文件,
6:参考文档roller-install-guide.pdf
把activation.jar,mail.jar,ojdbc14.jar放到tomcat下的common\lib下,
添加roller.xml到tomcat\conf\Catalina\localhost文件夹下,我的是,对应与tomcat5.5
<!--
Context configuration file for the Tomcat Host Manager Web App
$Id: host-manager.xml 303743 2005-03-11 22:39:26Z remm $
-->
<Context path="/roller" docBase="E:\JDK5\rollerroller\build\webapp" debug="0">
<Resource name="jdbc/rollerdb"
auth="Container"
type="javax.sql.DataSource"
driverClassName="oracle.jdbc.driver.OracleDriver"
url="jdbc:oracle:thin:@192.168.2.199:1521:oracle"
username="roller"
password="roller"
maxActive="20"
maxIdle="3"
removeAbandoned="false"
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="mail.strongit.com.cn" />
</Context>
7:在webapp下新建文件夹data\roller_data\search-index和\data\roller_data\uploads
修改生成的文件
oracle的生成脚本:
-- Run this script to create the Roller database tables in your database.
-- *****************************************************
-- Create the tables and indices
create table rolleruser (
id varchar(48) not null primary key,
username varchar(255) not null,
passphrase varchar(255) not null,
fullname varchar(255) not null,
emailaddress varchar(255) not null,
datecreated timestamp not null,
locale varchar(20),
timezone varchar(50),
isenabled number(1) default 1 not null
);
alter table rolleruser add constraint ru_username_uq unique ( username );
create table userrole (
id varchar(48) not null primary key,
rolename varchar(255) not null,
username varchar(255) not null,
userid varchar(48) not null
);
create index ur_userid_idx on userrole( userid );
create index ur_username_idx on userrole( username );
-- User permissions within a website
-- permission_mask: bitmask 000 limited, 001 author, 011 admin
-- pending: pending user acceptance of invitation to join website
create table roller_user_permissions (
id varchar(48) not null primary key,
website_id varchar(48) not null,
user_id varchar(48) not null,
permission_mask integer not null,
pending number(1) default 1 not null
);
-- Audit log records time and comment about change
-- user_id: user that made change
-- object_id: id of associated object, if any
-- object_class: name of associated object class (e.g. WeblogEntryData)
-- comment: description of change
-- change_time: time that change was made
create table roller_audit_log (
id varchar(48) not null primary key,
user_id varchar(48) not null,
object_id varchar(48),
object_class varchar(255),
comment_text varchar(255) not null,
change_time timestamp
);
create table usercookie (
id varchar(48) not null primary key,
username varchar(255) not null,
cookieid varchar(100) not null,
datecreated timestamp not null
);
create index uc_username_idx on usercookie( username );
create index uc_cookieid_idx on usercookie( cookieid );
create table webpage (
id varchar(48) not null primary key,
name varchar(255) not null,
description varchar(255),
link varchar(255),
websiteid varchar(48) not null,
template clob not null,
updatetime timestamp not null,
hidden number(1) default 0 not null,
navbar number(1) default 0 not null,
templatelang varchar(20) not null,
decorator varchar(255) default null
);
create index wp_name_idx on webpage( name );
create index wp_link_idx on webpage( link );
create index wp_id_idx on webpage( websiteid );
create table website (
id varchar(48) not null primary key,
name varchar(255) not null,
handle varchar(255) not null,
description varchar(255) not null,
userid varchar(48) not null,
defaultpageid varchar(48) default '',
weblogdayid varchar(48) not null,
ignorewords clob,
enablebloggerapi number(1) default 0 not null,
editorpage varchar(255),
bloggercatid varchar(48),
defaultcatid varchar(48),
allowcomments number(1) default 1 not null,
emailcomments number(1) default 0 not null,
emailfromaddress varchar(255),
emailaddress varchar(255) not null,
editortheme varchar(255),
locale varchar(20),
timezone varchar(50),
defaultplugins varchar(255),
isenabled number(1) default 1 not null,
isactive number(1) default 1 not null,
datecreated timestamp not null,
blacklist clob,
defaultallowcomments number(1) default 1 not null,
defaultcommentdays integer default 7 not null,
commentmod number(1) default 0 not null,
displaycnt integer default 15 not null,
lastmodified timestamp,
pagemodels varchar(255) default null,
enablemultilang number(1) default 0 not null,
showalllangs number(1) default 1 not null
);
create index ws_userid_idx on website(userid);
create index ws_isenabled_idx on website(isenabled);
alter table website add constraint ws_handle_uq unique (handle);
-- This index is not necessary because of handle is already a primary key.
-- create index ws_handle_idx on website(handle);
create table folder (
id varchar(48) not null primary key,
name varchar(255) not null,
description varchar(255),
websiteid varchar(48) not null,
parentid varchar(48)
);
create index fo_websiteid_idx on folder( websiteid );
create table folderassoc (
id varchar(48) not null primary key,
folderid varchar(48) not null,
ancestorid varchar(40),
relation varchar(20) not null
);
create index fa_folderid_idx on folderassoc( folderid );
create index fa_ancestorid_idx on folderassoc( ancestorid );
create index fa_relation_idx on folderassoc( relation );
create table bookmark (
id varchar(48) not null primary key,
folderid varchar(48) not null,
name varchar(255) not null,
description varchar(255),
url varchar(255) not null,
weight integer default 0 not null,
priority integer default 100 not null,
image varchar(255),
feedurl varchar(255)
);
create index bm_folderid_idx on bookmark( folderid );
create table weblogcategory (
id varchar(48) not null primary key,
name varchar(255) not null,
description varchar(255),
websiteid varchar(48) not null,
image varchar(255)
);
create index wc_websiteid_idx on weblogcategory( websiteid );
-- alter table weblogcategory add unique category_nameparentid_uq (parentid, name(20));
create table weblogcategoryassoc (
id varchar(48) not null primary key,
categoryid varchar(48) not null,
ancestorid varchar(40),
relation varchar(20) not null
);
create index wca_categoryid_idx on weblogcategoryassoc( categoryid );
create index wca_ancestorid_idx on weblogcategoryassoc( ancestorid );
create index wca_relation_idx on weblogcategoryassoc( relation );
create table weblogentry (
id varchar(48) not null primary key,
userid varchar(48) not null,
anchor varchar(255) not null,
title varchar(255) not null,
text clob not null,
pubtime timestamp null,
updatetime timestamp not null,
websiteid varchar(48) not null,
categoryid varchar(48) not null,
publishentry number(1) default 1 not null,
link varchar(255),
plugins varchar(255),
allowcomments number(1) default 0 not null,
commentdays integer default 7 not null,
rightToLeft number(1) default 0 not null,
pinnedtomain number(1) default 0 not null,
locale varchar(20),
status varchar(20) not null,
summary clob default null,
content_type varchar(48) default null,
content_src varchar(255) default null
);
create index we_websiteid_idx on weblogentry( websiteid );
create index we_categoryid_idx on weblogentry( categoryid );
create index we_pubtime_idx on weblogentry( pubtime,publishentry,websiteid );
create index we_pinnedtom_idx on weblogentry(pinnedtomain);
create index we_pubentry_idx on weblogentry(publishentry);
create index we_userid_idx on weblogentry(userid);
create index we_status_idx on weblogentry(status);
create index we_locale_idx on weblogentry(locale);
create table roller_weblogentrytag (
id varchar(48) not null primary key,
entryid varchar(48) not null,
websiteid varchar(48) not null,
userid varchar(48) not null,
name varchar(255) not null,
time timestamp not null
);
create index wet_entryid_idx on roller_weblogentrytag( entryid );
create index wet_websiteid_idx on roller_weblogentrytag( websiteid );
create index wet_userid_idx on roller_weblogentrytag( userid );
create index wet_name_idx on roller_weblogentrytag( name );
create table roller_weblogentrytagagg (
id varchar(48) not null primary key,
websiteid varchar(48) ,
name varchar(255) not null,
total integer not null,
lastused timestamp not null
);
create index weta_websiteid_idx on roller_weblogentrytagagg( websiteid );
create index weta_name_idx on roller_weblogentrytagagg( name );
create index weta_lastused_idx on roller_weblogentrytagagg( lastused );
create table newsfeed (
id varchar(48) not null primary key,
name varchar(255) not null,
description varchar(255) not null,
link varchar(255) not null,
websiteid varchar(48) not null
);
create index nf_websiteid_idx on newsfeed( websiteid );
create table roller_comment (
id varchar(48) not null primary key,
entryid varchar(48) not null,
name varchar(255),
email varchar(255),
url varchar(255),
content clob,
posttime timestamp not null,
spam number(1) default 0 not null,
notify number(1) default 0 not null,
remotehost varchar(128),
pending number(1) default 1 not null,
approved number(1) default 0 not null
);
create index co_entryid_idx on roller_comment( entryid );
create index co_pending_idx on roller_comment( pending );
create index co_approved_idx on roller_comment( approved );
-- Ping Feature Tables
-- name: short descriptive name of the ping target
-- pingurl: URL to receive the ping
-- websiteid: if not null, this is a custom target defined by the associated website
-- conditioncode:
-- lastsuccess:
create table pingtarget (
id varchar(48) not null primary key,
name varchar(255) not null,
pingurl varchar(255) not null,
websiteid varchar(48),
conditioncode integer default 0 not null,
lastsuccess timestamp,
autoenabled number(1) default 0 not null
);
create index pt_websiteid_idx on pingtarget( websiteid );
-- auto ping configurations
-- websiteid: fk reference to website for which this auto ping configuration applies
-- pingtargetid: fk reference to the ping target to be pinged when the website changes
create table autoping (
id varchar(48) not null primary key,
websiteid varchar(48) not null,
pingtargetid varchar(48) not null
);
create index ap_websiteid_idx on autoping( websiteid );
create index ap_pingtid_idx on autoping( pingtargetid );
-- autopingid: fk reference to ping configuration
-- categoryid: fk reference to category
create table pingcategory (
id varchar(48) not null primary key,
autopingid varchar(48) not null,
categoryid varchar(48) not null
);
create index pc_autopingid_idx on pingcategory( autopingid );
create index pc_categoryid_idx on pingcategory( categoryid );
-- entrytime: timestamp of original entry onto the ping queue
-- pingtargetid: weak fk reference to ping target (not constrained)
-- websiteid: weak fk reference to website originating the ping (not constrained)
-- attempts: number of ping attempts that have been made for this entry
create table pingqueueentry (
id varchar(48) not null primary key,
entrytime timestamp not null,
pingtargetid varchar(48) not null,
websiteid varchar(48) not null,
attempts integer not null
);
create index pqe_entrytime_idx on pingqueueentry( entrytime );
create index pqe_pingtid_idx on pingqueueentry( pingtargetid );
create index pqe_websiteid_idx on pingqueueentry( websiteid );
-- Referer tracks URLs that refer to websites and entries
create table referer (
id varchar(48) not null primary key,
websiteid varchar(48) not null,
entryid varchar(48),
datestr varchar(10),
refurl varchar(255) not null,
refpermalink varchar(255),
reftime timestamp,
requrl varchar(255),
title varchar(255),
excerpt clob,
dayhits integer default 0 not null,
totalhits integer default 0 not null,
visible number(1) default 0 not null,
duplicate number(1) default 0 not null
);
create index ref_websiteid_idx on referer( websiteid );
create index ref_entryid_idx on referer( entryid );
create index ref_refurl_idx on referer( refurl );
create index ref_requrl_idx on referer( requrl );
create index ref_datestr_idx on referer( datestr );
create index ref_refpermlnk_idx on referer( refpermalink );
create index ref_duplicate_idx on referer( duplicate );
-- Configuration options for Roller, should only ever be one row
-- Deprecated in 1.2: configuration now stored in roller_properties table
create table rollerconfig (
id varchar(48) not null primary key,
sitedescription varchar(255),
sitename varchar(255),
emailaddress varchar(255),
absoluteurl varchar(255),
adminusers varchar(255),
encryptpasswords number(1) default 1 not null,
algorithm varchar(10),
newuserallowed number(1) default 0 not null,
editorpages varchar(255),
userthemes varchar(255) not null,
indexdir varchar(255),
memdebug number(1) default 0 not null,
autoformatcomments number(1) default 0 not null,
escapecommenthtml number(1) default 1 not null,
emailcomments number(1) default 0 not null,
enableaggregator number(1) default 0 not null,
enablelinkback number(1) default 0 not null,
rsscachetime integer default 3000 not null,
rssusecache number(1) default 1 not null,
uploadallow varchar(255),
uploadforbid varchar(255),
uploadenabled number(1) default 1 not null,
uploaddir varchar(255) not null,
uploadpath varchar(255) not null,
uploadmaxdirmb decimal(5,2) default 4.0 not null,
uploadmaxfilemb decimal(5,2) default 1.5 not null,
dbversion varchar(10),
refspamwords clob
);
create table roller_properties (
name varchar(255) not null primary key,
value clob
);
create table roller_tasklock (
id varchar(48) not null primary key,
name varchar(255) not null,
islocked number(1) default 0,
timeacquired timestamp null,
timeleased integer,
lastrun timestamp null
);
create index rtl_taskname_idx on roller_tasklock( name );
create table roller_hitcounts (
id varchar(48) not null primary key,
websiteid varchar(48) not null,
dailyhits integer
);
create index rhc_websiteid_idx on roller_hitcounts( websiteid );
-- Entry attribute: metadata for weblog entries
create table entryattribute (
id varchar(48) not null primary key,
entryid varchar(48) not null,
name varchar(255) not null,
value clob not null
);
create index ea_entryid_idx on entryattribute( entryid );
alter table entryattribute add constraint ea_name_uq unique ( entryid, name );
create table rag_group_subscription (
group_id varchar(48) not null,
subscription_id varchar(48) not null
);
create index raggs_gid_idx on rag_group_subscription(group_id);
create index raggs_sid_idx on rag_group_subscription(subscription_id);
create table rag_config (
id varchar(48) not null primary key,
default_group_id varchar(48),
title varchar(255) not null,
description varchar(255),
site_url varchar(255),
output_dir varchar(255),
cache_dir varchar(255) not null,
template_dir varchar(255),
main_page varchar(255),
admin_name varchar(255),
admin_email varchar(255) not null,
group_page varchar(255),
proxy_host varchar(255),
proxy_port integer default -1
);
create table rag_group (
id varchar(48) not null primary key,
handle varchar(255) not null,
title varchar(255) not null,
description varchar(255),
cat_restriction clob,
group_page varchar(255),
max_page_entries integer default 30,
max_feed_entries integer default 30
);
alter table rag_group add constraint ragg_handle_uq unique ( handle );
create table rag_subscription (
id varchar(48) not null primary key,
title varchar(255),
feed_url varchar(255) not null,
site_url varchar(255),
author varchar(255),
last_updated timestamp,
inbound_links integer default -1,
inbound_blogs integer default -1
);
alter table rag_subscription add constraint rags_feed_url_uq unique ( feed_url );
create table rag_entry (
id varchar(48) not null primary key,
subscription_id varchar(48) not null,
handle varchar(255),
title varchar(255),
guid varchar(255),
permalink clob not null,
author varchar(255),
content clob,
categories clob,
published timestamp not null,
updated timestamp
);
create index rage_sid_idx on rag_entry(subscription_id);
-- *****************************************************
-- Now add the foreign key relationships
-- user, role and website
alter table website add constraint ws_userid_fk
foreign key ( userid ) references rolleruser ( id ) ;
alter table userrole add constraint ur_userid_fk
foreign key ( userid ) references rolleruser( id ) ;
-- page, entry, category, comment
alter table webpage add constraint wp_websiteid_fk
foreign key ( websiteid ) references website( id ) ;
alter table weblogentry add constraint we_websiteid_fk
foreign key ( websiteid ) references website( id ) ;
alter table weblogentry add constraint wc_categoryid_fk
foreign key ( categoryid ) references weblogcategory( id ) ;
alter table weblogcategory add constraint wc_websiteid_fk
foreign key ( websiteid ) references website( id ) ;
alter table roller_comment add constraint co_entryid_fk
foreign key ( entryid ) references weblogentry( id ) ;
alter table entryattribute add constraint att_entryid_fk
foreign key ( entryid ) references weblogentry( id ) ;
-- referer
alter table referer add constraint ref_entryid_fk
foreign key ( entryid ) references weblogentry( id ) ;
alter table referer add constraint ref_websiteid_fk
foreign key ( websiteid ) references website( id ) ;
-- folder and bookmark
alter table folder add constraint fo_websiteid_fk
foreign key ( websiteid ) references website( id ) ;
-- alter table folder add constraint fo_parentid_fk
-- foreign key ( parentid ) references folder( id );
alter table bookmark add constraint bm_folderid_fk
foreign key ( folderid ) references folder( id ) ;
-- newsfeed
alter table newsfeed add constraint nf_websiteid_fk
foreign key ( websiteid ) references website( id ) ;
-- pingtarget, autoping, pingcategory
alter table pingtarget add constraint pt_websiteid_fk
foreign key (websiteid) references website(id) ;
alter table autoping add constraint ap_websiteid_fk
foreign key (websiteid) references website(id) ;
alter table autoping add constraint ap_pingtargetid_fk
foreign key (pingtargetid) references pingtarget(id) ;
alter table pingcategory add constraint pc_autopingid_fk
foreign key (autopingid) references autoping(id) ;
alter table pingcategory add constraint pc_categoryid_fk
foreign key (categoryid) references weblogcategory(id) ;
-- THE FOLLOWING CONSTRAINTS CAN NOT BE SUPPORTED FOR IMPORTING new-user.xml
-- alter table website add constraint website_defaultpageid_fk foreign key ( defaultpageid ) references webpage ( id );
-- alter table website add constraint website_weblogdayid_fk foreign key ( weblogdayid ) references webpage ( id );
-- alter table webpage add constraint webpage_websiteid_fk foreign key ( websiteid ) references website( id );
参考roller-install-guide.pdf过程
1:从官方网站下载源apache-roller-src-3.1.tar.gz代码。
http://cwiki.apache.org/confluence/display/ROLLER/Roller+Downloads
和下载oracle的java数据库驱动程序包ojdbc14.jar
2:我是也从svn上下载了最新的程序,主要是用到其中的tools下的jar包,并copy到tools文件夹下
3:设置环境变量,主要是CATALINA_HOME和ROLLER变量,大家根据自己的情况可以更改,我的设置如下
CATALINA_HOME: C:\tomcat\rollertomcat
4:修改默认的mysql数据库到oracle数据库,并创建oracle数据库,我创建了oracle数据库为roller,用户名和密码都为roller,数据库脚本在\web\WEB-INF\dbscripts\oracle,可能新版本的没有,我放到附件中了
5:修改oracle数据库的配置信息,
找到
<java classname="org.apache.roller.business.utils.ConsistencyCheck" fork="yes">
<arg value="${command}"/>
<jvmarg value="-Dusername=roller"/>
<jvmarg value="-Dpassword=tiger"/>
<classpath>
<path refid="base.path"/>
<path location="${ro.build}/lib/rollerbeans.jar"/>
<path location="${ro.tools}/lib/mm.mysql-2.0.14-bin.jar"/>
</classpath>
</java>
修改为
<java classname="org.apache.roller.business.utils.ConsistencyCheck" fork="yes">
<arg value="${command}"/>
<jvmarg value="-Dusername=roller"/>
<jvmarg value="-Dpassword=roller"/>
<classpath>
<path refid="base.path"/>
<path location="${ro.build}/lib/rollerbeans.jar"/>
<path location="${ro.tools}/lib/ojdbc14.jar"/>
</classpath>
</java>
修改hibernate.cfg.xml到相应的oracle数据库形式
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.url">jdbc:mysql://YOUR_DBHOSTNAME/YOUR_DBNAME?user=Y&password=YOUR_PASSWORD&autoReconnect=true&useUnicode=true&characterEncoding=utf-8&mysqlEncoding=utf8</property>
<property name="hibernate.connection.username">YOUR_USERNAME</property>
<property name="hibernate.connection.password">YOUR_PASSWORD</property>
<property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
改为如下
<property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property name="hibernate.connection.url">jdbc:oracle:thin:@192.168.2.199:1521:oracle</property>
<property name="hibernate.connection.username">roller</property>
<property name="hibernate.connection.password">roller</property>
<property name="hibernate.dialect">org.hibernate.dialect.OracleDialect</property>
5:进入文件roller文件夹,生成部署文件
在cmd命令中运行bulil all
如果缺少包的话,请找下相应的包,我是从svn上签下最新的程序,只是用到其中的tools下的包,因为最新的好像是struts2,没学过,不熟悉,本想学下,有没时间,下次吧
生成文件夹,\build,下面有4个,我只用到其中的webapp,即用于部署的tomcat中的文件,
6:参考文档roller-install-guide.pdf
把activation.jar,mail.jar,ojdbc14.jar放到tomcat下的common\lib下,
添加roller.xml到tomcat\conf\Catalina\localhost文件夹下,我的是,对应与tomcat5.5
<!--
Context configuration file for the Tomcat Host Manager Web App
$Id: host-manager.xml 303743 2005-03-11 22:39:26Z remm $
-->
<Context path="/roller" docBase="E:\JDK5\rollerroller\build\webapp" debug="0">
<Resource name="jdbc/rollerdb"
auth="Container"
type="javax.sql.DataSource"
driverClassName="oracle.jdbc.driver.OracleDriver"
url="jdbc:oracle:thin:@192.168.2.199:1521:oracle"
username="roller"
password="roller"
maxActive="20"
maxIdle="3"
removeAbandoned="false"
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="mail.strongit.com.cn" />
</Context>
7:在webapp下新建文件夹data\roller_data\search-index和\data\roller_data\uploads
修改生成的文件
oracle的生成脚本:
-- Run this script to create the Roller database tables in your database.
-- *****************************************************
-- Create the tables and indices
create table rolleruser (
id varchar(48) not null primary key,
username varchar(255) not null,
passphrase varchar(255) not null,
fullname varchar(255) not null,
emailaddress varchar(255) not null,
datecreated timestamp not null,
locale varchar(20),
timezone varchar(50),
isenabled number(1) default 1 not null
);
alter table rolleruser add constraint ru_username_uq unique ( username );
create table userrole (
id varchar(48) not null primary key,
rolename varchar(255) not null,
username varchar(255) not null,
userid varchar(48) not null
);
create index ur_userid_idx on userrole( userid );
create index ur_username_idx on userrole( username );
-- User permissions within a website
-- permission_mask: bitmask 000 limited, 001 author, 011 admin
-- pending: pending user acceptance of invitation to join website
create table roller_user_permissions (
id varchar(48) not null primary key,
website_id varchar(48) not null,
user_id varchar(48) not null,
permission_mask integer not null,
pending number(1) default 1 not null
);
-- Audit log records time and comment about change
-- user_id: user that made change
-- object_id: id of associated object, if any
-- object_class: name of associated object class (e.g. WeblogEntryData)
-- comment: description of change
-- change_time: time that change was made
create table roller_audit_log (
id varchar(48) not null primary key,
user_id varchar(48) not null,
object_id varchar(48),
object_class varchar(255),
comment_text varchar(255) not null,
change_time timestamp
);
create table usercookie (
id varchar(48) not null primary key,
username varchar(255) not null,
cookieid varchar(100) not null,
datecreated timestamp not null
);
create index uc_username_idx on usercookie( username );
create index uc_cookieid_idx on usercookie( cookieid );
create table webpage (
id varchar(48) not null primary key,
name varchar(255) not null,
description varchar(255),
link varchar(255),
websiteid varchar(48) not null,
template clob not null,
updatetime timestamp not null,
hidden number(1) default 0 not null,
navbar number(1) default 0 not null,
templatelang varchar(20) not null,
decorator varchar(255) default null
);
create index wp_name_idx on webpage( name );
create index wp_link_idx on webpage( link );
create index wp_id_idx on webpage( websiteid );
create table website (
id varchar(48) not null primary key,
name varchar(255) not null,
handle varchar(255) not null,
description varchar(255) not null,
userid varchar(48) not null,
defaultpageid varchar(48) default '',
weblogdayid varchar(48) not null,
ignorewords clob,
enablebloggerapi number(1) default 0 not null,
editorpage varchar(255),
bloggercatid varchar(48),
defaultcatid varchar(48),
allowcomments number(1) default 1 not null,
emailcomments number(1) default 0 not null,
emailfromaddress varchar(255),
emailaddress varchar(255) not null,
editortheme varchar(255),
locale varchar(20),
timezone varchar(50),
defaultplugins varchar(255),
isenabled number(1) default 1 not null,
isactive number(1) default 1 not null,
datecreated timestamp not null,
blacklist clob,
defaultallowcomments number(1) default 1 not null,
defaultcommentdays integer default 7 not null,
commentmod number(1) default 0 not null,
displaycnt integer default 15 not null,
lastmodified timestamp,
pagemodels varchar(255) default null,
enablemultilang number(1) default 0 not null,
showalllangs number(1) default 1 not null
);
create index ws_userid_idx on website(userid);
create index ws_isenabled_idx on website(isenabled);
alter table website add constraint ws_handle_uq unique (handle);
-- This index is not necessary because of handle is already a primary key.
-- create index ws_handle_idx on website(handle);
create table folder (
id varchar(48) not null primary key,
name varchar(255) not null,
description varchar(255),
websiteid varchar(48) not null,
parentid varchar(48)
);
create index fo_websiteid_idx on folder( websiteid );
create table folderassoc (
id varchar(48) not null primary key,
folderid varchar(48) not null,
ancestorid varchar(40),
relation varchar(20) not null
);
create index fa_folderid_idx on folderassoc( folderid );
create index fa_ancestorid_idx on folderassoc( ancestorid );
create index fa_relation_idx on folderassoc( relation );
create table bookmark (
id varchar(48) not null primary key,
folderid varchar(48) not null,
name varchar(255) not null,
description varchar(255),
url varchar(255) not null,
weight integer default 0 not null,
priority integer default 100 not null,
image varchar(255),
feedurl varchar(255)
);
create index bm_folderid_idx on bookmark( folderid );
create table weblogcategory (
id varchar(48) not null primary key,
name varchar(255) not null,
description varchar(255),
websiteid varchar(48) not null,
image varchar(255)
);
create index wc_websiteid_idx on weblogcategory( websiteid );
-- alter table weblogcategory add unique category_nameparentid_uq (parentid, name(20));
create table weblogcategoryassoc (
id varchar(48) not null primary key,
categoryid varchar(48) not null,
ancestorid varchar(40),
relation varchar(20) not null
);
create index wca_categoryid_idx on weblogcategoryassoc( categoryid );
create index wca_ancestorid_idx on weblogcategoryassoc( ancestorid );
create index wca_relation_idx on weblogcategoryassoc( relation );
create table weblogentry (
id varchar(48) not null primary key,
userid varchar(48) not null,
anchor varchar(255) not null,
title varchar(255) not null,
text clob not null,
pubtime timestamp null,
updatetime timestamp not null,
websiteid varchar(48) not null,
categoryid varchar(48) not null,
publishentry number(1) default 1 not null,
link varchar(255),
plugins varchar(255),
allowcomments number(1) default 0 not null,
commentdays integer default 7 not null,
rightToLeft number(1) default 0 not null,
pinnedtomain number(1) default 0 not null,
locale varchar(20),
status varchar(20) not null,
summary clob default null,
content_type varchar(48) default null,
content_src varchar(255) default null
);
create index we_websiteid_idx on weblogentry( websiteid );
create index we_categoryid_idx on weblogentry( categoryid );
create index we_pubtime_idx on weblogentry( pubtime,publishentry,websiteid );
create index we_pinnedtom_idx on weblogentry(pinnedtomain);
create index we_pubentry_idx on weblogentry(publishentry);
create index we_userid_idx on weblogentry(userid);
create index we_status_idx on weblogentry(status);
create index we_locale_idx on weblogentry(locale);
create table roller_weblogentrytag (
id varchar(48) not null primary key,
entryid varchar(48) not null,
websiteid varchar(48) not null,
userid varchar(48) not null,
name varchar(255) not null,
time timestamp not null
);
create index wet_entryid_idx on roller_weblogentrytag( entryid );
create index wet_websiteid_idx on roller_weblogentrytag( websiteid );
create index wet_userid_idx on roller_weblogentrytag( userid );
create index wet_name_idx on roller_weblogentrytag( name );
create table roller_weblogentrytagagg (
id varchar(48) not null primary key,
websiteid varchar(48) ,
name varchar(255) not null,
total integer not null,
lastused timestamp not null
);
create index weta_websiteid_idx on roller_weblogentrytagagg( websiteid );
create index weta_name_idx on roller_weblogentrytagagg( name );
create index weta_lastused_idx on roller_weblogentrytagagg( lastused );
create table newsfeed (
id varchar(48) not null primary key,
name varchar(255) not null,
description varchar(255) not null,
link varchar(255) not null,
websiteid varchar(48) not null
);
create index nf_websiteid_idx on newsfeed( websiteid );
create table roller_comment (
id varchar(48) not null primary key,
entryid varchar(48) not null,
name varchar(255),
email varchar(255),
url varchar(255),
content clob,
posttime timestamp not null,
spam number(1) default 0 not null,
notify number(1) default 0 not null,
remotehost varchar(128),
pending number(1) default 1 not null,
approved number(1) default 0 not null
);
create index co_entryid_idx on roller_comment( entryid );
create index co_pending_idx on roller_comment( pending );
create index co_approved_idx on roller_comment( approved );
-- Ping Feature Tables
-- name: short descriptive name of the ping target
-- pingurl: URL to receive the ping
-- websiteid: if not null, this is a custom target defined by the associated website
-- conditioncode:
-- lastsuccess:
create table pingtarget (
id varchar(48) not null primary key,
name varchar(255) not null,
pingurl varchar(255) not null,
websiteid varchar(48),
conditioncode integer default 0 not null,
lastsuccess timestamp,
autoenabled number(1) default 0 not null
);
create index pt_websiteid_idx on pingtarget( websiteid );
-- auto ping configurations
-- websiteid: fk reference to website for which this auto ping configuration applies
-- pingtargetid: fk reference to the ping target to be pinged when the website changes
create table autoping (
id varchar(48) not null primary key,
websiteid varchar(48) not null,
pingtargetid varchar(48) not null
);
create index ap_websiteid_idx on autoping( websiteid );
create index ap_pingtid_idx on autoping( pingtargetid );
-- autopingid: fk reference to ping configuration
-- categoryid: fk reference to category
create table pingcategory (
id varchar(48) not null primary key,
autopingid varchar(48) not null,
categoryid varchar(48) not null
);
create index pc_autopingid_idx on pingcategory( autopingid );
create index pc_categoryid_idx on pingcategory( categoryid );
-- entrytime: timestamp of original entry onto the ping queue
-- pingtargetid: weak fk reference to ping target (not constrained)
-- websiteid: weak fk reference to website originating the ping (not constrained)
-- attempts: number of ping attempts that have been made for this entry
create table pingqueueentry (
id varchar(48) not null primary key,
entrytime timestamp not null,
pingtargetid varchar(48) not null,
websiteid varchar(48) not null,
attempts integer not null
);
create index pqe_entrytime_idx on pingqueueentry( entrytime );
create index pqe_pingtid_idx on pingqueueentry( pingtargetid );
create index pqe_websiteid_idx on pingqueueentry( websiteid );
-- Referer tracks URLs that refer to websites and entries
create table referer (
id varchar(48) not null primary key,
websiteid varchar(48) not null,
entryid varchar(48),
datestr varchar(10),
refurl varchar(255) not null,
refpermalink varchar(255),
reftime timestamp,
requrl varchar(255),
title varchar(255),
excerpt clob,
dayhits integer default 0 not null,
totalhits integer default 0 not null,
visible number(1) default 0 not null,
duplicate number(1) default 0 not null
);
create index ref_websiteid_idx on referer( websiteid );
create index ref_entryid_idx on referer( entryid );
create index ref_refurl_idx on referer( refurl );
create index ref_requrl_idx on referer( requrl );
create index ref_datestr_idx on referer( datestr );
create index ref_refpermlnk_idx on referer( refpermalink );
create index ref_duplicate_idx on referer( duplicate );
-- Configuration options for Roller, should only ever be one row
-- Deprecated in 1.2: configuration now stored in roller_properties table
create table rollerconfig (
id varchar(48) not null primary key,
sitedescription varchar(255),
sitename varchar(255),
emailaddress varchar(255),
absoluteurl varchar(255),
adminusers varchar(255),
encryptpasswords number(1) default 1 not null,
algorithm varchar(10),
newuserallowed number(1) default 0 not null,
editorpages varchar(255),
userthemes varchar(255) not null,
indexdir varchar(255),
memdebug number(1) default 0 not null,
autoformatcomments number(1) default 0 not null,
escapecommenthtml number(1) default 1 not null,
emailcomments number(1) default 0 not null,
enableaggregator number(1) default 0 not null,
enablelinkback number(1) default 0 not null,
rsscachetime integer default 3000 not null,
rssusecache number(1) default 1 not null,
uploadallow varchar(255),
uploadforbid varchar(255),
uploadenabled number(1) default 1 not null,
uploaddir varchar(255) not null,
uploadpath varchar(255) not null,
uploadmaxdirmb decimal(5,2) default 4.0 not null,
uploadmaxfilemb decimal(5,2) default 1.5 not null,
dbversion varchar(10),
refspamwords clob
);
create table roller_properties (
name varchar(255) not null primary key,
value clob
);
create table roller_tasklock (
id varchar(48) not null primary key,
name varchar(255) not null,
islocked number(1) default 0,
timeacquired timestamp null,
timeleased integer,
lastrun timestamp null
);
create index rtl_taskname_idx on roller_tasklock( name );
create table roller_hitcounts (
id varchar(48) not null primary key,
websiteid varchar(48) not null,
dailyhits integer
);
create index rhc_websiteid_idx on roller_hitcounts( websiteid );
-- Entry attribute: metadata for weblog entries
create table entryattribute (
id varchar(48) not null primary key,
entryid varchar(48) not null,
name varchar(255) not null,
value clob not null
);
create index ea_entryid_idx on entryattribute( entryid );
alter table entryattribute add constraint ea_name_uq unique ( entryid, name );
create table rag_group_subscription (
group_id varchar(48) not null,
subscription_id varchar(48) not null
);
create index raggs_gid_idx on rag_group_subscription(group_id);
create index raggs_sid_idx on rag_group_subscription(subscription_id);
create table rag_config (
id varchar(48) not null primary key,
default_group_id varchar(48),
title varchar(255) not null,
description varchar(255),
site_url varchar(255),
output_dir varchar(255),
cache_dir varchar(255) not null,
template_dir varchar(255),
main_page varchar(255),
admin_name varchar(255),
admin_email varchar(255) not null,
group_page varchar(255),
proxy_host varchar(255),
proxy_port integer default -1
);
create table rag_group (
id varchar(48) not null primary key,
handle varchar(255) not null,
title varchar(255) not null,
description varchar(255),
cat_restriction clob,
group_page varchar(255),
max_page_entries integer default 30,
max_feed_entries integer default 30
);
alter table rag_group add constraint ragg_handle_uq unique ( handle );
create table rag_subscription (
id varchar(48) not null primary key,
title varchar(255),
feed_url varchar(255) not null,
site_url varchar(255),
author varchar(255),
last_updated timestamp,
inbound_links integer default -1,
inbound_blogs integer default -1
);
alter table rag_subscription add constraint rags_feed_url_uq unique ( feed_url );
create table rag_entry (
id varchar(48) not null primary key,
subscription_id varchar(48) not null,
handle varchar(255),
title varchar(255),
guid varchar(255),
permalink clob not null,
author varchar(255),
content clob,
categories clob,
published timestamp not null,
updated timestamp
);
create index rage_sid_idx on rag_entry(subscription_id);
-- *****************************************************
-- Now add the foreign key relationships
-- user, role and website
alter table website add constraint ws_userid_fk
foreign key ( userid ) references rolleruser ( id ) ;
alter table userrole add constraint ur_userid_fk
foreign key ( userid ) references rolleruser( id ) ;
-- page, entry, category, comment
alter table webpage add constraint wp_websiteid_fk
foreign key ( websiteid ) references website( id ) ;
alter table weblogentry add constraint we_websiteid_fk
foreign key ( websiteid ) references website( id ) ;
alter table weblogentry add constraint wc_categoryid_fk
foreign key ( categoryid ) references weblogcategory( id ) ;
alter table weblogcategory add constraint wc_websiteid_fk
foreign key ( websiteid ) references website( id ) ;
alter table roller_comment add constraint co_entryid_fk
foreign key ( entryid ) references weblogentry( id ) ;
alter table entryattribute add constraint att_entryid_fk
foreign key ( entryid ) references weblogentry( id ) ;
-- referer
alter table referer add constraint ref_entryid_fk
foreign key ( entryid ) references weblogentry( id ) ;
alter table referer add constraint ref_websiteid_fk
foreign key ( websiteid ) references website( id ) ;
-- folder and bookmark
alter table folder add constraint fo_websiteid_fk
foreign key ( websiteid ) references website( id ) ;
-- alter table folder add constraint fo_parentid_fk
-- foreign key ( parentid ) references folder( id );
alter table bookmark add constraint bm_folderid_fk
foreign key ( folderid ) references folder( id ) ;
-- newsfeed
alter table newsfeed add constraint nf_websiteid_fk
foreign key ( websiteid ) references website( id ) ;
-- pingtarget, autoping, pingcategory
alter table pingtarget add constraint pt_websiteid_fk
foreign key (websiteid) references website(id) ;
alter table autoping add constraint ap_websiteid_fk
foreign key (websiteid) references website(id) ;
alter table autoping add constraint ap_pingtargetid_fk
foreign key (pingtargetid) references pingtarget(id) ;
alter table pingcategory add constraint pc_autopingid_fk
foreign key (autopingid) references autoping(id) ;
alter table pingcategory add constraint pc_categoryid_fk
foreign key (categoryid) references weblogcategory(id) ;
-- THE FOLLOWING CONSTRAINTS CAN NOT BE SUPPORTED FOR IMPORTING new-user.xml
-- alter table website add constraint website_defaultpageid_fk foreign key ( defaultpageid ) references webpage ( id );
-- alter table website add constraint website_weblogdayid_fk foreign key ( weblogdayid ) references webpage ( id );
-- alter table webpage add constraint webpage_websiteid_fk foreign key ( websiteid ) references website( id );
发表评论
-
Is Java 8 the fastest JVM ever? Performance benchmarking of Fork-Join
2014-08-16 14:48 495http://zeroturnaround.com/rebel ... -
Intellij IDEA 9设置
2010-08-05 16:55 2466http://blog.163.com/mig3719@126 ... -
引用他人文章
2009-12-29 09:02 904一种优雅的流行架构:Struts+Spring+Hiberna ... -
Jbpm url
2008-11-06 09:59 864http://www.blogjava.net/chengan ... -
输入框有效性验证函数.比如空,年龄,姓名,整数.........
2008-05-20 10:49 1426//函数名:chksafe //功能介绍:检查是否含 ... -
JAVA hibernate代码和bo类的生成步骤
2007-01-20 11:36 25811:解压文件到D:\TOOL\Middlegen-Hib ... -
数据库新建和倒数据
2007-01-15 17:39 1788新建数据库 1:新建两个表空间,一个用于数据库 ... -
Oracle数据库的启动和停止
2007-01-15 17:37 3100<o:p> </o:p> 1:启动&l ... -
ant工程发布
2007-01-15 16:59 14121、 在path里设置ant的bin目录所在路径 2、 ...
相关推荐
- **创建数据库**:根据需要选择合适的数据库类型(如 MySQL 或 Oracle)并创建一个新的数据库用于存储 Roller 的数据。 - **检查 JDBC 驱动**:确保已经正确安装了与所选数据库兼容的 JDBC 驱动程序。 - **特殊注意...
博主通过个人实践,详细讲述了如何将Roller部署到Tomcat服务器上,并分享了在源码层面的一些探索,这对于想要深入了解Roller或者想要开发基于Roller的应用的开发者来说,具有很高的参考价值。 【知识点详解】: 1....
总的来说,安装和使用roller不仅涉及到基本的Web应用部署,还涵盖了Java开发、数据库管理、源码理解和工具应用等多个方面。通过这个过程,开发者可以提升自己的技术水平,为后续的项目开发积累宝贵经验。
1. `mysql-connector-java-5.1.20-bin.jar`:这是一个MySQL数据库驱动包,表明Roller可能使用MySQL作为其默认的数据存储。使用这个驱动,Java应用程序(如Roller)可以连接到MySQL服务器,执行SQL查询,存储和检索...
它涵盖了安装前需要准备的内容、如何下载 Roller、如何配置 Roller 以及如何将其安装到现有的 Java 应用服务器和关系数据库中。此外,还提供了一个适用于高级用户的 5 分钟快速安装选项。 #### 版权与商标信息 本...
在3DMAX中,卷曲修改器是实现复杂动态效果的重要工具,而Roller正是这样一款专为卷曲效果设计的插件。这款插件能够帮助用户轻松创建出卷曲形状的模型,不仅限于静态的造型,还能生成逼真的卷曲和展开的动画效果。 ...
Apache Roller是一个全功能,多用户和组博客服务器,适合大型和小型博客网站。它运行一个Java Web应用程序应该能够运行在...本人用myeclipse 8.6 进行了整合,部署项目时请用 此版本的 myeclipse 即可。仅供学习参考
- Roller4.0.1: Roller博客系统的版本号,也是搭建的目标版本。 - Apache Roller: 为Apache软件基金会下的一个开源项目,通过上述提供的下载链接可以获取Roller的源码和压缩文件。 3. **配置步骤**: - 数据库...
这些文件包含了Roller 5的源代码、配置文件、静态资源和依赖库,为部署到Tomcat做好了准备。 安装过程相当简单,只需要将解压后的"roller-weblogger-5.0.0-tomcat"目录复制到Tomcat的webapps目录下。然后,启动...
3. **JDBC与数据库交互**:Roller使用JDBC进行数据库操作,提供了对多种数据库的支持。源码中包含了大量的SQL查询,以及如何使用PreparedStatement和ResultSet处理数据,这对于理解数据库连接池的使用和优化数据库...
这个压缩包"apache-roller-4.0.1"包含了Apache Roller的第4.0.1版本,这是一个基于Java技术构建的Web应用程序。接下来,我们将深入探讨Apache Roller的核心功能、特性以及与Java相关的技术细节。 1. **Apache ...
7. 更新模板:在不丢失自定义设置的情况下更新roller版本的建议。 以上内容基于一般的软件安装、用户使用和模板定制流程,实际操作可能会因roller的具体实现而有所不同。如果需要更详细的信息,需要查阅roller的...
在部署Roller Weblogger时,需要一个支持Java EE的服务器(如Tomcat),将项目解压至服务器的webapps目录下,配置好数据库连接参数,即可启动服务。 通过对"roller-weblogger-5.0.0-source.zip"的深入分析,我们...
打开官方发布的可直接发布的部署包apache-roller-4.0\apache-roller-4.0\webapp\roller的目录,将该目录下面除了web-inf目录的其他所有文件复制到自建项目的/WebRoot目录下面 自建项目目录结构: (myeclipse建立的...
目前的最新版本是5.0。 Roller v5.0更新说明: Media blogging features OpenID for user logins OAuth for AtomPub authentication Simple multi-domain support Code base improvements
数据库迁移(Migrations)是Laravel中的一个重要特性,它允许开发者以版本控制的方式管理数据库结构。在"roller"项目中,可能包含创建`roles`、`permissions`和`users`等表的迁移文件。 六、总结 "Laravel开发-...
源代码包"apache-roller-src-4.0.1"是Roller项目的4.0.1版本的源码,对开发者来说,这是一个深入了解Roller工作原理和学习Java Web开发的宝贵资源。 1. **Java技术栈**: Apache Roller的源代码基于Java语言编写,...