Liferay Beginner’s Guide
上QQ阅读APP看书,第一时间看更新

Deploying Liferay on WebLogic

In this section, we will go through the steps needed to deploy Liferay on WebLogic:

  1. Continuing from where we left off, when we click on the Done button, we are presented with the QUICKSTART screen as I mentioned earlier.
    Deploying Liferay on WebLogic
  2. Let us create a domain for Liferay. Click on Getting started with WebLogic server . This will bring up a screen with two options for creating a new WebLogic domain or extending an existing WebLogic domain. Select the option to create a new WebLogic domain and click on Next:
    Deploying Liferay on WebLogic
  3. Provide the name of the domain. It would be good if we name it Liferay. Also, you will have to provide the location of the domain. This is where our Liferay would go. So we would call this DOMAINS_HOME for future reference.
    Deploying Liferay on WebLogic
  4. When you click Next it will give you an option to set the name and password for the administrator user. Provide the credentials you would like to have and click on the Next button:
    Deploying Liferay on WebLogic
  5. This will bring you a screen from which you can select the mode as well as JDK. We will use Sun JDK and keep the mode as Development for now.
    Deploying Liferay on WebLogic
  6. The next screen will ask you for the components that you want to install. Right now just check Administration Server and move on.
    Deploying Liferay on WebLogic
  7. Finally, you are given the option to configure your server, where you can specify the server name and the port it listens to. Keep the defaults and move on to the next screen.
    Deploying Liferay on WebLogic
  8. You can check your configuration summary and finish off your installation.
    Deploying Liferay on WebLogic
  9. While finishing the installation, we made sure to start the server. So the server should startup in a few minutes. When the server is started up, you can open a browser and type this URL: http://localhost:7001/console. This should bring up the admin console as follows:
    Deploying Liferay on WebLogic
  10. Now that we have set up a domain for Liferay, let us actually deploy Liferay in it. Stop the server. You can start or stop the server using the shortcut that the configuration wizard has created for you in the Start menu. In our case to stop, it will be Start | Oracle Weblogic(BEA 1) | User Projects | Liferay | Stop Admin Server. Copy the dependencies jar that you downloaded earlier to DOMAINS_HOME/Liferay/lib.
  11. Next go to DOMAINS_HOME/Liferay/bin. Open the file called setDomainEnv.cmd and change XX:MaxPermSize from 48m to 128m to increase the PermGen Space memory. After restarting the server, navigate to the admin console URL that we accessed earlier and log in with your credentials.
  12. You will be presented with the dashboard of the WebLogic server on successful login. Click on the link called Deployments, which can be found in the dashboard, and will lead to a screen from where you can deploy your web application. Click on Install and navigate to the location where you have standalone Liferay war downloaded. Select the radio button next to the war and click on Next. Select the option to install the deployment as a web application and wait for the server to deploy. We are installing Liferay on Admin server instance for testing purposes only and this is not meant for production environments.
    Deploying Liferay on WebLogic
  13. Check the console to see if Liferay has deployed. Once deployed successfully, open the browser and type http://localhost:7001 and it should bring up the Liferay home page. Voila! You have successfully configured Liferay in WebLogic.

What just happened?

We have configured Liferay with Oracle WebLogic which is one of most widely used proprietary Java EE Application Server.

Now we will see how to configure Liferay in an existing Tomcat server.