Building and Installing Liferay Source Code on GlassfishV2
By vihangpathak on Feb 25, 2008
I came across various articles to deploy liferay on glassfish. Thanks to them I could figure out the exact way on how to do it. Here is a step by step procedure which I tested twice and it works. If it does not work for you , let me know.
Here are the steps:
- Download Glassfishv2(b58g). Install it
- java -Xmx256m -jar glassfish-installer-v2-b58g.jar
- ant -f setup.xml
- Login to mysql as 'root' and create database lportal;
- use lportal;
- create user lportal;
- set password for 'lportal'@'localhost' = password('lportal');grant all privileges on \*.\* to 'lportal'@'localhost' identified by 'lportal'
- Go to Resources/JDBC/Connection Pools and create a connection pool to connect to the lportal database.
- While doing so, one can specify the database to connect to.
- Go to Resources/JDBC/JDBC Resources, create a JDBC resource with the name jdbc/LiferayPool, and associate it with the connection pool created in the previous step.
- Stop Glassfish
Hope this helps!!! Please try it out and let me know if we need to modify these steps anywhere.
Start using Liferay with Glassfish!!!
- The build might delete the existing glassfish domains directory and create a new one. Hence, do take necessary backup. These installation steps are on a fresh glassfish installation.
- The build might fail due to some minor Java errors. One might have to modify them and then run the build. I observed one such error.
- For those who want to get quick started without getting their hands dirty,but want to do it with Glassfish, there is also a Liferay bundle with Glassfish available for download here
- Install mySQL with detailed configuration. That way one will have better control especially multilingual etc./firewall blocking/unblocking
- If you have tried an unsuccesfull install of mySQL and unable to install again, please uninstall, delete the MYSQL installation directory and re-install MYSQL
- When MySQL is successfully installed, log on as "root" and create user lportal with lportal(password) and grant privileges.
- If you intend to create connection pool faster, you may follow alternatively the below method:
- Create mysql_liferay_connection_pool.xml
- Add the following contents to it
- <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE resources PUBLIC
"-//Sun Microsystems Inc.//DTD Application Server 9.1 Domain//EN"
<property name="user" value="lportal"/>
<property name="password" value="lportal"/>
<property name="url" value="jdbc:mysql://localhost:3306/lportal"/>
- Now run following command in glassfish/bin directory:
asadmin add-resources <location-of-resource-file>/mysql_liferay_connection_pool.xml