uPortal的安装并集成postgres数据库



前置条件

win7为例,本地必须先安装jdk,版本最好为jdk-6u45-windows-i586(以下内容均以此版本为例),之前用jdk-6u10-rc2-bin-b32-windows-i586-p-12_sep_2008是会报错的。




一、下载安装包


番禺项目和常熟项目均用的是uPortal-4.0.1,解压至本地,如:D:\install\uPortal,你会看到如下图所示的目录结构:







二、修改配置


1、修改JDBC驱动为postgresql

进入D:\install\uPortal\uPortal-4.0.1目录下,修改pom.xml文件  修改数据库连接(默认为hsqldb),修改为 postgres的连接

<!--The JDBC Driver used by uPortal

       <jdbc.groupId>org.hsqldb</jdbc.groupId>

       <jdbc.artifactId>hsqldb</jdbc.artifactId>

        <jdbc.version>${hsqldb.version}</jdbc.version>-->

       <jdbc.groupId>postgresql</jdbc.groupId>

       <jdbc.artifactId>postgresql</jdbc.artifactId>

       <jdbc.version>${postgresql.version}</jdbc.version>


2、添加postgresql依赖包

并添加对postgres的依赖,代码如下:

<dependency>

                <groupId>postgresql</groupId>

                <artifactId>postgresql</artifactId>

                <version>${jdbc.version}</version>

</dependency>

Pom.xml文件修改完毕。


注意:pom.xml文件的hsqldb的依赖先不要去掉,因为后面的uportal-war等包中也有对hsqldb的引用,删掉会报错。


3、修改D:\install\uPortal\uPortal-4.0.1\filters\local.properties文件


如下:

## HSQL Configuration

#environment.build.hsql.port=8887

## Database Connection Settings (Uncomment the MavenFilters section in rdbm.properties)

#environment.build.hibernate.connection.driver_class=org.hsqldb.jdbc.JDBCDriver

#environment.build.hibernate.connection.url=jdbc:hsqldb:hsql://localhost:${environment.build.hsql.port}/uPortal

#environment.build.hibernate.connection.username=sa

#environment.build.hibernate.connection.password=

#environment.build.hibernate.dialect=org.hibernate.dialect.HSQLDialect

environment.build.hibernate.connection.driver_class=org.postgresql.Driver

environment.build.hibernate.connection.url=jdbc:postgresql://localhost:5432/uPortal

environment.build.hibernate.connection.username=postgres

environment.build.hibernate.connection.password=postgres

environment.build.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect

# uPortal server configuration properties

environment.build.uportal.server=10.0.0.41:8080

environment.build.uportal.protocol=http

environment.build.uportal.context=/uPortal

environment.build.uportal.email.fromAddress=portal@university.edu

# CAS server configuration properties

environment.build.cas.server=10.0.0.38:8080

environment.build.cas.protocol=http


4、在目录D:\install\uPortal\uPortal-4.0.1下执行:


ant initportal

会把所有的portlet的数据库连接 等信息按照上面配置的替换掉。

这个过程比较长,等待安装过程结束,会看到“Build Success”信息则表示成功。






评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值