Building and Deploying Instructions for:
Anchor | |||||
---|---|---|---|---|---|
|
uPortal Full-Source Version
Download the latest version of uPortal from the downloads page
...
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.
...
Code Block |
---|
##### Replace server.home with the location of Tomcat 6 on your machine ##### # path to tomcat binaries server.home=/path/to/tomcat |
Step 2. Configure filters
1. NEW: In the filters folder, locate the default local.properties file and configure the Database Connection Settings, uPortal Server Configuration Properties, and CAS 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).
Code Block |
---|
### HSQL Configuration environment.build.hsql.port=8887 # ## Database Connection Settings (Uncomment the Maven Filters 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 # uPortal server configuration properties environment.build.uportal.server=localhost: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=localhost:8080 environment.build.cas.protocol=http |
For uPortal Version 4.0.7+
Specify Logging Variables
The filters/local.properties file also has a place to specify the location of the log file, default logging level, and log file data pattern so you can change them in one place and have them affect all bundled portlets.
Code Block |
---|
# Log4J values applied to portlets and portals. See log4j.properties file # in WEB-INF or resources directory for each portlet. This provides a # single point of control for most logging. environment.build.log.rootLevel=INFO # Directory to place portal and portlet log files into. environment.build.log.logfileDirectory=${catalina.base}/logs # Assume a DailyRollingFileAppender is used. Set the pattern to daily log-file roll-overs. # Can also set to hourly, weekly, etc. Use '.'yyyy-MM-dd-HH for hourly. # See http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/DailyRollingFileAppender.html environment.build.log.rollingLogFileDatePattern=yyyy-MM-dd # Pattern to specify format of each log file entry. See http://logging.apache.org/log4j/1.2/apidocs/index.html. environment.build.log.layoutConversionPattern=%5p [%t] %c{2}.[%x] %d{ISO8601} - %m%n environment.build.logback.layoutConversionPattern=%-5level [%thread] %logger{36} %d{ISO8601} - %msg%n # LDAP server connection settings (optional) # To connect to LDAP, provide your connection information here and uncomment one # or both integration beans in uportal-war/src/main/resources/properties/contexts/ldapContext.xml environment.build.ldap.url= environment.build.ldap.baseDn= environment.build.ldap.userName= environment.build.ldap.password= |
Info | ||
---|---|---|
| ||
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. |
Warning |
---|
Make sure you use the clean command when making a switch between filters. (See example commands below) |
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:
- DB2
- HypersonicSQL
- MSSQL ( jTDS JDBC Driver)
- MySQL
- Oracle
- PostgreSQL
- Sybase SQL Server
- JNDI managed DataSources
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:
No Format | ||||||
---|---|---|---|---|---|---|
| ||||||
<!-- In older versions prior to uPortal 4.0.10 --> shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar <!-- In uPortal 4.0.10+, shared/classes is NOT necessary: -> shared.loader=${catalina.base}/shared/lib/*.jar |
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.
- 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:
Code Block | ||
---|---|---|
| ||
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000" redirectPort="8443" emptySessionPath="true"/>
|
Code Block | ||
---|---|---|
| ||
<Context sessionCookiePath="/"> |
Note |
---|
JVM Heap ConfigurationuPortal 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 The line you add should go just before the line starting call “%EXECUTABLE%”… On Linux/Unix/OS X |
Step 5: Deploy uPortal
Warning |
---|
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
No Format |
---|
ant initportal |
Step 6: Restart Tomcat
No Format |
---|
$TOMCAT_HOME/bin/shutdown.sh $TOMCAT_HOME/bin/startup.sh |
Step 7: Access uPortal
No Format |
---|
http://localhost:8080/uPortal/ |
...
If everything has been installed correctly you should see the out-of-the-box uPortal screen below
Anchor |
---|
...
|
...
|
uPortal Quick-Start
Step 1: Untar the package
After downloading the uPortal quickstart version untar the package as follows
No Format |
---|
tar -xvf uPortal-4.x-quick-start.tar.gz |
Step 2: Set up JAVA_HOME
Make sure the JAVA_HOME environment variable is set
No Format |
---|
export JAVA_HOME=/path/to/java |
Step 3: Startup uPortal
Start uPortal by running the ant command from inside the uPortal-4.x-quick-start directory
No Format |
---|
ant start |
Step 4: Access uPortal
No Format |
---|
http://localhost:8080/uPortal/ |
If everything has been installed correctly you should see the out-of-the-box uPortal screen below
Step 5: Stop uPortal
No Format |
---|
ant stop |
Note |
---|
For detailed instructions, read the README.txt file located in the uPortal-4.x-quick-start directory. |
...