- JBoss Portal Server Development
- Ramanujam Rao
- 1726字
- 2021-05-21 20:13:06
Installing the server
Now that we are aware, and presumably excited about the features JBoss portal server offers, let's get started with downloading and installing it.
The following sections provide an overview of the installation process, which should be sufficient for most installs. However, for complicated scenarios or for more in-depth information, it might be a good idea to also refer to the advanced documentation provided by JBoss at http://www.jboss.org/jbossportal/ docs/index.html.
Getting the software
Just like any other open source software, getting the JBoss portal server software is as simple as going to the JBoss web site and downloading it.
The web site offers different versions of software for different installation scenarios. Options include a version packaged along with JBoss application server platform, an independent binary for installs on existing servers or clustered environments, and a version in source code format that a user can use to build a binary. This allows us to choose from a wide array of options ranging from, standalone portal servers and pre-packaged version with application servers, to building from source.
System requirements
Before we go into the details of installation, let's quickly review the minimum system requirements to run JBoss Portal Server 2.7.0
- JBoss Application Server(AS)4.2.3,JBoss Enterprise Application Platform(EAP) 4.2, and JBoss EAP 4.3. In addition to the JBoss application server, the portal is designed to work on application servers such as Weblogic and Websphere. However, it is recommended that JBoss servers are used, for maximum value.
- The portal, being a 100 percent pure Java application, is independent of the underlying platform. Thus, JBoss portal server can be successfully deployed and run on any platform that supports a Java Virtual Machine(JVM).
- JDK5
- 512 MB RAM
- Approximately 100MB hard disk space
- A minimum 400MHz CPU
- JBoss portal uses Hibernate to implement persistence. Hibernate provides extensive support for all the popular databases, hence making the portal server compatible with most databases.
Installation
The server can be installed in different ways depending on the type of software downloaded. The three versions are:
- JBoss portal and JBoss AS bundle
- JBoss portal server binary
- JBoss portal source
In the next few sections, we will discuss the server installation for each of these versions. The complexity of the installation ranges from a simple installation of the bundled software version to complex source compilation and independent installation on an existing application server.
This is probably the easiest installation method, and is recommended for anybody who is a beginner with JBoss portal, or wishes to install and explore the product. This version includes JBoss portal server and the underlying JBoss application server. The server comes with default set of configuration options along with a inbuilt Hypersonic SQL database.
We need to execute the following steps to install JBoss portal and JBoss application server bundle:
- After downloading the ZIP file containing the bundled software, extract the ZIP file into a convenient directory. Please note that in this installation method, the directory chosen is permanent and will be used for every JBoss portal artifact. In other words, there won't be any installation files or software binaries outside this directory, making it a very clean and convenient install. A typical directory on Windows is
c:\jboss-portal-2.7.0.
>After expanding the ZIP file, the structure looks like this:
- Run the executable in the
JBOSS_PORTAL_INSTALLATION/bin/
directory. The executables arerun.bat
for a Windows installation, orrun.sh
for UNIX systems. During startup, the server uses a default configuration. However, if we want to provide an alternate configuration file, we need to use the-c
option along withrun.bat
orrun.sh
. - Point your browser to the URL
, and you should see the default portal home page as shown in the following screenshot. The portal provides two accounts by default for user log-in. The login parameters for the first account are username user and password user, and for the second account are username admin and password: admin. Each of the IDs has special relevance and access rights associated with it. We will come back to this topic later when we talk about portal security, for now it is sufficient to use these IDs as listed.http://localhost:8080/portal
During the execution of the run
script, the console will show a few errors and warnings, as shown in the following screenshot. The reason is, during start-up, JBoss Portal looks for certain initial database tables and if it doesn't find them, it creates them, with a warning message. Given that this is the first time, it cannot find them. It is okay to ignore these errors and warnings.

This installation method is recommended if you want to install only the portal binary and already have a pre-existing installation of JBoss AS or JBoss EAP on which the portal will run. This method is also used when you want to install JBoss portal in a clustered environment.
The following steps should be followed to install JBoss portal binary:
- Download and extract the ZIP archive in a temporary directory. After some configuration, we will move segments of the content to the permanent, application server tree.
The binary version can be found on the same download page as was listed under the section JBoss Portal Binary.
Once extracted, the structure looks like this:
The significant difference here is that the downloadable now consists primarily of a service archive, or a sar directory called jboss-portal.sar. This is where the portal software and configurations reside. It also has a setup directory, which has datasource descriptors and configurations for various databases, so that the portal can connect to the databases on the existing server platform.
- Configure the JBoss application server or JBoss EAP. For our current purpose, it is assumed that either the JBoss application server or JBoss EAP has already been installed and configured. For more detailed documentation on the installation of these servers, please refer to the specific documentation provided by JBoss.
- Configure the database and datasources.
As mentioned earlier, the binary install option is best suited for an existing application server. Hence, the likely scenario for its use will be in a non-development environment. JBoss portal requires a database to be run. Even though JBoss application server comes with in-built support for the HypersonicSQL database, it is recommended that the portal server does not use this database beyond development. It is recommended that a separate RDBMS be installed, and the portal configured to use it.
Before we begin the configuration of the portal server, let's look at the installation and configuration of the external database, and briefly touch upon the parts that are relevant to the portal install.
To use a database with the portal, the following are the salient steps:
- i. Create a new database instance and name it, for example,
jbportal
. - ii. Grant access rights to a user on the portal that will actively use the database
jbportal
. The portal uses the user to create tables and modify data in the tables in the database. Hence, it will require the rights to do so. This same user will be used when we configure the database descriptor in the portal configuration. - iii. To connect an RDBMS database, J2EE application server leverage connectors, also called JDBC drivers, are provided by the database vendors. Drivers help connect applications, such as portals deployed on application servers, to RDBMS databases. The drivers can be found on the web sites of the database vendors. The JDBC driver
jarfile
is copied to the sever directory at$JBOSS_HOME/server/default/lib/
, where$JBOSS_HOME
is the home directory of the server installation. - iv. To configure the datasources in the portal server, we will edit the XML descriptor file corresponding to our database in the
setup
directory under the extracted portal tree discussed in Step 1.
Let's assume that our database is MySQL v5, so the descriptor we will edit is
portal-mysql5-ds.xml
.The file, edited with appropriate values, will appear as follows. Please refer to the documentation provided by the database vendor for advanced configuration options in the connection URL.
- i. Create a new database instance and name it, for example,
- Deploy the JBoss portal binary.
Once we are ready with the database and have configured our descriptor, we are ready to deploy the portal server software on the application server. The file
mysql5-ds.xml
is first copied to the$JBOSS_HOME/server/configuration/deploy/
directory, whereconfiguration
is eitherall, default, minimal
, orproduction
, depending on the type and installation of the application server. This step will ensure that the server is aware of the new database, and is ready to offer connections, when requested by the portal. However, when we add a new datasource configuration, we have to make sure that we remove the default Hypersonic SQL Db configuration file from the directory, to avoid conflicts.The whole subdirectory
jboss-portal.sar
, from the original downloaded binary as detailed in Step 1, is now copied to the$JBOSS_HOME/server/configuration/deploy/
directory, where again theconfiguration
value is set depending on the type and installation of the application server. With this, the application server is aware of the existence of the JBoss portal in a service archive format, which will automatically get deployed and started when the application server starts up. - As with the earlier install, we can now direct the browser to the URL
http://localhost:8080/portal
, and we should see the default portal home page. The userid/password options, as before, are user/user and admin/admin.During the start-up process, we should see the errors and warnings related to missing tables, as detailed in the bundled version section. Again, these can be ignored as they are simply the portal's first-time execution symptoms.
As with all open source software, JBoss portal can also be downloaded in source form and built to create a deployable artifact. Needless to say, this option is recommended only for experts and individuals who are comfortable dealing with raw source code and the complexities associated with building from source.
We will not go into a lot of detail for this installation method, as the options are broad and subject to various preferences of the user. Exhaustive and specific information on building from sources can be found on the JBoss forums and in the associated documentation.
- 中文版Photoshop入門與提高(CS6版)
- 邊做邊學:Photoshop+CorelDRAW綜合實訓教程
- 二維計算機繪圖教程:二維CAD工程師取證全程指導
- 剪映短視頻剪輯與運營全攻略:視頻剪輯+音頻處理+后期特效+運營管理
- Elasticsearch數據搜索與分析實戰
- 中文版Photoshop CC基礎培訓教程
- 零基礎學Photoshop CS6(全視頻教學版)
- 寫給大家看的PPT設計書(第2版)
- Learning Mambo: A Step/by/Step Tutorial to Building Your Website
- 剪映短視頻制作從入門到精通(手機版+電腦版)
- After Effects影視特效與電視欄目包裝實例精粹
- Photoshop CC 2018基礎與實戰教程(全彩版)
- 玩轉國潮:Procreate插畫創作及實例教程
- Photoshop淘寶網店設計與裝修完全實例教程
- After Effects CS6影視后期合成案例教程(微課版)