Liferay 5.2 Installation
Steps to Install liferay Portal
Required Softwares;
Liferay Portal, ant, mysql or any DB [ setup explained here for MySQL and liferay bundle with tomcat 5.5.x]
1.Get JDK version greater than 1.5 and install , set JAVA_HOME
If OS Windows set in System Variables
JAVA_HOME= C:\JDK1.5; add this entry into PATH variable as %JAVA_HOME%\bin\;
For Linux .. SuseLinux
JAVA_HOME=/home/username/software/jdk1.5.0_14
ANT_HOME=/home/username/software/apache-ant-1.7.0PATH=/home/username/software/jdk1.5.0_14/bin:/home/username/software/apache-ant-1.7.0/bin:/home/username/software/mysql-5.0.51/bin:/sbin:$PATH
export PATH JAVA_HOME ANT_HOME ANT_OPTS
2.Set ANT_HOME similar to JAVA_HOME in Windows [ for Linux follow the above]3.Get liferayportal – now current version is 5.2.1 .
http://www.liferay.com/web/guest/downloads/portal – Liferay Portal Standard Edition — get this
and extract to home/username/software/liferay52/
You can see data,deploy,tomcat-xxx, license folders
4.Get Portal source from
http://www.liferay.com/web/guest/downloads/additional
Bottom of the page under grouping “Files for Developers” — Liferay Portal 5.2.1 Source
extract to home/username/software/liferay52/portal52/
You can see some folders and properties files.
Now its time to create EXT environment and database configurations
i. copy the app.server.properties and rename to “app.server.username.properties”
app.server.username.properties —
1. set app.server.parent.dir=/home/username/software/liferay52
2. ## Tomcat ##
app.server.tomcat.version=5.5
app.server.tomcat.dir=${app.server.parent.dir}/tomcat-5.5.27
app.server.tomcat.bin.dir=${app.server.tomcat.dir}/bin
app.server.tomcat.classes.global.dir=${app.server.tomcat.dir}/common/classes
app.server.tomcat.classes.portal.dir=${app.server.tomcat.portal.dir}/WEB-INF/classes
app.server.tomcat.deploy.dir=${app.server.tomcat.dir}/webapps
app.server.tomcat.lib.endorsed.dir=${app.server.tomcat.dir}/common/endorsed
app.server.tomcat.lib.global.dir=${app.server.tomcat.dir}/common/lib/ext
app.server.tomcat.lib.portal.dir=${app.server.tomcat.portal.dir}/WEB-INF/lib
app.server.tomcat.lib.support.dir=${app.server.tomcat.dir}/server/lib
app.server.tomcat.portal.context=ROOT
app.server.tomcat.portal.dir=${app.server.tomcat.deploy.dir}/${app.server.tomcat.portal.context}
app.server.tomcat.log.dir=${app.server.tomcat.dir}/logs
app.server.tomcat.temp.dir=${app.server.tomcat.dir}/temp
app.server.tomcat.work.dir=${app.server.tomcat.dir}/work
app.server.tomcat.zip.name=liferay-portal-tomcat-5.5-${downloads.version}.zip
app.server.tomcat.zip.url=${sourceforge.mirror}/${app.server.tomcat.zip.name}Don’t modify anything
2.similar to app.server.username.properties copy release.properties and rename to “release.user.properties“
release.user.properties — changes
lp.source.dir=/home/username/software/liferay52/portal52
lp.ext.dir=/home/username/software/liferay52/ext
ant.installer.dir=/home/username/software/apache-ant-1.7.0
// comment plugins , eclipse if u dont need .. i will gine instructions how to add this ext into eclipse as a project
3. DB configurations
Default database name for liferay lportal … if you want change
inside folder “sql” — sql.properties – replace the database name whatever you want
eg: database.name=lportal52 // i named to lportal52 – if u dont want leave it – donot modify other than anything in this file
Its time to set database association with liferay tomcat … to do this ..
Modify the portal.properties inside /home/username/software/liferay52/portal52/portal-impl/classes/
Open the property file and search for MySQL \\ by default Hypersonic is be configured
uncomment mysql properties …. after look like this
” #
# MySQL
#
jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.url=jdbc:mysql://localhost/lportal52?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
jdbc.default.username=root
jdbc.default.password=’mysqlpassword’ “// Dont forget to comment hypersonic properties
4. Final step is to build the portal
Open a console inside portal52
$$$$$$$ /software/liferay52/portal52> ant clean start build-ext
after some time ~ 4 minutes for [1GB RAM witk Intel Core CPU ]
You will get build successful
$$$$$$$ /software/liferay52/portal52> ant start deploy
Now the portal server is ready …
Navigate to $$$$$$$ /software/liferay52/portal52/tomcat5.5.x/bin>./startup.sh
..
.
.after som time u will get message like this …
INFO: Server startup in 58507 ms
5.Open browser type http://localhost:8080
default username ” test@liferay.com”, password is ” test”
login and enjoy with liferay ….
6.Final set up for ext environment …
when u build ext using command “ant clean start build-ext”
new directory “ext” will be created inside ” /home/username/software/liferay52″
If you want to develop portlets using ext environment …. dont forget to paste the “app.server.username.properties” file into ext folder — get this from portal52/app.server.username.properties
open a terminal inside ext folder …
$$$$$$$ /software/liferay52/portal52/ext> ant deploy
after some time u will get message like
BUILD SUCCESSFUL
Total time: 1 minute 35 seconds7. Importing ext into Eclipse
Open Eclipse IDE , choose import from File menu .. select ” Existing Project into WorkSpace”
Choose “ext” … and click finish …………..
Now i hope everything ready to enjoy with liferay portal , development environment has been set ………
In next Post we will see how to develope portlets from liferay-plugins-sdk
-live
-rajcheram
Sources:
Liferay Quick Installation Guide for 5.1
Liferay Portal Administrator’s Guide for 5.1