站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss Portal 2.2 User Guide 英文版用户使用指南文档

Chapter 2. Installation - JBoss Portal 2.2 User Guide 英文版用户使用指南文档

Chapter 2. Installation

Thomas Heute

2.1. Install Overview

There are a couple of archives that you will need to download in order to install JBoss Portal.

2.1.1. JBoss Application Server

Of course you will need to install JBoss Application Server prior to install JBoss portal, if you didn't do so yet, please install JBoss 4.0.3SP1 from Sourceforge .

2.1.2. Getting the JBoss Portal files

You can download JBoss portal in different ways, packaged in binaries, sources or from the CVS.

  • Packaged: From the JBoss portal project page
  • CVS 2.2 HEAD (The most up to date sources at your own risks): cvs -d :pserver:anonymous@anoncvs.forge.jboss.com:/cvsroot/jboss co jboss-portal-2.2

Warning

Do not attempt to get jboss-portal module. The latest stable release is jboss-portal-2.2, and the latest in-development release is jboss-portal-2.4

2.1.3. Database

You will need a database to store the data of the system, you can use any database supported by Hibernate. We have tested JBoss Portal on the following, but other should work just the same:

  • MySQL DB

  • Hypersonic DB

  • PostGreSQL

  • Oracle 10g

2.1.4. JDBC connector

You must make sure that your JDBC connector for your database is under $JBOSS_HOME/server/default/lib. The MySQL JDBC connector is available here , the postgreSQL JDBC connector is available here .

2.2. Setting up your environment

2.2.1. Database

All databases supported by hibernate are support by JBoss Portal. Below is a generic ordered list of steps that should be followed on any DB:

  1. Create a new Database. For MySQL we name it jbossportal .

  2. Give access rights to whatever user with whatever password to this new database. For MySQL we create a user " portal " and give him a password " portalpassword ", and grant him rights to the jbossportal DB.

Note

All database tables will be created for you at runtime. The only thing you need to make certain is that there is a database created, a working JDBC connector, and that the user/password combination works.

2.2.2. JBoss AS Configuration

If you need a custom setup of JBoss AS, you should read the documentation about JBoss application server. In our case, we will use the default configuration shipped with JBoss AS 4.0.3SP1.

2.3. Deploying JBoss Portal

2.3.1. From the binaries

The downloaded archive contains the following files:

  • jboss-portal.sar
  • /setup/portal-*-ds.xml

Note

It is important that you configure the correct datasource file under /setup. There are a few already created for support of popular databases. You can also create your own. Please verify that the username, password, url, and driver-class are correct for your flavor of DB. You can deploy the datsource file by itself to test, in advance.

  1. Copy/Move jboss-portal.sar, and your configured portal datasource file to $JBOSS_HOME/server/default/deploy

2.3.2. From the sources

  1. At this stage you should have jboss-4.0.3SP1 installed. First you need to setup JBOSS_HOME environment variable and point it to the root path of the JBoss AS install (ie. C:\jboss-4.0.3SP1) otherwise you won't be able to compile JBoss Portal. To do so go to Start > Settings > Control Panel > System > Advanced > Environment Variables , and add the JBOSS_HOME environment variable. Or do export JBOSS_HOME=/path/to/your/jboss/directory on a Unix-like system.

  2. First, build the sources and deploy them, go to jboss-portal-2.0/build and type sh build.sh deploy, you should read BUILD SUCCESSFUL at the end of the operation. This operation should have copired the jboss-portal.sar to your $JBOSS_HOME/server/default/deploy directory.

    Warning

    Make sure that JBOSS_HOME is still defined in the environment or it will not work.

  3. Now you will need to build the datasource files for DB access. To do so go to jboss-portal-2.0/core and type sh build.sh datasource . It will create all the files under jboss-portal-2.0\core\output\resources\setup.

    Note

    It is important that you configure the correct datasource file jboss-portal-2.0\core\output\resources\setup. There are a few already created for support of popular databases. You can also create your own. Please verify that the username, password, url, and driver-class are correct for your flavor of DB. You can deploy the datsource file by itself to test, in advance.

  4. Before you deploy the application by itself, you will need to have the database deployment descriptor (portal-*-ds.xml) in the $JBOSS_HOME\server\default\deploy directory. To do so copy the correct portal-*-ds.xml file in to the /deploy directory.

  5. You will also need to put the jar file of your database connector in $JBOSS_HOME\server\default\lib , if you have not already done so.

2.4. Running JBoss Portal

Now you can start JBoss AS by going into $JBOSS_HOME/bin and typing run . All database tables, cms directories, and initial content for each will be created/inserted during the startup process, if it does not exist.

Using your browser, navigate to http://localhost:8080/portal and you should see the portal.

2.4.1. Logging in

You can now use the UserPortlet (top-left) to login. Two default accounts exist:

  • user/user
  • admin/admin