User Guide - JBoss Portal


Applicable Plans: All Advanced VPS, All Premier VPS (CentOS 5 plans)

"JBoss Portal provides an open source platform for hosting and serving a portal's Web interface, publishing and managing its content, and customizing its experience. While most packaged Portal frameworks help enterprises launch Portals more quickly, only JBoss Portal delivers the benefits of a zero-cost open source license combined with a flexible and scalable underlying platform."

From the jboss.org website

 

This User Guide explains how to deploy JBoss Portal using JBoss with MySQL and PostgreSQL. It also explains how to use Apache as a front end to JBoss Portal, which is required if you want to use any application services that are dependent on the Apache web server. The JBoss Portal application that is available in your eApps Hosting plan is a bundle which includes the JBoss Application Server and the JBoss Portal application.

Requirements

JBoss Portal is only available on plans running the CentOS 5 operating system and higher. To determine what operating system your plan is running, login to your Control Panel, and from the My Account tab click on Subscriptions, then click on the subscription for your hosting plan. At the top of the page is information about your hosting plan, including the Operating System. If your plan is not running a CentOS 5 or higher operating system, please contact billing@eapps.com for information on how to move to a newer version of your plan.

When using JBoss Portal, you will not be able to install the stand alone versions of Tomcat, GlassFish or JBoss from your control panel.

You will need to install JBoss Portal with either MySQL and MySQL-Connector-J or PostgreSQL and PostgreSQL-JDBC-Driver database server and connector. You will also need to install Java 5 or Java 6 for the JBoss server to successfully start. We recommend that you use Java 6. If you did not select these applications when you placed your initial order, they can be installed from your Control Panel > System tab > Add Application area as described later in this User Guide.

Using JBoss Portal with MySQL (use the instructions in this section if you want to use MySQL. PostgreSQL users should skip to the next section)

Installing JBoss Portal, MySQL, MySQL-Connector-J and Java

If you have not yet installed some or all of these applications, then do the following.
  1. Log into your control panel.

  2. From the System tab click Add Application.

  3. Select the check box next to JBoss-Portal, MySQL-5, MySQL-Connector-J and Java-SE-5 or Java-SE-6.

  4. Click the Next button on the bottom right.

It will take about 5 to 10 minutes for the installations to complete. You can confirm by checking the list of installed applications from your System tab -> All Applications area. Since the installation is a bundled JBoss AS, the files will be located in /opt/jboss4/server/default/deploy/jboss-portal.sar of your VPS. After the applications are successfully installed take the steps below to enable MySQL support. 

Enabling MySQL

  1. From your control panel System tab Database Management area click Databases.

  2. Click Add Database.

  3. In the Database Name field type jbossportal and click save.

  4. Type your desired database username and password in the field and click save.

  5. SSH into your VPS. See our ssh guide at http://support.eapps.com/hsp/ssh if needed.

  6. Stop JBoss by executing /etc/init.d/jboss4 stop

  7. cd /opt/jboss4/server/default/deploy.

  8. Using nano (recommended for new users) or vi open the portal-jboss-ds.xml file.

  9. Locate the <!-- MySQL 5 Data Source Configuration --> and the <!-- HSQLDB Data Source Configuration --> datasources sections and modify them to look like below.

 

<!-- MySQL 5 Data Source Configuration -->


<datasources>

    <local-tx-datasource>

        <jndi-name>PortalDS</jndi-name>

        <connection-url>jdbc:mysql://localhost:3306/jbossportal?useServerPrepStmts=false$

        <driver-class>com.mysql.jdbc.Driver</driver-class>

        <user-name>portal</user-name>

        <password>portal</password>

    </local-tx-datasource>

</datasources>


Note: user-name and password above are the values you assigned in step 4.


<!-- HSQLDB Data Source Configuration -->

<!--

<datasources>

    <local-tx-datasource>

        <jndi-name>PortalDS</jndi-name>

        <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}portal${/}hypersonic${/}$

        <driver-class>org.hsqldb.jdbcDriver</driver-class>

        <user-name>sa</user-name>

        <password><![CDATA[]]></password>

    </local-tx-datasource>

</datasources>

-->

 

Save the file and start JBoss by executing /etc/init.d/jboss4 start.

You can now use your JBoss Portal installation at http://yourdomain.com:8080/portal . The user and password is in your control panel -> System tab -> JBoss-Portal area.

 

Using JBoss Portal with PostgreSQL (use the instructions in this section if you want to use PostgreSQL. MySQL users should use instructions in the previous section)

Installing JBoss Portal, PostgreSQL, PostgreSQL-JDBC-Driver, phpPgAdmin and Java

If you have not yet installed some or all of these applications, then do the following.
  1. Log into your control panel.

  2. From the System tab click Add Application.

  3. Select the check box next to JBoss-Portal, PostgresSQL-8, PostgreSQL-JDBC-Driver, phpPgAdmin and Java-SE-5 or Java-SE-6.

  4. Click the Next button on the bottom right.

It will take about 5 to 10 minutes for the installations to complete. You can confirm by checking the list of install application from your System tab -> All Application area. Since the installation is a bundled JBoss AS, the files will be located in /opt/jboss4/server/default/deploy/jboss-portal.sar of your VPS. After the applications are successfully installed take the steps below to enable PostgreSQL support.

Enabling PostgreSQL

  1. Log into phppgadmin

  2. Click Database then Create database.

  3. In the Name field type jbossportal.

  4. Select UTF8 as the Encoding and Click Create.

  5. Click Roles then Create role.

  6. In the Name and Password fields fill in your desired username and password.

  7. Select the Check box for Create BD? and Can login?.

  8. Click Create.

  9. SSH into your VPS. See our ssh guide at http://support.eapps.com/hsp/ssh if needed.

  1. Stop JBoss by executing /etc/init.d/jboss4 stop.

  2. cd /opt/jboss4/server/default/deploy.

  3. Using nano (recommended for new users) or vi open the portal-jboss-ds.xml file.

  1. Locate the <!-- PostgreSQL Data Source Connfiguration --> and <!-- HSQLDB Data Source Configuration --> datasources sections and modify them to look like below.

 

<!-- PostgreSQL Data Source Connfiguration -->

<datasources>

    <local-tx-datasource>

        <jndi-name>PortalDS</jndi-name>

        <connection-url>jdbc:postgresql:jbossportal</connection-url>

        <driver-class>org.postgresql.Driver</driver-class>

        <user-name>portal</user-name>

        <password>portal</password>

    </local-tx-datasource>

</datasources>


Note: username and password above are the values you assigned in step 4.


<!-- HSQLDB Data Source Configuration -->

<!--

<datasources>

    <local-tx-datasource>

        <jndi-name>PortalDS</jndi-name>

        <connection-url>jdbc:hsqldb:${jboss.server.data.dir}${/}portal${/}hypersonic${/}database</connection-url>

        <driver-class>org.hsqldb.jdbcDriver</driver-class>

        <user-name>sa</user-name>

        <password><![CDATA[]]></password>

    </local-tx-datasource>

</datasources>

-->

Save the file and start JBoss by executing /etc/init.d/jboss4 start.

 

You can now use your JBoss Portal installation at http://yourdomain.com:8080/portal . The user and password is in your control panel -> System tab -> JBoss-Portal area.

 

Changing the context path

After installation, the main page of Jboss Portal is accessible at http://yourdomain.com:8080/portal. You may want to change it to http://yourdomain.com:8080 or something other then /portal.

If you wanted to change your URL to http://yourdomain.com:8080 you will make the changes below.

  1. SSH into your VPS. See our ssh guide at http://support.eapps.com/hsp/ssh if needed.

  2. cd /opt/jboss4/server/default/deploy/jboss-web.deployer/ROOT.war/WEB-INF.

  3. Using nano (recommended for new users) or vi create a new file call jboss-web.xml and add the lines below. This will change the JBoss default page to /jboss-root.

 

<jboss-web>

<context-root>/jboss-root</context-root>

</jboss-web>

 

  1. Save the file.

  2. cd /opt/jboss4/server/default/deploy/jboss-portal.sar/portal-server.war/WEB-INF

  3. Open the jboss-web.xml file and modify it to look like below.

 

<jboss-web>

    <security-domain>java:jaas/portal</security-domain>

    <context-root>/</context-root>

    <replication-config>

        <replication-trigger>SET</replication-trigger>

    </replication-config>

    <resource-ref>

        <res-ref-name>jdbc/PortalDS</res-ref-name>

        <jndi-name>java:PortalDS</jndi-name>

    </resource-ref>

</jboss-web>

 

  1. Save the file and restart JBoss by executing /etc/init.d/jboss4 restart.

 

To change the default /portal to something else such as /intranet, SSH into your and apply steps 4 to 7 from the Changing the context root above except you will change <context-root>/</context-root> to <context-root>/intranet</context-root>.

 

Configuring Apache as a Front End Using mod_jk and mod_proxy_ajp

You can use your Apache Web Server as a front end to JBoss to eliminate the need to use the 8080 in the URL above. To do this you can either use mod_jk or mod_proxy_ajp.

Using mod_jk

To use mod_jk first install mod_jk from your control panel system tab -> Add Application area.

  1. Click Site tab.

  2. If the site you want to configure is not selected click Select Another Site and select it.

  3. Click Website Settings.

  4. Click the Custom Settings tab -> Edit and add the lines below.

 

If you have set your context-root to / then add the lines below.

JkMount /* ajp13

 

# Directives to enable Apache to continue serving applications dependent on it.

SetEnvIf Request_URI "/webmail*" no-jk

SetEnvIf Request_URI "/mail*" no-jk

SetEnvIf Request_URI "/awstats*" no-jk

SetEnvIf Request_URI "/myadmin*" no-jk

SetEnvIf Request_URI "/pgadmin*" no-jk

SetEnvIf Request_URI "/cgi-bin*" no-jk

SetEnvIf Request_URI "/openwebmail*" no-jk

 

If your context-root is the default /portal or something else such as /intranet then add the line below.

 

JKMount /portal* ajp13 or JkMount /intranet* ajp13

 

  1. Click Update the save the configuration.

Using mod_proxy_ajp

To use mod_proxy_ajp, complete steps 1 to 3 from the prior section. Click the Custom Settings tab -> Edit and add the lines below.

If you have set your context-root to / then add these lines.

# Directives for eApps applications dependent on Apache

ProxyPass /webmail !

ProxyPass /mail !

ProxyPass /awstats !

ProxyPass /myadmin !

ProxyPass /cgi-bin !

ProxyPass /pgadmin !

ProxyPass /openwebmail !


# Directives for your application

ProxyPass / ajp://localhost:8009/

ProxyPassReverse / ajp://localhost:8009/

 

If your context-root is the default /portal or something else such as /intranet then add these lines.

ProxyPass /portal ajp://localhost:8009/

ProxyPassReverse /portal ajp://localhost:8009/

or

ProxyPass /intranet ajp://localhost:8009/

ProxyPassReverse /intranet ajp://localhost:8009/

Links to Additional Information

Documentation: http://www.jboss.org/jbossportal/docs/

User Forum: http://www.jboss.com/index.html?module=bb&op=viewforum&f=215

JBoss Blogs: http://www.jboss.org/feeds/

Comments

Please login to comment

Powered by WHMCompleteSolution