Building Liferay on Tomcat

Introduction:

WebSynergy or Sun GlassFish Web Space Server is built on top of Liferay. The first release of WebSynergy will be built on Liferay 5.2.0. This page describes how you can checkout the source and build the core from open soruce.

Step 1: Install Apache Tomcat
  • Download Apache Tomcat (6.0.18)
  • Unzip tomcat 6.0.18
  • cd apache-tomcat-6.0.18/bin
  • chmod +x *.sh
  • Create setenv.sh
    • JAVA_OPTS="-Xms128m -Xmx1024m -XX:MaxPermSize=512m"
  • Start tomcat
    • apache-tomcat-6.0.18/bin/catalina.sh start
  • Verify http://localhost:8080/
  • Stop tomcat
    • apache-tomcat-6.0.18/bin/catalina.sh stop
Step 2: Checkout Liferay source
Step 3: Prepare build environment

Create app.server.<user>.properties in trunk (or 5.2.x) directory, where user is the user name of user logged in to the OS.

app.server.parent.dir=<dir-where-tomcat-was-unzipped>
app.server.tomcat.version=6.0
app.server.tomcat.dir=${app.server.parent.dir}/apache-tomcat-6.0.18
app.server.tomcat.classes.global.dir=${app.server.tomcat.dir}/lib
app.server.tomcat.lib.endorsed.dir=${app.server.tomcat.dir}/lib/ext
app.server.tomcat.lib.global.dir=${app.server.tomcat.dir}/lib/ext
app.server.tomcat.lib.support.dir=${app.server.tomcat.dir}/lib/ext
app.server.tomcat.support.dir=${app.server.tomcat.dir}/lib/ext
Hint
You can customize the build environment further by overriding more properties from app.server.properties
Step 4: Build
  • cd trunk (or 5.2.x)
  • ant start
  • ant deploy
Step 5: Test
Step 6: Customize
  • Stop Tomcat
  • To use sample data, copy lportal.script
    • cp trunk/sql/lportal.script apache-tomcat-6.0.18/bin
  • Create apache-tomcat-6.0.18/webapps/ROOT/WEB-INF/classes/portal-ext.properties
    • schema.run.minimal=false
  • Start Tomcat
Tip
Always cd to the bin directory and then start Tomcat so the lportal.script is used by HSQL, otherewise it will create a fresh one which will not have any sample data.

If you do not want the url to be opened automatically in the browser, set this in portal-ext,

browser.launcher.url=

If you have MySQL up and running, then create a database "lportal" and add following lines to portal-ext

jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.url=jdbc:mysql://localhost/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
jdbc.default.username=root
jdbc.default.password=

There are tons of properties that can be overridden in portal-ext. Look at trunk/portal-impl/src/portal.properties for what you can override.

转载于:https://www.cnblogs.com/sunliho/archive/2011/07/20/2111171.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值