Académique Documents
Professionnel Documents
Culture Documents
1 on Windows (Part 1)
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.
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-eap6.1\standalone\configuration\mgmt-users.properties' Added user 'jbharris' to file 'C:\Liferay\LiferayPortal6.1.30\jboss-eap6.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>
JBOSS_HOME: C:\Liferay\LiferayPortal6.1.30\jboss-eap-6.1
JAVA: c:\java\bin\java
========================================================================= ======
09:57:23,064 INFO
1.2.2.Final-redhat-1 09:57:23,181 INFO redhat-1 09:57:23,221 INFO [org.jboss.as] (MSC service thread 1-6) JBAS015899: [org.jboss.msc] (main) JBoss MSC version 1.0.4.GA-
JBoss EAP 6.1.1.GA (AS 7.2.1.Final-redhat-10) starting 09:57:23,855 INFO 3.0.7.GA-redhat-1 09:57:23,856 INFO [org.jboss.as.server] (Controller Boot Thread) [org.xnio] (MSC service thread 1-12) XNIO Version
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
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)
09:57:23,943 INFO
1-10) JBAS010408: Starting JCA Subsystem (IronJacamar 1.0.19.Finalredhat-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-
(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:
09:57:25,212 INFO
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.
Part 0 - Prerequisites
As before, there are several things we need to download. The Liferay Portal Web Archive (WAR) - This can be downloaded from the Customer Portal for Enterprise Customers, or the CE version can be downloaded here: https://www.liferay.com/downloads/liferay-portal/additional-files You need to also download the Liferay Portal Dependencies from the same page. Be sure to match the version of the Portal with the Dependencies. You need to download and extract the SQL Server JDBC 4.0 driver from here: http://www.microsoft.com/en-us/download/details.aspx?id=11774
Also copy over the sqljdbc4.jar file from the SQL Server JDBC 4.0 driver. If you installed it instead of extracting the SQL Server driver's contents, it will have been put here: <install path><sqljdbc_<version>\<language>\sqljdbc4.jar.
Next, you need to create a module.xml file in the same folder as the extracted dependency jar files and paste the following content into the file: <?xml version="1.0"?>
<resources>
</resources>
<dependencies>
</dependencies>
</module> Thats it. Your dependencies are now installed and referenced. Next up, we will need to make some changes to JBoss's configuration to work with Liferay.
Step 1 - Disable the default JBoss content & turn on JSP dev settings.
Find and disable the enable-welcome-root attribute in the virtual server section under the web subsystem, then add a configuration element to the section as indicated below:
<subsystem xmlns="urn:jboss:domain:web:1.4" default-virtualserver="default-host" native="false"> <connector name="http" protocol="HTTP/1.1" scheme="http" socketbinding="http"/> <virtual-server name="default-host" enable-welcome-root="false"> <alias name="localhost"/> <alias name="atlas"/> </virtual-server> <configuration> <jsp-configuration development="true" /> </configuration> </subsystem>
</authentication> </security-domain>
If you are running the EE version of Liferay, you will also need to place the XML license file into the $jboss\..\deploy folder. This is the deploy folder one level UP from the JBoss home folder. If you are running the CE version, no license is required.
Finally, you should create a file called ROOT.war.dodeploy to indicate to JBoss that you want the contents of the ROOT.war folder deployed at runtime.
In the $jboss\bin folder, find standalone.conf.bat file and open it. edit the Java options near the bottom as follows: rem # JVM memory allocation pool parameters - modify as appropriate. set "JAVA_OPTS=-Xms1303M -Xmx1303M -XX:MaxPermSize=256M"
time, you can start JBoss and let it deploy Liferay by running the standalone.bat file in the $jboss\bin\ folder.
After a few moments (it could take a couple minutes on an older machine), a browser window should open automatically to the address http://localhost:8080 and you will see the following screen.
You can leave the default settings alone to install Liferay using the Hypersonic (HSQL) database engine.
Congratulations, you've installed Liferay on JBoss EAP 6.1. In the next installment, we will create a Liferay portal database instance on SQL Server and configure Liferay to use it, then finalize our installation by cleaning up a few folders and performing some general housekeeping tasks.
To install Application dont forget to install the private plugin installer from the Liferay page.