---
title: "jetspeed 安装及数据库配置"
author: "huhai"
date: "2010-03-06T22:35:38Z"
tags: ["Ant", "Apache", "PostgreSQL", "maven", "配置管理"]
categories: ["企业架构"]
slug: "jetspeed"
draft: false
lastmod: "2010-03-06T22:35:38Z"
id: 609446
url: "https://huhai.iteye.com/blog/609446"
---

安装：

1.首先到[http://portals.apache.org/jetspeed-2/getting-started-installer.html](http://portals.apache.org/jetspeed-2/getting-started-installer.html) 下载jetspeed 的安装jar包。demo版的内容更全 一些。

（下面两步要进行的是下载配置，ant和maven，这两步是从网上搜到的具体需不需要有待验证，但感觉ant应该还是需要的）

2.去[http://ant.apache.org/](http://ant.apache.org/)下载ant，我用的是1.7.1版本，2.0版本下载下来里面没有bin文件夹没搞懂怎么用。配置ant，将下载的          apache-ant-1.7.1.zip解压，然后将该文件夹下的bin路径加入到系统path中。 进入cmd输入ant,出现Buildfile: build.xml does not exist! Build failed。 表示配置成功。

3.去[http://maven.apache.ort](http://maven.apache.ort/) 下载apache-maven-2.2.1，同2中的方法，设置bin路径到path变量。进入cmd输入mvn --version,出现版本信息，则表示配置成功。

（数据库配置：postgresql，其他的数据库一样配置）

4.先在数据库管理界面中建立一个数据库，姑且叫做jetspeed

5.现在可双击jetspeed的jar包进行安装。在进行数据库的选择时选择PostgreSQL,然后输入数据库的用户名，密码，jdbc的连接字符串，此处注意要将&lt;dbname&gt;替换为jetspeed，然后就继续next。

6.最后install ，finish 完成后会出现一个错误（针对PostgreSQL而言，其他一般应该不会）显示在database的builder.xml文件的126行有错。（原因是：该行中代码src="${basedir}/${db.type}/drop-schema.sql 中${db.type}的定义是在database.properties中，但该值为db.type=postgres,也就是说src被解析成了./postgres/drop-schema.sql。但进入database文件夹发现没有postgres文件夹，只有postgresql文件夹）需要将database.properties中的db.type赋值为postgresql。

7.cmd下进入C:\\Apache\\Jetspeed-2.2.0\\database（默认安装的目录），然后运行ant，这时应该就能successful了。

8.进入C:\\Apache\\Jetspeed-2.2.0\\bin文件夹下运行startup.bat。

8.浏览器中输入[http://localhost:8080/jetspeed](http://localhost:8080/jetspeed)就能看到网站的模板了。可通过admin amdin 登录。

通过这