Installing Liferay Portal 6.1.30EE under JBoss EAP 6.1.1 on Windows 8
I've been working on a project for a client implementing a new portal application to replace their aging WebSphere installation. The technology stack chosen was Java, SQL Server, JBoss EAP, IIS, Windows Server, and finally Liferay portal.
This is the first in a multi-part series on configuring Liferay to run within the environment described above.
Part 0 - Prerequisites
I am assuming you have a Windows 2008+ server (or Windows 7/8) and can comfortably install the prerequisites for running an application server and a portal. These pre-requisites include:
- Windows O/S - I'll be using windows 8, but I've confirmed the steps are the same on Server 2008 & Server 2012
- Java - I'm using Oracle JDK 1.7u40 64-bit version, I put my sdk in c:\java and the jre in c:\java\jre
- Microsoft SQL Server - I'm using SQL 2012, 2008/2005 should work the same
- IIS 7.5
- Application Request Routing
- You've set your JAVA_HOME and JAVA environment variables correctly.
Part 1 - JBoss EAP 6.1 on Windows
Just getting the application server running takes several steps. Since JBoss doesn't come with an "installer" we will be extracting the zip file and configuring the server by hand. It really isn't that hard.
Part 1.a Create Liferay home folder
Since Liferay prefers to run on a dedicated application server, the first step is to create your Liferay home folder. I'm using C:\Liferay\LiferayPortal6.1.30\ as my Liferay home folder. The reason for this is because I'm writing this using my workstation, and I will be installing Liferay portal 6.2.1 in another directory right beside my older Liferay install to test upgrade procedures. Your environment say be best suited by using a separate volume with only a folder "Liferay" in the root. I wouldn't recommend putting the liferay install directly on the root of a volume, but it should work that way in theory.
Create your liferay home folder:
C:
md C:\liferay\LiferayPortal6.1.30\
cd C:\liferay\LiferayPortal6.1.30\
Part 1.b "Install" JBoss
Extract the contents of the jboss-eap-6.1.1.zip folder to your newly created Liferay home folder. The Liferay home folder should have a single folder under it called jboss-eap-6.1. There really isn't anything else to getting JBoss "installed". *Note: I've found that the Windows Explorer built-in zip file handler is basically horrible. Use a decent extractor like
7-Zip to work with these archives.
Part 1.c Add Management User
Navigate to the jboss-eap-6.1\bin folder and use the add-user.bat script to create a new management user.
C:\Liferay\LiferayPortal6.1.30\jboss-eap-6.1\bin>add-user
What type of user do you wish to add?
a) Management User (mgmt-users.properties)
b) Application User (application-users.properties)
(a): a
Enter the details of the new user to add.
Realm (ManagementRealm) :(just press enter)
Username : jbharris
Password :
Re-enter Password :
About to add user 'jbharris' for realm 'ManagementRealm'
Is this correct yes/no? yes
Added user 'jbharris' to file 'C:\Liferay\LiferayPortal6.1.30\jboss-eap-6.1\standalone\configuration\mgmt-users.properties'
Added user 'jbharris' to file 'C:\Liferay\LiferayPortal6.1.30\jboss-eap-6.1\domain\configuration\mgmt-users.properties'
Is this new user going to be used for one AS process to connect to another AS process?
e.g. for a slave host controller connecting to the master or for a Remoting connection for server to server EJB calls.
yes/no? no
Press any key to continue . . .
C:\Liferay\LiferayPortal6.1.30\jboss-eap-6.1\bin>
Part 1.d Fire up JBoss
Now you can start your JBoss EAP 6.1 portal using the basic/standalone configuration. Run standalone.bat to fire up the server.
C:\Liferay\LiferayPortal6.1.30\jboss-eap-6.1\bin>standalone.bat
Calling "C:\Liferay\LiferayPortal6.1.30\jboss-eap-6.1\bin\standalone.conf.bat"
Setting JAVA property to 'c:\java\bin\java'
===============================================================================
JBoss Bootstrap Environment
JBOSS_HOME: C:\Liferay\LiferayPortal6.1.30\jboss-eap-6.1
JAVA: c:\java\bin\java
JAVA_OPTS: -XX:+TieredCompilation -XX:+UseCompressedOops -Dprogram.name=standalone.bat -Xms1303M -Xmx1303M -XX:MaxPermSize=256M -Djava.net.preferIPv4Stack=tru
e -Djboss.modules.system.pkgs=org.jboss.byteman
===============================================================================
09:57:23,064 INFO [org.jboss.modules] (main) JBoss Modules version 1.2.2.Final-redhat-1
09:57:23,181 INFO [org.jboss.msc] (main) JBoss MSC version 1.0.4.GA-redhat-1
09:57:23,221 INFO [org.jboss.as] (MSC service thread 1-6) JBAS015899: JBoss EAP 6.1.1.GA (AS 7.2.1.Final-redhat-10) starting
09:57:23,855 INFO [org.xnio] (MSC service thread 1-12) XNIO Version 3.0.7.GA-redhat-1
09:57:23,856 INFO [org.jboss.as.server] (Controller Boot Thread) JBAS015888: Creating http management service using socket-binding (management-http)
09:57:23,861 INFO [org.xnio.nio] (MSC service thread 1-12) XNIO NIO Implementation Version 3.0.7.GA-redhat-1
09:57:23,867 INFO [org.jboss.remoting] (MSC service thread 1-12) JBoss Remoting version 3.2.16.GA-redhat-1
09:57:23,891 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 29) JBAS010280: Activating Infinispan subsystem.
09:57:23,894 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 37) JBAS011800: Activating Naming Subsystem
09:57:23,898 INFO [org.jboss.as.security] (ServerService Thread Pool -- 42) JBAS013171: Activating Security Subsystem
09:57:23,901 INFO [org.jboss.as.webservices] (ServerService Thread Pool -- 46) JBAS015537: Activating WebServices Extension
09:57:23,914 INFO [org.jboss.as.jsf] (ServerService Thread Pool -- 35) JBAS012605: Activated the following JSF Implementations: [main, 1.2]
09:57:23,926 INFO [org.jboss.as.security] (MSC service thread 1-9) JBAS013170: Current PicketBox version=4.0.17.SP2-redhat-2
09:57:23,943 INFO [org.jboss.as.connector.logging] (MSC service thread 1-10) JBAS010408: Starting JCA Subsystem (IronJacamar 1.0.19.Final-redhat-2)
09:57:23,963 INFO [org.jboss.as.naming] (MSC service thread 1-14) JBAS011802: Starting Naming Service
09:57:23,975 INFO [org.jboss.as.mail.extension] (MSC service thread 1-13) JBAS015400: Bound mail session [java:jboss/mail/Default]
09:57:24,012 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 25) JBAS010403: Deploying JDBC-compliant driver class org.h2.Dr
iver (version 1.3)
09:57:24,095 INFO [org.jboss.ws.common.management] (MSC service thread 1-16) JBWS022052: Starting JBoss Web Services - Stack CXF Server 4.1.4.Final-redhat-7
09:57:24,240 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-13) JBAS015012: Started FileSystemDeploymentService for directory C:\Liferay\L
iferayPortal6.1.30\jboss-eap-6.1\standalone\deployments
09:57:25,034 INFO [org.jboss.as.remoting] (MSC service thread 1-11) JBAS017100: Listening on 127.0.0.1:9999
09:57:25,034 INFO [org.jboss.as.remoting] (MSC service thread 1-4) JBAS017100: Listening on 127.0.0.1:4447
09:57:25,045 INFO [org.apache.coyote.http11] (MSC service thread 1-6) JBWEB003001: Coyote HTTP/1.1 initializing on : http-/127.0.0.1:8080
09:57:25,049 INFO [org.apache.coyote.http11] (MSC service thread 1-6) JBWEB003000: Coyote HTTP/1.1 starting on: http-/127.0.0.1:8080
09:57:25,145 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-15) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]
09:57:25,211 INFO [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://127.0.0.1:9990/management
09:57:25,211 INFO [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:9990
09:57:25,212 INFO [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss EAP 6.1.1.GA (AS 7.2.1.Final-redhat-10) started in 2404ms - Started 123 of 177 serv
ices (53 services are passive or on-demand)
At this point you can open your browser and navigate to http://localhost:8080 and JBoss will display the default welcome content.
Check this now to make sure your most basic config works. If you aren't getting this content you should stop now and confirm the previous steps. Check your console output to make sure there aren't any configuration or permission errors.
You should also make sure your user account was created properly by clicking the "Administration Console" link and giving it the credentials you set up. You should get the server status screen.
Notice the url is actually now http://localhost:9990/. You will be returning to this URL again and again to tweak JBoss's settings.
In the next installment we will be deploying the Liferay portal dependencies and configuring JBoss to run Liferay.