uPortal 4.0 Manual

Skip to end of metadata
Go to start of metadata

Building and Deploying Instructions for:

 

uPortal Full-Source Version

Download the latest version of uPortal from the downloads page

 

After you have downloaded uPortal, unpack the uPortal source outside the Tomcat container (i.e., /usr/local/src or any directory outside tomcat)

Now, we can configure your uPortal for deployment

Step 1: Configure the build.properties file

The uPortal build requires a build.properties file describing the deployment environment to be available in the root of the uPortal project.

     1. Go to your uPortal source directory and create the build.properties file by copying the build.properties.sample file to build.properties

     2. Open the build.properties for editing and configure the "server.home" property to point to the root directory of your Tomcat installation.

Step 2: Configure filters     

     1. In the filters folder, locate the default local.properties file and configure the Database Connection Settings, uPortal Server Configuration Properties,  CAS Server Configuration, Logging information, and LDAP settings. Replace localhost:8080 with your server name. Starting with uPortal 4.0.10, uPortal provides an optional mechanism to override these settings with a file that is completely outside uPortal source. This approach allows systems administrators to change these settings without rebuilding.  It also provides an easy way for adopters to keep sensitive information outside of their Source Code Management system (See Properties Files and Properties Overrides).

 

By default, uPortal 4 uses the local.properties filter file, but you can create your own filter file and build/deploy uportal using a flag for selecting the desired filter file. 

For example, I can create a new filter file named test.properties and set all my servers to point to test servers. Then, when I build and deploy uPortal I can use the flag, -Denv=test . Note, that you use the part of the file name before .properties when using the flag. This flag applies to both ant and maven. 

Icon

Make sure you use the clean command when making a switch between filters. (See example commands below)
ant clean deploy-ear -Denv=test
mvn clean install -Denv=test

Step 3: Configure your database.

Aside from entering your database server information in the local.properties filter file from Step 2, there are additional database configurations that may need to be performed. Find your selected database below and follow the steps for database-specific instruction:

Step 4: Tomcat Reminder

Just in case you missed it, don't forget to do the following configuration in your Tomcat installation

  • Shared Libraries

    • uPortal places libraries in CATALINA_BASE/shared/lib The default Tomcat 6.0 download does not enable libraries to be loaded from this directory. To resolve this you must edit CATALINA_BASE/conf/catalina.properties and change the line that begins "shared.loader=" to the following:

       

Enabling shared libraries in CATALINA_BASE/conf/catalina.properties
  • Shared Sessions

    • Jasig portlets, as well as many other popular JSR-168 portlets, rely on the ability to share user session data between the portal web application and portlet applications. To enable this feature:
      • Tomcat 6.0: add the emptySessionPath="true" parameter to the in-use connector (configured in Tomcat in CATALINA_BASE/conf/server.xml).
      • Tomcat 7.0 (for uPortal 4.0.10+):  add the "sessionCookiePath="/" to CATALINA_BASE/conf/context.xml.

 

Example Tomcat 6.0 Connector Configuration
Example Tomcat 7.0 Connector Configuration

 

 

Icon

JVM Heap Configuration

uPortal requires a larger than standard PermGen space and more heap than may be allocated by default. A good conservative set of heap settings are "-XX:MaxPermSize=300m -Xmx1024m". To add these follow the directions for your OS:

On Windows
Edit the file $TOMCAT_HOME\bin\startup.bat and insert or alter the following line, substituting for the desired values:
set CATALINA_OPTS=-XX:MaxPermSize=300m -Xmx1024m

The line you add should go just before the line starting call “%EXECUTABLE%”…

On Linux/Unix/OS X
Edit the file $TOMCAT_HOME/bin/startup.sh and insert the following line, substituting for the desired value, eg. Bash Shell:
export CATALINA_OPTS=”-XX:MaxPermSize=300m -Xmx1024m”

Step 5: Deploy uPortal

Icon

WARNING: Running the following command will reinitialize your database by dropping all tables first. Your content will be lost if you run against an existing database.

  • Run the following command to deploy uPortal and load your database

Step 6: Restart Tomcat

Step 7: Access uPortal

  • Replace localhost:8080 with your configured server path

If everything has been installed correctly you should see the out-of-the-box uPortal screen below

 

uPortal Quick-Start

Step 1: Untar the package

After downloading the uPortal quickstart version untar the package as follows

Step 2: Set up JAVA_HOME

Make sure the JAVA_HOME environment variable is set

Step 3: Startup uPortal

Start uPortal by running the ant command from inside the uPortal-4.x-quick-start directory

Environment variable conflicts

Icon

If your quick start build fails, verify you do not have CATALINA_OPTS or JAVA_OPTS environment variables set with values that might cause the build or execution to fail.

Step 4: Access uPortal

If everything has been installed correctly you should see the out-of-the-box uPortal screen below

Step 5: Stop uPortal

Icon

For detailed instructions, read the README.txt file located in the uPortal-4.x-quick-start directory.

Ant build and deployment tasks

Ant Command

Details

dbtest

This target will test your database configuration from the command-line (not present in quick-start)

initportal

The target that will deploy uPortal and load your database, but you must first set up the JDBC properties in rdbm.properties and set up the path to your servlet container in build.properties.

The "initportal" target runs all the targets necessary to deploy the portal and prepare the portal database: bootstrap, deploy-ear, db, pubchan, i18n-db.

*IMPORTANT* Do not run this task against a database the contents of which you care about, as it initializes the database by first dropping all tables.

deploy-war

The "deploy-war" target first makes sure everything is compiled and up-to-date and then copies the extracted uPortal Web Application Archive (WAR) to the location required by your servlet container as specified in build.properties.

deploy-ear

The "deploy-ear" target first makes sure everything is compiled and up-to-date and builds an Enterprise Application Archive (EAR) composed of the uPortal WAR and the WARs of all the portlets being deployed. The EAR is then extracted to the location required by your servlet container as specified in build.properties.

deployPortletApp

The "deployPortletApp" target runs the portlet Deployer tool. This tool takes a portlet WAR file, rewrites the web.xml file and deploys the results to the servlet container.

Example: "ant deployPortletApp -DportletApp=C:/TEMP/myPortlet.war"

hsql

The "hsql" target starts an HSQLDB server instance consistent with the default rdbm.properties data access configuration of uPortal. Note that this Ant target does not return in a normal execution – the Ant "build" kicks off the database server but then just keeps on running. You'll need to kill it manually, e.g. via control-C or via a stop build control in your IDE.

Additional References

Having problems with these instructions?

Please send us feedback at uportal-user@lists.ja-sig.org

  • No labels