官术网_书友最值得收藏!

  • Liferay Beginner’s Guide
  • Robert Chen Sandeep Nair Samir Bhatt
  • 247字
  • 2021-08-27 12:04:34

Time for action – deploying Liferay

Next, follow these steps to configure Liferay with Tomcat:

  1. Create a folder called Liferay, which we will refer to as LIFERAY_HOME from now on.
  2. Extract the Tomcat zip file you have downloaded earlier to LIFERAY_HOME. You should see a folder named apache-tomcat-6.0.33 inside LIFERAY_HOME. From now on this folder will be referred to as TOMCAT_HOME.
  3. Create a folder called ext inside TOMCAT_HOME/lib. Extract the Portal Dependencies jars zip that you downloaded earlier to this ext folder.
  4. Copy the jars like mysql.jar, jta.jar, and mail.jar inside the TOMCAT_HOME/lib folder, which has been provided to you in the code folder of this chapter.
  5. Create a file called ROOT.xml inside TOMCAT_HOME/conf/Catalina/localhost. Add the following content inside ROOT.xml:
    <Context path=””>
    </Context>
    
  6. Open the file TOMCAT_HOME/conf/catalina.properties and find a property called common.loader. Append ${catalina.home}/lib/ext/*.jar at the end as follows:
    common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar,${catalina.home}/lib/ext/*.jar 
  7. Delete the contents inside TOMCAT_HOME/webapps/ROOT folder and extract the contents of Liferay Portal war that you downloaded before.
  8. Open catalina.bat from TOMCAT_HOME/bin using a text editor. Find a line which starts with rem ----- Execute.
  9. Below that line add the following to increase heap space and save the file:
    set JAVA_OPTS=%JAVA_OPTS% -Xms128m -Xmx512m -XX:MaxPermSize=128m -Dfile.encoding=UTF8 -Duser.timezone=GMT
  10. Start the server by double-clicking startup.bat inside TOMCAT_HOME/bin.
  11. The server will start up and the default Liferay home page will be opened automatically in the browser.

What just happened?

You have just seen how to deploy Liferay in an existing Tomcat server.

Next let's see how we can configure a production database with Liferay.

主站蜘蛛池模板: 南岸区| 大兴区| 建瓯市| 奉节县| 垦利县| 汾阳市| 芜湖市| 舞阳县| 阳西县| 沂南县| 濉溪县| 轮台县| 中江县| 阜南县| 特克斯县| 天水市| 兰州市| 莲花县| 元氏县| 长寿区| 阿拉善右旗| 黄骅市| 名山县| 阜新市| 乐陵市| 开原市| 沁水县| 旬邑县| 张家川| 邵武市| 翼城县| 易门县| 平利县| 达孜县| 务川| 麻阳| 陆川县| 潮安县| 武强县| 固镇县| 隆德县|